@simosphere/tokenizer-speedup 0.7.0 → 0.7.1
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/.claude-plugin/plugin.json +1 -1
- package/README.de.md +173 -0
- package/README.md +173 -0
- package/dist/cli/analyze.js +1 -1
- package/dist/cli/config-cmd.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/setup-cmd.js +1 -1
- package/dist/cli/setup-cmd.js.map +1 -1
- package/dist/cloud/stripe-checkout.js +1 -1
- package/dist/cloud/stripe-config.js +1 -1
- package/dist/cloud/stripe-usage.js +1 -1
- package/dist/cloud/stripe-webhooks.js +1 -1
- package/dist/cloud/subscription-store.js +1 -1
- package/dist/manifest.json +32 -32
- package/dist/plugin/cli.js +1 -1
- package/dist/plugin/config-loader.js +1 -1
- package/dist/plugin/context-compressor.js +1 -1
- package/dist/plugin/hook-dispatcher.js +1 -1
- package/dist/plugin/metering-client.js +1 -1
- package/dist/plugin/metrics-collector.js +1 -1
- package/dist/plugin/onboarding.js +1 -1
- package/dist/plugin/precompact-handler.js +1 -1
- package/dist/plugin/report.js +1 -1
- package/dist/plugin/rule-analytics-store.js +1 -1
- package/dist/plugin/rule-analytics.js +1 -1
- package/dist/plugin/rule-engine.js +1 -1
- package/dist/plugin/rule-sharing.js +1 -1
- package/dist/plugin/rule-suggest.js +1 -1
- package/dist/plugin/session-start.js +1 -1
- package/dist/plugin/smart-context.js +1 -1
- package/dist/shared/license.js +1 -1
- package/dist/shared/providers/claude-provider.js +1 -1
- package/dist/shared/providers/openai-provider.js +1 -1
- package/dist/shared/token-counter.js +1 -1
- package/dist/shared/token-provider.js +1 -1
- package/package.json +25 -2
package/dist/manifest.json
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.7.
|
|
3
|
-
"build": "2026-03-
|
|
2
|
+
"version": "0.7.1",
|
|
3
|
+
"build": "2026-03-05T05:59:45.813Z",
|
|
4
4
|
"files": {
|
|
5
5
|
"cli/analyze.d.ts": "sha256:520ab064dfdf8a4fa95f73d74d4f96add4d60d8a22a32f622f68c4ffbf8e9785",
|
|
6
|
-
"cli/analyze.js": "sha256:
|
|
6
|
+
"cli/analyze.js": "sha256:2689fa7fa09a492ebae2b31fffb8f499fe2149ddb7ef7912b71e5e2d94259070",
|
|
7
7
|
"cli/config-cmd.d.ts": "sha256:eeae10f481e1ef2f3c6573d52bbbe1bc6994895a34c5dfc9a7c4e9f89db3460d",
|
|
8
|
-
"cli/config-cmd.js": "sha256:
|
|
8
|
+
"cli/config-cmd.js": "sha256:8d830ed297ab3ff2307d44e88427f5b55b8a63a9922dcf1ab0b74d86682552da",
|
|
9
9
|
"cli/index.d.ts": "sha256:2f026c68dce905b6217e5f7fab5bfed185feeed431944a8dc60c178052f24f7d",
|
|
10
|
-
"cli/index.js": "sha256:
|
|
10
|
+
"cli/index.js": "sha256:1f806b7eadd3802cedd3bfb4420cd3ae2da1462241e68a8067ec030b67075bbc",
|
|
11
11
|
"cli/setup-cmd.d.ts": "sha256:5fb0b00fd2b57e681e590153ad8ec33b9619179bfbed635c5ed01c94b232852d",
|
|
12
|
-
"cli/setup-cmd.js": "sha256:
|
|
12
|
+
"cli/setup-cmd.js": "sha256:347fc66c2cdaba114b11039d4f049cb8a8efbc09c1ec9f8b1c9df53ce5be162d",
|
|
13
13
|
"cloud/stripe-checkout.d.ts": "sha256:ce58292aa395baf9068d819c4feb5cd29781a05a5f6977024f27b8ac0c839d1e",
|
|
14
|
-
"cloud/stripe-checkout.js": "sha256:
|
|
14
|
+
"cloud/stripe-checkout.js": "sha256:5b8c6885b9ef3523a662ad73ee4d6cb338aeda988b8604fe94204e94cb3fd153",
|
|
15
15
|
"cloud/stripe-config.d.ts": "sha256:b5e4ef4c8d722b239ef13008bd216d3c56291e12ff82e3e9b9c494cd2303d656",
|
|
16
|
-
"cloud/stripe-config.js": "sha256:
|
|
16
|
+
"cloud/stripe-config.js": "sha256:f65b30ac6c5bb25d51eb4d67f93fe65fa2a0fc39e086861261a6859ced6c50f7",
|
|
17
17
|
"cloud/stripe-usage.d.ts": "sha256:134415ce475007c2ed196305ab91489b688d852dda3cbf2f240d1d860d24bd2c",
|
|
18
|
-
"cloud/stripe-usage.js": "sha256:
|
|
18
|
+
"cloud/stripe-usage.js": "sha256:74497151a49d65d163943826dd61beb3bb394cf376a46eef1baa5fdc695364a9",
|
|
19
19
|
"cloud/stripe-webhooks.d.ts": "sha256:cca005cebcc8f1e916e975d6adef5ad15d09df4249facbb718cbc3f831ff84ab",
|
|
20
|
-
"cloud/stripe-webhooks.js": "sha256:
|
|
20
|
+
"cloud/stripe-webhooks.js": "sha256:c57c6616b68e93b9d2e6aae34596714fda54b7217a4112fa5e2d43f1bb7932e3",
|
|
21
21
|
"cloud/subscription-store.d.ts": "sha256:6e6ba1b28d7b58131aeebd96051dae42a1e9fb5069e48a7e5d042268d5b417ec",
|
|
22
|
-
"cloud/subscription-store.js": "sha256:
|
|
22
|
+
"cloud/subscription-store.js": "sha256:ed52c08a4825d00bd8a4b89877a8906cc40f03054cab07e23a73d41487376080",
|
|
23
23
|
"plugin/cli.d.ts": "sha256:8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
24
|
-
"plugin/cli.js": "sha256:
|
|
24
|
+
"plugin/cli.js": "sha256:f74a860db98d22afe321b7fd7c1171171a8220b24fb960b527f3065038552f83",
|
|
25
25
|
"plugin/config-loader.d.ts": "sha256:d55c9c53c9df25188abd6af71c217bb4a3feee89960ea411e174b10c456177da",
|
|
26
|
-
"plugin/config-loader.js": "sha256:
|
|
26
|
+
"plugin/config-loader.js": "sha256:2bef82229673cb359ded78dcb8c997f81bf82ea90ba7ef2d4f00810837623893",
|
|
27
27
|
"plugin/context-compressor.d.ts": "sha256:c14912ec73df27f3c49abc84edc510edee126956eb197c446863309348a03412",
|
|
28
|
-
"plugin/context-compressor.js": "sha256:
|
|
28
|
+
"plugin/context-compressor.js": "sha256:774a9d0ba9ba3c1f8f3603b58cefdd97da9a2146070151f95dd234863cbfbe91",
|
|
29
29
|
"plugin/hook-dispatcher.d.ts": "sha256:ee5a5e5ac92dd5ca872b76611a4531fa074cb077e417f8bc9f97cf750e87aced",
|
|
30
|
-
"plugin/hook-dispatcher.js": "sha256:
|
|
30
|
+
"plugin/hook-dispatcher.js": "sha256:149bb09835317a0416662bc9cfcddde018861c1296f722b4f4bf0be9e6d721a7",
|
|
31
31
|
"plugin/metering-client.d.ts": "sha256:f0be7100119afdfdb557fdfd4bab872e53d2d472205d8f85fa7241e457c59c19",
|
|
32
|
-
"plugin/metering-client.js": "sha256:
|
|
32
|
+
"plugin/metering-client.js": "sha256:fac4898ab301730ea007d58801a87eec85fbb507b8fb17ca6291dc8303c779f6",
|
|
33
33
|
"plugin/metrics-collector.d.ts": "sha256:91a0b593ff1f9dfbc7f02473ac250e2e875c5ac774000811490c1c1e46987c09",
|
|
34
|
-
"plugin/metrics-collector.js": "sha256:
|
|
34
|
+
"plugin/metrics-collector.js": "sha256:0dad1f3ad3031a16e064b5c5b9e4903b3251e7e8743a8b1dd008822c2856166f",
|
|
35
35
|
"plugin/onboarding.d.ts": "sha256:b907ca6fc63a732f28a3c173c4a79e42e84971a0efe7cde39c2d9767376a97b6",
|
|
36
|
-
"plugin/onboarding.js": "sha256:
|
|
36
|
+
"plugin/onboarding.js": "sha256:ddbab1a3a11d8f0d0fba53ef345106147507d3c22c16279cc43c98d62349e9aa",
|
|
37
37
|
"plugin/precompact-handler.d.ts": "sha256:52b1570601955ed1aa26541f651e3f45fde21ec6ce8042001dd0ac2fab253ccd",
|
|
38
|
-
"plugin/precompact-handler.js": "sha256:
|
|
38
|
+
"plugin/precompact-handler.js": "sha256:00fa426467da1c0a2589934ceb97592cdfdb4a11a0dea033bddb4399f17f5b48",
|
|
39
39
|
"plugin/report.d.ts": "sha256:8027321ede260c9302dfd19c73cf48e334595350fee14485475e50008f74645f",
|
|
40
|
-
"plugin/report.js": "sha256:
|
|
40
|
+
"plugin/report.js": "sha256:b50d8d5e549f860c05208fe1599019ac6e2644e40a754e67ece8de3328576b9e",
|
|
41
41
|
"plugin/rule-analytics-store.d.ts": "sha256:710a52c82dc6e4b2998cdd10a51083be8103b39b15b6d6d37ac8272a58e854ec",
|
|
42
|
-
"plugin/rule-analytics-store.js": "sha256:
|
|
42
|
+
"plugin/rule-analytics-store.js": "sha256:a5dd25d56103d01734139787393490f87f0a7d4d80c6605f4e131d6aea7b07cd",
|
|
43
43
|
"plugin/rule-analytics.d.ts": "sha256:cdeffbbc424b5452f57ca697b9c5e5ed0264efc0d56342ce476bd591b564aff3",
|
|
44
|
-
"plugin/rule-analytics.js": "sha256:
|
|
44
|
+
"plugin/rule-analytics.js": "sha256:35617eca56579e44f062e4568a1cfa2c45811b7c480545770cce60c6adc86b0b",
|
|
45
45
|
"plugin/rule-engine.d.ts": "sha256:e9e9e0c8af47ecf1c039a6db15a656ef3cd28e4a7521204d4eaf076a15ee2cc8",
|
|
46
|
-
"plugin/rule-engine.js": "sha256:
|
|
46
|
+
"plugin/rule-engine.js": "sha256:d7bb1a3474cefb1c8d28b1d3e47014abdf5f30684922ecd6f1ce444184b4f84d",
|
|
47
47
|
"plugin/rule-sharing.d.ts": "sha256:8fc87926ec3752c2e0d21274c98ef3bb21f2a10665eb5536b726ea8d94479a79",
|
|
48
|
-
"plugin/rule-sharing.js": "sha256:
|
|
48
|
+
"plugin/rule-sharing.js": "sha256:498d1721c0160de89370d94adbfef216ee8b1dd7211e050a215221edaeb19fbc",
|
|
49
49
|
"plugin/rule-suggest.d.ts": "sha256:4d12dac9df44bb3adf5b5e9456e683a42625e8b28712c80aa62292a5b3d40be9",
|
|
50
|
-
"plugin/rule-suggest.js": "sha256:
|
|
50
|
+
"plugin/rule-suggest.js": "sha256:12964fa36b0a393008821091c63fa89f5d70e850befbc9f536790532972faefa",
|
|
51
51
|
"plugin/session-start.d.ts": "sha256:36cb2cc2a7e09195e650aa7a96b8ae420b612c23907fa35723501d27600d4ff1",
|
|
52
|
-
"plugin/session-start.js": "sha256:
|
|
52
|
+
"plugin/session-start.js": "sha256:0be1cd0a532edaa46e0eea9f8fc929913470cb84c277f8ca80421c17c6c372ac",
|
|
53
53
|
"plugin/smart-context.d.ts": "sha256:cace6c764ef3cf1a18f87f09ad4650abe69322b7629cd8383a7cc775f7f81be1",
|
|
54
|
-
"plugin/smart-context.js": "sha256:
|
|
54
|
+
"plugin/smart-context.js": "sha256:96601f7bced8f7b11c7175475d27b175140fd8f134dfbe46b2f42aeecea80e18",
|
|
55
55
|
"shared/license.d.ts": "sha256:4778f87bbd80b5033479e03556a7e755aa7787707f3b875aa8795c4f1e97ee96",
|
|
56
|
-
"shared/license.js": "sha256:
|
|
56
|
+
"shared/license.js": "sha256:607c3dbea08df40178a072caa40298b0feb038fbf6b13b7eb92e73e1152c63f9",
|
|
57
57
|
"shared/providers/claude-provider.d.ts": "sha256:58d95cac3a61871425760a3ad7cd4b7749737841d49f84f70e933c52ed297f32",
|
|
58
|
-
"shared/providers/claude-provider.js": "sha256:
|
|
58
|
+
"shared/providers/claude-provider.js": "sha256:de9fefa267f01fc907e4971ce46754f6909e4ea91e07d8a61b7f62665661bcc5",
|
|
59
59
|
"shared/providers/openai-provider.d.ts": "sha256:2114b5a1dcc4c03c5c26094d941189ffe4d6cb26a9ecc7e102830eb8bcab3cf7",
|
|
60
|
-
"shared/providers/openai-provider.js": "sha256:
|
|
60
|
+
"shared/providers/openai-provider.js": "sha256:3116150a878a22cf324feba6f99025a7d63de8397d108f570a16593538bfa56b",
|
|
61
61
|
"shared/token-counter.d.ts": "sha256:d7e1bfe11fb4893dd936057db98fb4c9e1ee95c3d13b2bc24309fc471512f3b5",
|
|
62
|
-
"shared/token-counter.js": "sha256:
|
|
62
|
+
"shared/token-counter.js": "sha256:f589a69d2b056040711d1c5c127b0daf96ce75e14531ab29ff36a5cb3d54916b",
|
|
63
63
|
"shared/token-provider.d.ts": "sha256:f3728d375158e79fef3055f56dc247395101ecee4c21911997668de3607aea0e",
|
|
64
|
-
"shared/token-provider.js": "sha256:
|
|
64
|
+
"shared/token-provider.js": "sha256:9d9ee04ad1e4dd874dd0c7b304dd5e6c83046f8ba9cd56d2a8a005d60ca6f1e5",
|
|
65
65
|
"shared/types.d.ts": "sha256:20600b79ba665bdd2200ab8390784c37a508f29b23f1967a4662b86de8baa122",
|
|
66
66
|
"shared/types.js": "sha256:56e1b0c10087ee6ff7f949b15d1ef63cb11228ff93a159a52f9ad7ef851e4e02"
|
|
67
67
|
}
|
package/dist/plugin/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x1b2ce2=_0x40f6;(function(_0x3e08a9,_0x4a2dc2){const _0x85b919=_0x40f6,_0x1f40d=_0x3e08a9();while(!![]){try{const _0x3495b3=-parseInt(_0x85b919(0x1c5))/0x1*(parseInt(_0x85b919(0x1bb))/0x2)+-parseInt(_0x85b919(0x1b0))/0x3*(parseInt(_0x85b919(0x1ae))/0x4)+parseInt(_0x85b919(0x1c6))/0x5*(parseInt(_0x85b919(0x1bd))/0x6)+-parseInt(_0x85b919(0x1cc))/0x7*(parseInt(_0x85b919(0x1cd))/0x8)+-parseInt(_0x85b919(0x1af))/0x9+parseInt(_0x85b919(0x1ca))/0xa*(parseInt(_0x85b919(0x1ce))/0xb)+-parseInt(_0x85b919(0x1b8))/0xc*(-parseInt(_0x85b919(0x1b6))/0xd);if(_0x3495b3===_0x4a2dc2)break;else _0x1f40d['push'](_0x1f40d['shift']());}catch(_0x8345b0){_0x1f40d['push'](_0x1f40d['shift']());}}}(_0x510d,0x5685f));import{resolve}from'node:path';import{loadConfig}from'./config-loader.js';import{HookDispatcher}from'./hook-dispatcher.js';import{buildSessionStartContext}from'./session-start.js';import{buildSmartContext}from'./smart-context.js';function _0x510d(){const _0x51b807=['../..','230587lngFov','8gWlYxb','8734qKgWQi','parse','1776340TWpfEK','3371778sanliV','3yLgXZy','handleSessionStop','exit','PreCompact','endpoint','pylVv','151450MxDaqZ','push','1236NeGhMi','additionalContext','prompt','6QznyJG','tiQCm','12UZurWI','utf-8','SessionStart','cwd','Stop','handlePreCompact','concat','stringify','165601zqzPqt','981385tdPrTh','MSLJM','session_id','model','1390GysTxh'];_0x510d=function(){return _0x51b807;};return _0x510d();}import{MeteringClient,buildMeterPayload}from'./metering-client.js';import{loadApiKeyFromConfig}from'../cli/setup-cmd.js';if(!process.env.TOKENIZER_API_KEY){const t=loadApiKeyFromConfig();t&&(process.env.TOKENIZER_API_KEY=t);}async function main(){const _0x5938aa=_0x40f6,_0x42f5cb={'WZWMr':_0x5938aa(0x1be),'ZupUL':function(_0x21a67c,_0x49a520){return _0x21a67c(_0x49a520);},'MSLJM':_0x5938aa(0x1bf),'pylVv':_0x5938aa(0x1b3),'tiQCm':_0x5938aa(0x1c1)},_0x482501=[];for await(const _0x1209db of process['stdin'])_0x482501[_0x5938aa(0x1b7)](_0x1209db);const _0xf40ba=Buffer[_0x5938aa(0x1c3)](_0x482501)['toString'](_0x42f5cb['WZWMr']);let _0x27d223;try{_0x27d223=JSON[_0x5938aa(0x1cf)](_0xf40ba);}catch{process['exit'](0x0);}const _0x32d86d=_0x27d223['cwd']||process[_0x5938aa(0x1c0)](),_0x28b834=_0x27d223['hook_event_name'];let _0x3e2e32;try{_0x3e2e32=loadConfig(_0x32d86d);}catch{const _0x67039=process.env.CLAUDE_PLUGIN_ROOT||resolve(import.meta.dirname,_0x5938aa(0x1cb));_0x3e2e32=_0x42f5cb['ZupUL'](loadConfig,_0x67039);}const _0x4428fb=new HookDispatcher(_0x3e2e32,_0x32d86d,_0x27d223[_0x5938aa(0x1c8)]);let _0x52d769={};switch(_0x28b834){case _0x42f5cb[_0x5938aa(0x1c7)]:_0x52d769=buildSessionStartContext({'cwd':_0x32d86d});break;case'UserPromptSubmit':{const _0x59ccc5=_0x4428fb['handleUserPromptSubmit'](_0x27d223),_0x163bc0=buildSmartContext({'prompt':_0x27d223[_0x5938aa(0x1ba)]||'','cwd':_0x32d86d}),_0x10b6dd=[_0x59ccc5['additionalContext'],_0x163bc0[_0x5938aa(0x1b9)]]['filter'](Boolean);_0x52d769=_0x10b6dd['length']>0x0?{'additionalContext':_0x10b6dd['join']('\x0a')}:{};break;}case _0x42f5cb[_0x5938aa(0x1b5)]:_0x52d769=_0x4428fb[_0x5938aa(0x1c2)](_0x27d223);break;case _0x42f5cb[_0x5938aa(0x1bc)]:{const _0x4ed2f9=_0x4428fb[_0x5938aa(0x1b1)](),_0x217185=new MeteringClient(_0x3e2e32['metering'][_0x5938aa(0x1b4)]),_0x1df582=buildMeterPayload(_0x4ed2f9,{'provider':_0x3e2e32['provider'],'model':_0x3e2e32[_0x5938aa(0x1c9)]});await _0x217185['send'](_0x1df582);break;}}process['stdout']['write'](JSON[_0x5938aa(0x1c4)](_0x52d769)),process[_0x5938aa(0x1b2)](0x0);}function _0x40f6(_0x3ca995,_0x189c7f){_0x3ca995=_0x3ca995-0x1ae;const _0x510dfd=_0x510d();let _0x40f65e=_0x510dfd[_0x3ca995];return _0x40f65e;}main()['catch'](()=>process[_0x1b2ce2(0x1b2)](0x0));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x22bef3=_0xa903;(function(_0x563fa8,_0x5407df){const _0x11e53e=_0xa903,_0x39b5a4=_0x563fa8();while(!![]){try{const _0x190aff=parseInt(_0x11e53e(0x1c4))/0x1+parseInt(_0x11e53e(0x1b3))/0x2+-parseInt(_0x11e53e(0x1b6))/0x3*(-parseInt(_0x11e53e(0x1bd))/0x4)+-parseInt(_0x11e53e(0x1bc))/0x5*(-parseInt(_0x11e53e(0x1b5))/0x6)+parseInt(_0x11e53e(0x1c7))/0x7+parseInt(_0x11e53e(0x1c2))/0x8+-parseInt(_0x11e53e(0x1b4))/0x9;if(_0x190aff===_0x5407df)break;else _0x39b5a4['push'](_0x39b5a4['shift']());}catch(_0x28e17b){_0x39b5a4['push'](_0x39b5a4['shift']());}}}(_0x59cc,0xe35f7));import{readFileSync}from'node:fs';import{join}from'node:path';import _0x10d43a from'js-yaml';import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';function _0xa903(_0xf3cff0,_0x545390){_0xf3cff0=_0xf3cff0-0x1b3;const _0x59ccfe=_0x59cc();let _0xa903a0=_0x59ccfe[_0xf3cff0];return _0xa903a0;}function _0x59cc(){const _0x540726=['998794EYPfgK','context_limits','claude','1671005kAqjJs','1734966ziRDRL','34848675YjYhrc','7782jOWqVy','223527kLEuZm','tokenizer-speedup.yaml','provider','version','.\x20Known:\x20','join','590pBtqEL','56ynsevi','includes','https://api.simosphere.ai/v1/meter','number','ituvw','12017840Oyfyvt','isArray'];_0x59cc=function(){return _0x540726;};return _0x59cc();}import{listProviders}from'../shared/token-provider.js';const CONFIG_FILENAME=_0x22bef3(0x1b7),DEFAULT_LIMITS={'max_injected_tokens':0xfa0,'max_file_tokens':0x5dc,'compress_above':0x320},DEFAULT_METERING={'endpoint':_0x22bef3(0x1bf),'batch_interval':0x3c,'send_content':!0x1};export function parseConfig(_0x56e7a8){const _0xf7a3ba=_0x22bef3,_0x4956b1={'OChit':function(_0x56b163,_0x253c96){return _0x56b163!=_0x253c96;},'ituvw':'Invalid\x20config:\x20missing\x20or\x20invalid\x20\x22version\x22\x20field','xBiFk':_0xf7a3ba(0x1c6)},_0x159dca=_0x10d43a['load'](_0x56e7a8);if(!_0x159dca||_0x4956b1['OChit'](_0xf7a3ba(0x1c0),typeof _0x159dca['version']))throw new Error(_0x4956b1[_0xf7a3ba(0x1c1)]);const _0x437659=_0x159dca[_0xf7a3ba(0x1b8)]??_0xf7a3ba(0x1c6),_0x15b083=_0x159dca['model']??(_0x4956b1['xBiFk']===_0x437659?'claude-sonnet-4-20250514':'gpt-4o'),_0x41995f=listProviders();if(!_0x41995f[_0xf7a3ba(0x1be)](_0x437659))throw new Error('Unknown\x20provider:\x20'+_0x437659+_0xf7a3ba(0x1ba)+_0x41995f[_0xf7a3ba(0x1bb)](',\x20'));const _0x521250=Array[_0xf7a3ba(0x1c3)](_0x159dca['rules'])?_0x159dca['rules']:[],_0x5d867a=_0x159dca[_0xf7a3ba(0x1c5)]??DEFAULT_LIMITS,_0x58fbb2=_0x159dca['metering']??DEFAULT_METERING;return{'version':_0x159dca[_0xf7a3ba(0x1b9)],'provider':_0x437659,'model':_0x15b083,'rules':_0x521250,'context_limits':_0x5d867a,'metering':_0x58fbb2};}export function loadConfigFromString(_0x258b39){const _0x19fa97={'aEhps':function(_0x5cf279,_0x3610e1){return _0x5cf279(_0x3610e1);}};return _0x19fa97['aEhps'](parseConfig,_0x258b39);}export function loadConfig(_0x2c5a88){const _0x34b46b=join(_0x2c5a88,CONFIG_FILENAME);return parseConfig(readFileSync(_0x34b46b,'utf-8'));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x588d2c,_0x1ed24c){const _0x3efbc8=_0x2656,_0x367061=_0x588d2c();while(!![]){try{const _0x4ffcf6=-parseInt(_0x3efbc8(0x130))/0x1*(parseInt(_0x3efbc8(0x136))/0x2)+-parseInt(_0x3efbc8(0x139))/0x3*(-parseInt(_0x3efbc8(0x12d))/0x4)+parseInt(_0x3efbc8(0x13c))/0x5+parseInt(_0x3efbc8(0x13a))/0x6+parseInt(_0x3efbc8(0x137))/0x7+-parseInt(_0x3efbc8(0x131))/0x8+parseInt(_0x3efbc8(0x12c))/0x9*(-parseInt(_0x3efbc8(0x13b))/0xa);if(_0x4ffcf6===_0x1ed24c)break;else _0x367061['push'](_0x367061['shift']());}catch(_0x27923c){_0x367061['push'](_0x367061['shift']());}}}(_0x447f,0x27dea));import{countTokens}from'../shared/token-counter.js';export function compressContext(_0xe76b53,_0x328905){const _0x57c2be=_0x2656,_0x9b1d02={'zSRUw':function(_0x4b627a,_0x56fe7f){return _0x4b627a(_0x56fe7f);},'rIVXA':function(_0x3aa8ef,_0x23b32d){return _0x3aa8ef<=_0x23b32d;},'MCnCC':function(_0x296df0,_0x5f3f33){return _0x296df0+_0x5f3f33;},'bMSVs':function(_0x4962a6,_0x372733){return _0x4962a6>_0x372733;},'pGAdV':function(_0x57feaa,_0x334978){return _0x57feaa+_0x334978;},'GXpvX':'\x20→\x20','VzYuU':function(_0x295cd8,_0x55f443){return _0x295cd8(_0x55f443);}};if(!_0xe76b53)return{'text':'','originalTokens':0x0,'compressedTokens':0x0,'wasTruncated':!0x1};const _0x4dc4ff=_0x9b1d02[_0x57c2be(0x134)](countTokens,_0xe76b53);if(_0x9b1d02['rIVXA'](_0x4dc4ff,_0x328905))return{'text':_0xe76b53,'originalTokens':_0x4dc4ff,'compressedTokens':_0x4dc4ff,'wasTruncated':!0x1};const _0x46930b=_0xe76b53['split']('\x0a\x0a');let _0x264b79='',_0x3d525f=0x0;for(const _0x26f17a of _0x46930b){const _0x14a074=_0x264b79?_0x9b1d02['MCnCC'](_0x264b79,'\x0a\x0a')+_0x26f17a:_0x26f17a,_0x49a029=countTokens(_0x14a074);if(_0x49a029>_0x328905)break;_0x264b79=_0x14a074,_0x3d525f=_0x49a029;}if(!_0x264b79&&_0x9b1d02['bMSVs'](_0x46930b[_0x57c2be(0x132)],0x0)){const _0x3c14e6=_0x46930b[0x0][_0x57c2be(0x135)](/\s+/);let _0x3f3425='';for(const _0x3fa3e3 of _0x3c14e6){const _0x47fd66=_0x3f3425?_0x9b1d02[_0x57c2be(0x138)](_0x9b1d02[_0x57c2be(0x138)](_0x3f3425,'\x20'),_0x3fa3e3):_0x3fa3e3;if(countTokens(_0x47fd66)>_0x328905-0x5)break;_0x3f3425=_0x47fd66;}_0x264b79=_0x3f3425,_0x3d525f=countTokens(_0x264b79);}const _0x1191c7=_0x9b1d02[_0x57c2be(0x138)](_0x9b1d02['MCnCC'](_0x9b1d02[_0x57c2be(0x138)](_0x9b1d02[_0x57c2be(0x12f)](_0x264b79,_0x57c2be(0x12e)),_0x4dc4ff)+_0x9b1d02[_0x57c2be(0x133)],_0x3d525f),'\x20Token]');return{'text':_0x1191c7,'originalTokens':_0x4dc4ff,'compressedTokens':_0x9b1d02['VzYuU'](countTokens,_0x1191c7),'wasTruncated':!0x0};}function _0x2656(_0x1bf555,_0x226734){_0x1bf555=_0x1bf555-0x12a;const _0x447fff=_0x447f();let _0x265696=_0x447fff[_0x1bf555];return _0x265696;}function _0x447f(){const _0x3f8e18=['length','GXpvX','zSRUw','split','30162dhgvom','1301587rnTpbJ','MCnCC','50433wXelTx','1733244uINSKQ','1850270hkvlYC','714880HGYxGd','map','floor','9HXErrE','28NmDtGN','\x0a\x0a[...\x20gekuerzt,\x20','pGAdV','10zlGUTt','1890600qzEGpP'];_0x447f=function(){return _0x3f8e18;};return _0x447f();}export function compressContextBudget(_0x125162,_0x57e4bb){const _0x4f193e=_0x2656,_0x3c6659={'CeKnO':function(_0x168c9c,_0x89d533){return _0x168c9c/_0x89d533;}},_0x20fbe5=Math[_0x4f193e(0x12b)](_0x3c6659['CeKnO'](_0x57e4bb,Math['max'](_0x125162[_0x4f193e(0x132)],0x1)));return _0x125162[_0x4f193e(0x12a)](({label:_0x2e63f1,text:_0x3f7c69})=>({'label':_0x2e63f1,'result':compressContext(_0x3f7c69,_0x20fbe5)}));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x44d7(_0x3ada54,_0x2a14fd){_0x3ada54=_0x3ada54-0x79;const _0x71af5b=_0x71af();let _0x44d759=_0x71af5b[_0x3ada54];return _0x44d759;}function _0x71af(){const _0x3f93bc=['COZlw','6249324vewTAF','user','handlePreCompact','3041973auCQAM','push','record',']\x20Fuer\x20Details:\x20','engine','trigger','handleSessionStop',']\x20Relevanter\x20Kontext:\x20','\x20laden.','summary_only','prompt','xIeoT','448672Zwwods','VPUdU','session-','5PtBssT','collector','8101824XoccZn','max_file_tokens','hook_event_name','84729ZqOoTp','\x20Token)','handleUserPromptSubmit','limits','totalOriginalTokens','4iyRQcb','580599sqYHch','compress_above','content','84LdbrCa','min','prioritized','23451600MdYhYs'];_0x71af=function(){return _0x3f93bc;};return _0x71af();}const _0xaf21b7=_0x44d7;(function(_0x18541c,_0x2757c0){const _0x3b2b7d=_0x44d7,_0x2127c7=_0x18541c();while(!![]){try{const _0x91c037=-parseInt(_0x3b2b7d(0x82))/0x1+-parseInt(_0x3b2b7d(0x81))/0x2*(parseInt(_0x3b2b7d(0x7c))/0x3)+-parseInt(_0x3b2b7d(0x8a))/0x4*(-parseInt(_0x3b2b7d(0x9c))/0x5)+-parseInt(_0x3b2b7d(0x85))/0x6*(-parseInt(_0x3b2b7d(0x99))/0x7)+parseInt(_0x3b2b7d(0x79))/0x8+parseInt(_0x3b2b7d(0x8d))/0x9+-parseInt(_0x3b2b7d(0x88))/0xa;if(_0x91c037===_0x2757c0)break;else _0x2127c7['push'](_0x2127c7['shift']());}catch(_0xdcd4dd){_0x2127c7['push'](_0x2127c7['shift']());}}}(_0x71af,0xca2fb));import{RuleEngine}from'./rule-engine.js';import{MetricsCollector}from'./metrics-collector.js';import{compressContext}from'./context-compressor.js';import{prioritizeContext}from'./precompact-handler.js';import{countTokens}from'../shared/token-counter.js';export class HookDispatcher{[_0xaf21b7(0x91)];[_0xaf21b7(0x9d)];['projectRoot'];constructor(_0x354aeb,_0xa0e634,_0x14cf9e){const _0x29e883=_0xaf21b7;this[_0x29e883(0x91)]=new RuleEngine(_0x354aeb),this['projectRoot']=_0xa0e634,this['collector']=new MetricsCollector(_0xa0e634,_0x14cf9e||_0x29e883(0x9b)+Date['now']());}[_0xaf21b7(0x7e)](_0x1107f3){const _0x433341=_0xaf21b7,_0x2a06aa={'MXRAR':function(_0x48ed73,_0x3dc7fe){return _0x48ed73>_0x3dc7fe;},'VPUdU':function(_0x1d3ad7,_0x5099fa,_0x53d02a){return _0x1d3ad7(_0x5099fa,_0x53d02a);},'XEhLT':function(_0x357a32,_0x346371){return _0x357a32(_0x346371);}},_0x4e4d45=_0x1107f3['prompt']||'',_0x4b184c=this[_0x433341(0x91)]['match'](_0x4e4d45);if(0x0===_0x4b184c['length']){const _0x1af2e4=countTokens(_0x4e4d45);return this['collector']['record']({'hook_event':_0x1107f3[_0x433341(0x7b)],'baseline_tokens':_0x1af2e4,'optimized_tokens':_0x1af2e4,'rule_matched':null}),{};}const _0x382533=[],_0x380f50=[];for(const _0x3db899 of _0x4b184c)_0x380f50[_0x433341(0x8e)](_0x3db899['trigger'][0x0]),_0x3db899[_0x433341(0x96)]?_0x382533['push']('['+_0x3db899[_0x433341(0x92)][0x0]+_0x433341(0x90)+_0x3db899['load']+_0x433341(0x95)):_0x382533['push']('['+_0x3db899['trigger'][0x0]+_0x433341(0x94)+_0x3db899['load']+'\x20(max\x20'+(_0x3db899['max_tokens']||this['engine']['limits'][_0x433341(0x7a)])+_0x433341(0x7d));let _0x1d215a=_0x382533['join']('\x0a');const _0x2500e9=this['engine']['limits'][_0x433341(0x83)];_0x2a06aa['MXRAR'](_0x2500e9,0x0)&&(_0x1d215a=_0x2a06aa[_0x433341(0x9a)](compressContext,_0x1d215a,_0x2500e9)['text']);const _0x327964=countTokens(_0x4e4d45),_0x290149=_0x2a06aa['XEhLT'](countTokens,_0x1d215a),_0x45f8bd=_0x327964+this['engine']['limits']['max_injected_tokens'],_0x452f68=_0x327964+Math[_0x433341(0x86)](_0x290149,this[_0x433341(0x91)][_0x433341(0x7f)]['max_injected_tokens']);return this[_0x433341(0x9d)]['record']({'hook_event':_0x1107f3['hook_event_name'],'baseline_tokens':_0x45f8bd,'optimized_tokens':_0x452f68,'rule_matched':_0x380f50['join']('+')}),{'additionalContext':_0x1d215a};}[_0xaf21b7(0x8c)](_0x218f8a){const _0x1e1bae=_0xaf21b7,_0x27dadd={'COZlw':_0x1e1bae(0x8b),'xIeoT':function(_0x331b53,_0x403556,_0x21be15){return _0x331b53(_0x403556,_0x21be15);}},_0x4e1737=[];if(_0x218f8a[_0x1e1bae(0x97)]&&_0x4e1737['push']({'role':_0x27dadd[_0x1e1bae(0x89)],'content':_0x218f8a[_0x1e1bae(0x97)],'turnIndex':0x0}),0x0===_0x4e1737['length'])return{};const _0xa92ea8=_0x27dadd[_0x1e1bae(0x98)](prioritizeContext,_0x4e1737,this[_0x1e1bae(0x91)][_0x1e1bae(0x7f)]),_0x245b9b=_0xa92ea8[_0x1e1bae(0x87)]['map'](_0x5cdb03=>_0x5cdb03[_0x1e1bae(0x84)])['join']('\x0a\x0a');return this['collector'][_0x1e1bae(0x8f)]({'hook_event':_0x218f8a['hook_event_name'],'baseline_tokens':_0xa92ea8[_0x1e1bae(0x80)],'optimized_tokens':_0xa92ea8['totalCompressedTokens'],'rule_matched':null}),{'additionalContext':_0x245b9b};}[_0xaf21b7(0x93)](){const _0x94ff5c=_0xaf21b7;return this[_0x94ff5c(0x9d)]['flush'](),this[_0x94ff5c(0x9d)]['getSummary']();}['getSessionSummary'](){return this['collector']['getSummary']();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x22d64e=_0x4c32;(function(_0x45a1fa,_0x31cd83){const _0x42fc8e=_0x4c32,_0x50ba17=_0x45a1fa();while(!![]){try{const _0x4df140=-parseInt(_0x42fc8e(0x19d))/0x1*(-parseInt(_0x42fc8e(0x1a3))/0x2)+parseInt(_0x42fc8e(0x19a))/0x3+parseInt(_0x42fc8e(0x1a2))/0x4+-parseInt(_0x42fc8e(0x19f))/0x5*(-parseInt(_0x42fc8e(0x1a0))/0x6)+-parseInt(_0x42fc8e(0x198))/0x7*(-parseInt(_0x42fc8e(0x1aa))/0x8)+parseInt(_0x42fc8e(0x1ab))/0x9+-parseInt(_0x42fc8e(0x19b))/0xa;if(_0x4df140===_0x31cd83)break;else _0x50ba17['push'](_0x50ba17['shift']());}catch(_0xb29c5b){_0x50ba17['push'](_0x50ba17['shift']());}}}(_0x1c53,0x252b1));export function buildMeterPayload(_0x445041,_0xee6c6){const _0x4dd481=_0x4c32;return{'session_id':_0x445041[_0x4dd481(0x1a4)],'tokens_saved':_0x445041['total_delta'],'baseline_tokens':_0x445041[_0x4dd481(0x1a7)],'optimized_tokens':_0x445041[_0x4dd481(0x1a1)],'hook_event':_0x4dd481(0x1ac),'provider':_0xee6c6[_0x4dd481(0x1a5)],'model':_0xee6c6['model'],'team_id':_0xee6c6['team_id']??''};}function _0x4c32(_0x4eb378,_0x123319){_0x4eb378=_0x4eb378-0x198;const _0x1c53a7=_0x1c53();let _0x4c32e0=_0x1c53a7[_0x4eb378];return _0x4c32e0;}function _0x1c53(){const _0x2dfd21=['endpoint','34329sjUCWb','6510640LsEjHG','wUAee','68441SmjNwg','Bearer\x20','512915IywTRP','12UzsMnn','total_optimized','369572bPTRhk','2bISeXt','session_id','provider','status','total_baseline','application/json','http_','40VcFNnw','2066373tvoICk','Stop','timeout','stringify','274771ZcbtAZ'];_0x1c53=function(){return _0x2dfd21;};return _0x1c53();}export class MeteringClient{[_0x22d64e(0x199)];constructor(_0x10396c){this['endpoint']=_0x10396c;}async['send'](_0x23bd4f){const _0x2666ee=_0x22d64e,_0xdb62ed={'sYGYa':'no_endpoint','wUAee':'POST','KCOPh':'network_error'};if(!this[_0x2666ee(0x199)])return{'sent':!0x1,'reason':_0xdb62ed['sYGYa']};try{const _0x8e5752=await fetch(this['endpoint'],{'method':_0xdb62ed[_0x2666ee(0x19c)],'headers':{'Content-Type':_0x2666ee(0x1a8),'Authorization':_0x2666ee(0x19e)+(process.env.TOKENIZER_API_KEY||'')},'body':JSON[_0x2666ee(0x1ae)](_0x23bd4f),'signal':AbortSignal[_0x2666ee(0x1ad)](0x1388)});return _0x8e5752['ok']?{'sent':!0x0}:{'sent':!0x1,'reason':_0x2666ee(0x1a9)+_0x8e5752[_0x2666ee(0x1a6)]};}catch{return{'sent':!0x1,'reason':_0xdb62ed['KCOPh']};}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x48cae1=_0x3518;(function(_0x3b5576,_0x3e3e14){const _0x3f0fb5=_0x3518,_0x16e71e=_0x3b5576();while(!![]){try{const _0x4812bd=-parseInt(_0x3f0fb5(0x75))/0x1+-parseInt(_0x3f0fb5(0x84))/0x2+parseInt(_0x3f0fb5(0x72))/0x3+-parseInt(_0x3f0fb5(0x7f))/0x4+-parseInt(_0x3f0fb5(0x73))/0x5+-parseInt(_0x3f0fb5(0x70))/0x6*(-parseInt(_0x3f0fb5(0x74))/0x7)+parseInt(_0x3f0fb5(0x87))/0x8*(parseInt(_0x3f0fb5(0x7d))/0x9);if(_0x4812bd===_0x3e3e14)break;else _0x16e71e['push'](_0x16e71e['shift']());}catch(_0x3a66f3){_0x16e71e['push'](_0x16e71e['shift']());}}}(_0x2e62,0xc32d7));import{mkdirSync,writeFileSync}from'node:fs';function _0x2e62(){const _0x270e40=['317802VCILVJ','.tokenizer-speedup','1219731seVTrW','415820UQxrjV','203nURELa','1112798XULKNu','push','projectRoot','optimized_tokens','baseline_tokens','.json','metrics','length','2395746oRLMlJ','hook_event','3655320WPgyrf','stringify','rule_matched','startedAt','EGSpU','728702SIyMpx','reduce','DktBI','40eHCEDv','toISOString'];_0x2e62=function(){return _0x270e40;};return _0x2e62();}function _0x3518(_0x471e7f,_0x425433){_0x471e7f=_0x471e7f-0x70;const _0x2e62f4=_0x2e62();let _0x351814=_0x2e62f4[_0x471e7f];return _0x351814;}import{join}from'node:path';const METRICS_DIR=_0x48cae1(0x71);export class MetricsCollector{[_0x48cae1(0x7b)]=[];['sessionId'];[_0x48cae1(0x77)];['startedAt'];constructor(_0x5748b9,_0x56fba1){const _0x243c2f=_0x48cae1;this['projectRoot']=_0x5748b9,this['sessionId']=_0x56fba1,this[_0x243c2f(0x82)]=new Date()[_0x243c2f(0x88)]();}['record'](_0x2af63e){const _0x4f901b=_0x48cae1;this[_0x4f901b(0x7b)][_0x4f901b(0x76)]({'session_id':this['sessionId'],'timestamp':new Date()[_0x4f901b(0x88)](),'hook_event':_0x2af63e[_0x4f901b(0x7e)],'baseline_tokens':_0x2af63e[_0x4f901b(0x79)],'optimized_tokens':_0x2af63e['optimized_tokens'],'delta':_0x2af63e[_0x4f901b(0x79)]-_0x2af63e[_0x4f901b(0x78)],'rule_matched':_0x2af63e[_0x4f901b(0x81)]});}['getMetrics'](){return[...this['metrics']];}['getSummary'](){const _0x19460d=_0x48cae1,_0x40264d={'mLEkp':function(_0x4ae38f,_0x4457e2){return _0x4ae38f*_0x4457e2;},'VyhwJ':function(_0x101899,_0x262e38){return _0x101899/_0x262e38;}},_0x51cdde=this[_0x19460d(0x7b)]['reduce']((_0x476d98,_0x436a23)=>_0x476d98+_0x436a23['baseline_tokens'],0x0),_0x224607=this[_0x19460d(0x7b)][_0x19460d(0x85)]((_0x24d1bb,_0x35af17)=>_0x24d1bb+_0x35af17['optimized_tokens'],0x0),_0x53fda8=_0x51cdde-_0x224607,_0x3b8831={};for(const _0x796e6f of this[_0x19460d(0x7b)])_0x796e6f[_0x19460d(0x81)]&&(_0x3b8831[_0x796e6f[_0x19460d(0x81)]]=(_0x3b8831[_0x796e6f[_0x19460d(0x81)]]||0x0)+0x1);return{'session_id':this['sessionId'],'started_at':this[_0x19460d(0x82)],'ended_at':new Date()[_0x19460d(0x88)](),'total_baseline':_0x51cdde,'total_optimized':_0x224607,'total_delta':_0x53fda8,'savings_percent':_0x51cdde>0x0?_0x40264d['mLEkp'](_0x40264d['VyhwJ'](_0x53fda8,_0x51cdde),0x64):0x0,'prompts_count':this['metrics'][_0x19460d(0x7c)],'rules_triggered':_0x3b8831};}['flush'](){const _0x294be7=_0x48cae1,_0x4cd792={'MUsqX':function(_0x135a78,_0x27008f,_0x33f2df){return _0x135a78(_0x27008f,_0x33f2df);},'EGSpU':function(_0x4e7420,_0x389709,_0xc3f316,_0x249457){return _0x4e7420(_0x389709,_0xc3f316,_0x249457);},'DktBI':function(_0x917c0e,_0x22de49,_0x1fdf45){return _0x917c0e(_0x22de49,_0x1fdf45);}},_0xaf65c7=_0x4cd792['MUsqX'](join,this[_0x294be7(0x77)],METRICS_DIR);_0x4cd792['MUsqX'](mkdirSync,_0xaf65c7,{'recursive':!0x0});const _0x110b28={'metrics':this[_0x294be7(0x7b)],'summary':this['getSummary']()};_0x4cd792[_0x294be7(0x83)](writeFileSync,_0x4cd792[_0x294be7(0x86)](join,_0xaf65c7,this['sessionId']+_0x294be7(0x7a)),JSON[_0x294be7(0x80)](_0x110b28,null,0x2),'utf-8');}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xb9c682,_0x1f69e0){const _0x440248=_0x50d8,_0x2b8dc1=_0xb9c682();while(!![]){try{const _0xa3f58e=-parseInt(_0x440248(0x12c))/0x1*(parseInt(_0x440248(0x12e))/0x2)+-parseInt(_0x440248(0x11a))/0x3*(-parseInt(_0x440248(0x128))/0x4)+parseInt(_0x440248(0x131))/0x5+-parseInt(_0x440248(0x129))/0x6+parseInt(_0x440248(0x12d))/0x7*(-parseInt(_0x440248(0x12b))/0x8)+parseInt(_0x440248(0x120))/0x9*(-parseInt(_0x440248(0x134))/0xa)+parseInt(_0x440248(0x126))/0xb;if(_0xa3f58e===_0x1f69e0)break;else _0x2b8dc1['push'](_0x2b8dc1['shift']());}catch(_0x427943){_0x2b8dc1['push'](_0x2b8dc1['shift']());}}}(_0x237d,0xe7b17));function _0x237d(){const _0x30cbfa=['292bdgAFW','4632540ZZcxWe','isDirectory','9627032rLGDdW','26701zIglSA','7EvAgLn','2awstdc','error','docs/lessons-learned','4778955DXCfYL','features/*.md','architecture','20TzLDru','25791FagDuw','feature','design','ILqSO','decisions/*.md','vwzgm','736083PhVZue','docsDir','jPmNZ','docs','XiIFD','problem','16845257XkUlzy','refactor'];_0x237d=function(){return _0x30cbfa;};return _0x237d();}import{existsSync,readdirSync}from'node:fs';import{join}from'node:path';function _0x50d8(_0x2938ce,_0x406586){_0x2938ce=_0x2938ce-0x11a;const _0x237de5=_0x237d();let _0x50d8ed=_0x237de5[_0x2938ce];return _0x50d8ed;}import _0x15d121 from'js-yaml';export function detectProjectDocs(_0x7b4561){const _0xa678a0=_0x50d8,_0x151698={'fhKFq':function(_0x500226,_0x418ae0,_0x7b72cd){return _0x500226(_0x418ae0,_0x7b72cd);},'XiIFD':function(_0x366c02,_0x20d5ee){return _0x366c02(_0x20d5ee);},'dOOSE':function(_0x42f67e,_0x3ccd07){return _0x42f67e(_0x3ccd07);},'Wrina':function(_0x22b4df,_0x300a13,_0xb0a656){return _0x22b4df(_0x300a13,_0xb0a656);},'ILqSO':'CLAUDE.md'},_0xeeedeb=_0x151698['fhKFq'](join,_0x7b4561,_0xa678a0(0x123)),_0x2e7888=_0x151698[_0xa678a0(0x124)](existsSync,_0xeeedeb),_0x1fd4d4=_0x151698['dOOSE'](existsSync,_0x151698['Wrina'](join,_0x7b4561,_0x151698[_0xa678a0(0x11d)])),_0x1e9efc=existsSync(_0x151698['fhKFq'](join,_0x7b4561,_0xa678a0(0x130)));let _0x2419eb=[];if(_0x2e7888)try{_0x2419eb=_0x151698['Wrina'](readdirSync,_0xeeedeb,{'withFileTypes':!0x0})['filter'](_0x529aa5=>_0x529aa5[_0xa678a0(0x12a)]())['map'](_0x356b6c=>_0x356b6c['name']);}catch{}return{'hasDocsDir':_0x2e7888,'hasClaudeMd':_0x1fd4d4,'hasLessonsLearned':_0x1e9efc,'docSubdirs':_0x2419eb};}export function generateDefaultConfig(_0x8da5c1){const _0x34ac9b=_0x50d8,_0x2b3431={'vwzgm':'fix','BzIzU':'bug','WVFhC':_0x34ac9b(0x12f),'jPmNZ':_0x34ac9b(0x11c),'QmBul':'requirement','AlZne':'https://api.simosphereai.com/v1/meter'},_0x4fd36f={'version':0x1,'rules':[{'trigger':[_0x2b3431[_0x34ac9b(0x11f)],_0x2b3431['BzIzU'],_0x2b3431['WVFhC'],_0x34ac9b(0x125)],'load':_0x8da5c1['docsDir']+'lessons-learned/*.md','max_tokens':0x7d0,'summary_only':!0x1},{'trigger':[_0x2b3431[_0x34ac9b(0x122)],_0x34ac9b(0x133),_0x34ac9b(0x127)],'load':_0x8da5c1[_0x34ac9b(0x121)]+_0x34ac9b(0x11e),'max_tokens':0xbb8,'summary_only':!0x0},{'trigger':[_0x34ac9b(0x11b),'spec',_0x2b3431['QmBul']],'load':_0x8da5c1[_0x34ac9b(0x121)]+_0x34ac9b(0x132),'max_tokens':0xbb8,'summary_only':!0x0}],'context_limits':{'max_injected_tokens':0x1f40,'max_file_tokens':0xfa0,'compress_above':0xbb8},'metering':{'endpoint':_0x2b3431['AlZne'],'batch_interval':0x3c,'send_content':!0x1}};return _0x15d121['dump'](_0x4fd36f,{'lineWidth':0x78});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x2a3d(){const _0x559ae7=['1298094veVBdA','64475389uIgVGg','role','ikjOr','turnIndex','result','sort','content','push','264036sFvhPU','126vqFhmG','map','2127094mDLsLx','filter','hlbwu','5901288XJXCAV','834360goCbOv','system','1VyvAnR','compressedTokens','wasTruncated','length','tfVlm','4396248PKZpZb','10AIDLzQ','slice','originalTokens','64UccSfc'];_0x2a3d=function(){return _0x559ae7;};return _0x2a3d();}function _0x5ef0(_0x17c018,_0x5d85ca){_0x17c018=_0x17c018-0x9a;const _0x2a3d07=_0x2a3d();let _0x5ef0ca=_0x2a3d07[_0x17c018];return _0x5ef0ca;}(function(_0x520a2e,_0x3c7ab6){const _0x4f89d5=_0x5ef0,_0x498074=_0x520a2e();while(!![]){try{const _0x540340=parseInt(_0x4f89d5(0xa2))/0x1*(parseInt(_0x4f89d5(0x9c))/0x2)+parseInt(_0x4f89d5(0xa7))/0x3+parseInt(_0x4f89d5(0x9f))/0x4+parseInt(_0x4f89d5(0xa8))/0x5*(parseInt(_0x4f89d5(0xb5))/0x6)+-parseInt(_0x4f89d5(0xac))/0x7*(-parseInt(_0x4f89d5(0xab))/0x8)+-parseInt(_0x4f89d5(0x9a))/0x9*(-parseInt(_0x4f89d5(0xa0))/0xa)+-parseInt(_0x4f89d5(0xad))/0xb;if(_0x540340===_0x3c7ab6)break;else _0x498074['push'](_0x498074['shift']());}catch(_0x434af8){_0x498074['push'](_0x498074['shift']());}}}(_0x2a3d,0xd776a));import{compressContextBudget}from'./context-compressor.js';import{countTokens}from'../shared/token-counter.js';export function prioritizeContext(_0x479ad2,_0x49ed59,_0x49acca=0x4){const _0x1b0eef=_0x5ef0,_0x3ddeb8={'ikjOr':function(_0x3d05ba,_0x5f29f9){return _0x3d05ba(_0x5f29f9);},'ezvdf':function(_0x4abcca,_0x108dee){return _0x4abcca>_0x108dee;},'IVDal':function(_0x4871d6,_0xf836c4){return _0x4871d6-_0xf836c4;},'tfVlm':function(_0x5a3ceb,_0x4986b1){return _0x5a3ceb>_0x4986b1;},'hlbwu':function(_0x34feed,_0x3fe2d3){return _0x34feed<_0x3fe2d3;},'DCisj':function(_0x2fb110,_0x4f6569){return _0x2fb110>_0x4f6569;}};if(0x0===_0x479ad2[_0x1b0eef(0xa5)])return{'prioritized':[],'totalOriginalTokens':0x0,'totalCompressedTokens':0x0,'segmentsDropped':0x0};const _0x4b6656=_0x49ed59['max_injected_tokens'],_0x214b8b=_0x479ad2[_0x1b0eef(0x9d)](_0x510f6d=>_0x1b0eef(0xa1)===_0x510f6d[_0x1b0eef(0xae)]),_0x56497c=_0x479ad2[_0x1b0eef(0x9d)](_0x5e4784=>_0x1b0eef(0xa1)!==_0x5e4784['role']),_0x199c15=Math['max'](0x0,_0x56497c['length']-_0x49acca),_0x1339f6=_0x56497c['slice'](_0x199c15),_0x314424=_0x56497c[_0x1b0eef(0xa9)](0x0,_0x199c15),_0x27a98f=[];let _0xc769f1=0x0,_0x56f405=0x0,_0x562693=0x0;for(const _0x476a23 of _0x214b8b){const _0x48cb1e=countTokens(_0x476a23['content']);_0xc769f1+=_0x48cb1e,_0x56f405+=_0x48cb1e,_0x27a98f[_0x1b0eef(0xb4)]({'role':_0x476a23[_0x1b0eef(0xae)],'content':_0x476a23[_0x1b0eef(0xb3)],'turnIndex':_0x476a23[_0x1b0eef(0xb0)],'compressed':!0x1});}for(const _0x28de95 of _0x1339f6){const _0x13128f=_0x3ddeb8[_0x1b0eef(0xaf)](countTokens,_0x28de95[_0x1b0eef(0xb3)]);_0xc769f1+=_0x13128f,_0x56f405+=_0x13128f,_0x27a98f['push']({'role':_0x28de95['role'],'content':_0x28de95[_0x1b0eef(0xb3)],'turnIndex':_0x28de95[_0x1b0eef(0xb0)],'compressed':!0x1});}if(_0x3ddeb8['ezvdf'](_0x314424[_0x1b0eef(0xa5)],0x0)){const _0x4284cc=_0x56f405,_0x3882e0=Math['max'](0x0,_0x3ddeb8['IVDal'](_0x4b6656,_0x4284cc));if(_0x3ddeb8[_0x1b0eef(0xa6)](_0x3882e0,0x0)){const _0x1aa10a=_0x314424[_0x1b0eef(0x9b)](_0x31348d=>({'label':'turn-'+_0x31348d[_0x1b0eef(0xb0)],'text':_0x31348d['content']})),_0x37b920=compressContextBudget(_0x1aa10a,_0x3882e0);for(let _0x593c96=0x0;_0x3ddeb8[_0x1b0eef(0x9e)](_0x593c96,_0x314424['length']);_0x593c96++){const _0x52f7b8=_0x314424[_0x593c96],_0x4a4e30=_0x37b920[_0x593c96][_0x1b0eef(0xb1)];_0xc769f1+=_0x4a4e30[_0x1b0eef(0xaa)],_0x3ddeb8['DCisj'](_0x4a4e30[_0x1b0eef(0xa3)],0x0)?(_0x56f405+=_0x4a4e30[_0x1b0eef(0xa3)],_0x27a98f[_0x1b0eef(0xb4)]({'role':_0x52f7b8[_0x1b0eef(0xae)],'content':_0x4a4e30['text'],'turnIndex':_0x52f7b8['turnIndex'],'compressed':_0x4a4e30[_0x1b0eef(0xa4)]})):(_0x562693++,_0xc769f1+=0x0);}}else{for(const _0x25b54c of _0x314424)_0xc769f1+=_0x3ddeb8['ikjOr'](countTokens,_0x25b54c[_0x1b0eef(0xb3)]),_0x562693++;}}return _0x27a98f[_0x1b0eef(0xb2)]((_0x211b9c,_0x19f4f0)=>_0x211b9c[_0x1b0eef(0xb0)]-_0x19f4f0[_0x1b0eef(0xb0)]),{'prioritized':_0x27a98f,'totalOriginalTokens':_0xc769f1,'totalCompressedTokens':_0x56f405,'segmentsDropped':_0x562693};}
|
package/dist/plugin/report.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x4516(_0x20169e,_0x2da73a){_0x20169e=_0x20169e-0x18a;const _0x46ca11=_0x46ca();let _0x451664=_0x46ca11[_0x20169e];return _0x451664;}const _0x50b736=_0x4516;(function(_0x23457c,_0x54a727){const _0x1f5b4e=_0x4516,_0x233362=_0x23457c();while(!![]){try{const _0x4f83ac=parseInt(_0x1f5b4e(0x18d))/0x1+-parseInt(_0x1f5b4e(0x18e))/0x2*(-parseInt(_0x1f5b4e(0x194))/0x3)+-parseInt(_0x1f5b4e(0x190))/0x4+-parseInt(_0x1f5b4e(0x19a))/0x5+parseInt(_0x1f5b4e(0x192))/0x6*(-parseInt(_0x1f5b4e(0x199))/0x7)+-parseInt(_0x1f5b4e(0x19c))/0x8+parseInt(_0x1f5b4e(0x193))/0x9;if(_0x4f83ac===_0x54a727)break;else _0x233362['push'](_0x233362['shift']());}catch(_0x4e6d6b){_0x233362['push'](_0x233362['shift']());}}}(_0x46ca,0xf26bd));import{readdirSync,readFileSync}from'node:fs';import{join}from'node:path';const METRICS_DIR=_0x50b736(0x191),COST_PER_MILLION_TOKENS=0x3;function _0x46ca(){const _0x17c55b=['12QaGkVs','summary','parse','reduce','sort','144557bpgrWe','1902285jKZeNy','utf-8','2777840jbgkLh','total_baseline','prompts_count','total_optimized','length','entries','1352684TATtCQ','352046fXwqQZ','map','1855128rnqDGd','.tokenizer-speedup','570XHzXXN','18805455cACtgh'];_0x46ca=function(){return _0x17c55b;};return _0x46ca();}export function generateReport(_0x540796){const _0x275002=_0x50b736,_0x9582b7={'KUErO':function(_0xa06b3b,_0x3fb743){return _0xa06b3b+_0x3fb743;},'XxSpO':function(_0x52b274,_0x4477db){return _0x52b274*_0x4477db;}},_0x27e622=join(_0x540796,METRICS_DIR),_0x10ba9a=readdirSync(_0x27e622)['filter'](_0x13f036=>_0x13f036['endsWith']('.json'))['map'](_0x4edd52=>JSON[_0x275002(0x196)](readFileSync(join(_0x27e622,_0x4edd52),_0x275002(0x19b)))[_0x275002(0x195)]),_0x56be41=_0x10ba9a['reduce']((_0x5b5f4e,_0x46f977)=>_0x5b5f4e+_0x46f977[_0x275002(0x19d)],0x0),_0x314d4f=_0x10ba9a['reduce']((_0x877e91,_0x254ebf)=>_0x877e91+_0x254ebf[_0x275002(0x18a)],0x0),_0x544fdb=_0x56be41-_0x314d4f,_0x432132={};for(const _0xee58cf of _0x10ba9a)for(const [_0x16c831,_0x2e0aa5]of Object[_0x275002(0x18c)](_0xee58cf['rules_triggered']))_0x432132[_0x16c831]=_0x9582b7['KUErO'](_0x432132[_0x16c831]||0x0,_0x2e0aa5);const _0x8cbecb=_0x10ba9a[_0x275002(0x18f)](_0x35450f=>_0x35450f['started_at'])[_0x275002(0x198)]();return{'sessions_count':_0x10ba9a[_0x275002(0x18b)],'total_baseline':_0x56be41,'total_optimized':_0x314d4f,'total_delta':_0x544fdb,'savings_percent':_0x56be41>0x0?_0x544fdb/_0x56be41*0x64:0x0,'total_prompts':_0x10ba9a[_0x275002(0x197)]((_0x47aa19,_0x536e0b)=>_0x47aa19+_0x536e0b[_0x275002(0x19e)],0x0),'rules_triggered':_0x432132,'estimated_cost_saved_usd':_0x9582b7['XxSpO'](_0x544fdb/0xf4240,0x3),'period_start':_0x8cbecb[0x0]||'','period_end':_0x8cbecb[_0x8cbecb['length']-0x1]||''};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2c7983,_0x5f230c){const _0x495683=_0x1aa0,_0x16e55c=_0x2c7983();while(!![]){try{const _0x3eb523=-parseInt(_0x495683(0x16f))/0x1+-parseInt(_0x495683(0x161))/0x2+-parseInt(_0x495683(0x163))/0x3+-parseInt(_0x495683(0x170))/0x4*(parseInt(_0x495683(0x169))/0x5)+parseInt(_0x495683(0x16a))/0x6*(parseInt(_0x495683(0x16c))/0x7)+-parseInt(_0x495683(0x168))/0x8*(-parseInt(_0x495683(0x162))/0x9)+-parseInt(_0x495683(0x164))/0xa*(-parseInt(_0x495683(0x165))/0xb);if(_0x3eb523===_0x5f230c)break;else _0x16e55c['push'](_0x16e55c['shift']());}catch(_0x1de1a9){_0x16e55c['push'](_0x16e55c['shift']());}}}(_0x590e,0xd8d57));import{RuleAnalytics}from'./rule-analytics.js';function _0x590e(){const _0x1b3edc=['PvAzT','3391714lWiUIf','9MLZRbR','3434169uARZAT','10fmTErT','41764558tcJkUR','recordFire','totalTokensSaved','9787432viulcP','7489475uOgZYp','5268cVMkJx','rule','10409wzjNja','map','round','1099167ncWNac','4SFwJxW','stringify','pDeNx','fires'];_0x590e=function(){return _0x1b3edc;};return _0x590e();}export function serializeAnalytics(_0x22657b){const _0x5b87d4=_0x1aa0,_0x7db432=_0x22657b['getRanking']()[_0x5b87d4(0x16d)](_0x4ca8f7=>({'rule':_0x4ca8f7[_0x5b87d4(0x16b)],'fires':_0x4ca8f7['fires'],'totalTokensSaved':_0x4ca8f7[_0x5b87d4(0x167)]}));return JSON[_0x5b87d4(0x171)](_0x7db432);}function _0x1aa0(_0x22ed56,_0x26d913){_0x22ed56=_0x22ed56-0x15e;const _0x590ee9=_0x590e();let _0x1aa0cd=_0x590ee9[_0x22ed56];return _0x1aa0cd;}export function deserializeAnalytics(_0x3b8b97){const _0x209b7a=_0x1aa0,_0x277be6={'OHpZV':function(_0x3286b0,_0x345240){return _0x3286b0>_0x345240;},'PvAzT':function(_0x54bbfb,_0x2a63c9){return _0x54bbfb/_0x2a63c9;},'pDeNx':function(_0xf574ee,_0x1a65a9){return _0xf574ee<_0x1a65a9;}},_0x244d1f=new RuleAnalytics();try{const _0x10bb72=JSON['parse'](_0x3b8b97);for(const _0x18432e of _0x10bb72){const _0x33bad3=_0x277be6['OHpZV'](_0x18432e[_0x209b7a(0x15f)],0x0)?Math[_0x209b7a(0x16e)](_0x277be6[_0x209b7a(0x160)](_0x18432e[_0x209b7a(0x167)],_0x18432e[_0x209b7a(0x15f)])):0x0;for(let _0x5afab3=0x0;_0x277be6[_0x209b7a(0x15e)](_0x5afab3,_0x18432e[_0x209b7a(0x15f)]);_0x5afab3++)_0x244d1f[_0x209b7a(0x166)](_0x18432e[_0x209b7a(0x16b)],_0x33bad3);}}catch{}return _0x244d1f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x38be36=_0x3939;function _0x3939(_0xcc6cf1,_0x4905e1){_0xcc6cf1=_0xcc6cf1-0x159;const _0x1b4eef=_0x1b4e();let _0x393950=_0x1b4eef[_0xcc6cf1];return _0x393950;}function _0x1b4e(){const _0x3db0ae=['63BEsNQz','2146463SLqGRs','22074TofOAW','getStats','keys','fires','totalTokensSaved','188ZPpavY','818710fJRNoc','getRanking','497NWCPyY','10071YWODGZ','252400nDwkiy','from','SmIpA','recordFire','data','get','146035jiVyRx','6074bwwcCN','71swBSjy','avgTokensSaved'];_0x1b4e=function(){return _0x3db0ae;};return _0x1b4e();}(function(_0xb6865e,_0x386b0e){const _0x49825c=_0x3939,_0x304a27=_0xb6865e();while(!![]){try{const _0x2c10e0=-parseInt(_0x49825c(0x163))/0x1*(-parseInt(_0x49825c(0x162))/0x2)+-parseInt(_0x49825c(0x15a))/0x3*(-parseInt(_0x49825c(0x16c))/0x4)+parseInt(_0x49825c(0x161))/0x5+parseInt(_0x49825c(0x167))/0x6*(parseInt(_0x49825c(0x159))/0x7)+-parseInt(_0x49825c(0x15b))/0x8*(parseInt(_0x49825c(0x165))/0x9)+-parseInt(_0x49825c(0x16d))/0xa+-parseInt(_0x49825c(0x166))/0xb;if(_0x2c10e0===_0x386b0e)break;else _0x304a27['push'](_0x304a27['shift']());}catch(_0x587251){_0x304a27['push'](_0x304a27['shift']());}}}(_0x1b4e,0x28850));export class RuleAnalytics{['data']=new Map();[_0x38be36(0x15e)](_0x5e1051,_0x205fa4){const _0x49f9d0=_0x38be36,_0x2d3f87=this[_0x49f9d0(0x15f)][_0x49f9d0(0x160)](_0x5e1051)??{'fires':0x0,'totalTokensSaved':0x0};_0x2d3f87[_0x49f9d0(0x16a)]++,_0x2d3f87['totalTokensSaved']+=_0x205fa4,this[_0x49f9d0(0x15f)]['set'](_0x5e1051,_0x2d3f87);}[_0x38be36(0x168)](_0x3a6373){const _0x1fad48=_0x38be36,_0x47961b={'SmIpA':function(_0x5eeef1,_0x1ec308){return _0x5eeef1/_0x1ec308;}},_0x5cc41f=this['data']['get'](_0x3a6373);return _0x5cc41f?{'rule':_0x3a6373,'fires':_0x5cc41f[_0x1fad48(0x16a)],'totalTokensSaved':_0x5cc41f[_0x1fad48(0x16b)],'avgTokensSaved':Math['round'](_0x47961b[_0x1fad48(0x15d)](_0x5cc41f[_0x1fad48(0x16b)],_0x5cc41f['fires']))}:{'rule':_0x3a6373,'fires':0x0,'totalTokensSaved':0x0,'avgTokensSaved':0x0};}[_0x38be36(0x16e)](){const _0x4e7c75=_0x38be36;return Array[_0x4e7c75(0x15c)](this[_0x4e7c75(0x15f)][_0x4e7c75(0x169)]())['map'](_0x16be9b=>this['getStats'](_0x16be9b))['sort']((_0x4e6204,_0x502972)=>_0x502972[_0x4e7c75(0x164)]-_0x4e6204['avgTokensSaved']);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const _0x27785c=_0x5531;function _0x5531(_0x201c8b,_0x5e33a4){_0x201c8b=_0x201c8b-0x1e2;const _0x339fb4=_0x339f();let _0x553126=_0x339fb4[_0x201c8b];return _0x553126;}function _0x339f(){const _0xa4a715=['1236xklmte','2568534ofJrEO','4mJADlo','3078iCfFpP','toLowerCase','metering','limits','239011ZCqYDQ','3723210suwwyh','3867672Qmilgb','config','2969855lYKRwS','match','context_limits','some','1944180kePWov','rules'];_0x339f=function(){return _0xa4a715;};return _0x339f();}(function(_0x44ad46,_0x1286fd){const _0x192a48=_0x5531,_0x2f7ff4=_0x44ad46();while(!![]){try{const _0x14fcfb=parseInt(_0x192a48(0x1e9))/0x1*(parseInt(_0x192a48(0x1e4))/0x2)+-parseInt(_0x192a48(0x1e5))/0x3*(-parseInt(_0x192a48(0x1e2))/0x4)+parseInt(_0x192a48(0x1f1))/0x5+-parseInt(_0x192a48(0x1e3))/0x6+-parseInt(_0x192a48(0x1ed))/0x7+parseInt(_0x192a48(0x1eb))/0x8+-parseInt(_0x192a48(0x1ea))/0x9;if(_0x14fcfb===_0x1286fd)break;else _0x2f7ff4['push'](_0x2f7ff4['shift']());}catch(_0x50dc26){_0x2f7ff4['push'](_0x2f7ff4['shift']());}}}(_0x339f,0x61f9b));export class RuleEngine{[_0x27785c(0x1f2)];[_0x27785c(0x1e8)];[_0x27785c(0x1ec)];constructor(_0x55d1c4){const _0x4ff17d=_0x27785c;this['config']=_0x55d1c4,this['rules']=_0x55d1c4['rules'],this[_0x4ff17d(0x1e8)]=_0x55d1c4[_0x4ff17d(0x1ef)];}[_0x27785c(0x1ee)](_0x585cfa){const _0x5743d4=_0x27785c,_0x43a8f0=_0x585cfa[_0x5743d4(0x1e6)]();return this['rules']['filter'](_0x1aeb3d=>_0x1aeb3d['trigger'][_0x5743d4(0x1f0)](_0x487a5c=>_0x43a8f0['includes'](_0x487a5c[_0x5743d4(0x1e6)]())));}get['meteringConfig'](){const _0x108fd7=_0x27785c;return this[_0x108fd7(0x1ec)][_0x108fd7(0x1e7)];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x122b91,_0x4207bc){const _0x57756c=_0x2816,_0x95c96e=_0x122b91();while(!![]){try{const _0x2965fb=parseInt(_0x57756c(0x1f9))/0x1+parseInt(_0x57756c(0x1fd))/0x2+parseInt(_0x57756c(0x1f4))/0x3+parseInt(_0x57756c(0x204))/0x4+parseInt(_0x57756c(0x1ff))/0x5+parseInt(_0x57756c(0x1f7))/0x6*(-parseInt(_0x57756c(0x1fc))/0x7)+-parseInt(_0x57756c(0x1fa))/0x8*(parseInt(_0x57756c(0x1f6))/0x9);if(_0x2965fb===_0x4207bc)break;else _0x95c96e['push'](_0x95c96e['shift']());}catch(_0x2fdb64){_0x95c96e['push'](_0x95c96e['shift']());}}}(_0x59b8,0x74700));function _0x2816(_0x27399f,_0x2f608f){_0x27399f=_0x27399f-0x1f4;const _0x59b87b=_0x59b8();let _0x281612=_0x59b87b[_0x27399f];return _0x281612;}function _0x59b8(){const _0x44dcf1=['350TCkAbf','611032BoMChV','trigger','4574505dyewbO','fjeKd','load','isArray','max_tokens','124680EraPJi','rules','name','bundle\x20must\x20contain\x20rules\x20array','lBoXB','2619342RyRiAK','author','13194351xyrWBw','101982sNERnf','map','668116FdDCUq','8oCJRSa','invalid\x20YAML\x20structure'];_0x59b8=function(){return _0x44dcf1;};return _0x59b8();}import _0x93ac38 from'js-yaml';export function exportRuleBundle(_0x8919,_0x4b5054){const _0x2313ca=_0x2816,_0x1575e={'fjeKd':'custom-rules'},_0x3c35d5={'name':_0x4b5054[_0x2313ca(0x206)]??_0x1575e[_0x2313ca(0x200)],'author':_0x4b5054['author'],'description':_0x4b5054['description'],'rules':_0x8919};return _0x93ac38['dump'](_0x3c35d5,{'lineWidth':0x78});}export function importRuleBundle(_0x393f8a){const _0x3c23fc=_0x2816,_0xdae1a4={'wSvBS':'unknown'},_0x53b8f9=_0x93ac38['load'](_0x393f8a);return{'name':_0x53b8f9[_0x3c23fc(0x206)]??'imported','author':_0x53b8f9[_0x3c23fc(0x1f5)]??_0xdae1a4['wSvBS'],'description':_0x53b8f9['description']??'','rules':(_0x53b8f9[_0x3c23fc(0x205)]??[])[_0x3c23fc(0x1f8)](_0x21d16b=>({'trigger':_0x21d16b['trigger'],'load':_0x21d16b[_0x3c23fc(0x201)],'max_tokens':_0x21d16b[_0x3c23fc(0x203)],'summary_only':_0x21d16b['summary_only']}))};}export function validateRuleBundle(_0x52aab3){const _0x52d42f=_0x2816,_0x134052={'lBoXB':function(_0x57e595,_0x34eb4e){return _0x57e595!=_0x34eb4e;},'bpYUF':'invalid\x20YAML'};try{const _0xc9b9df=_0x93ac38['load'](_0x52aab3);if(!_0xc9b9df||_0x134052[_0x52d42f(0x208)]('object',typeof _0xc9b9df))return{'valid':!0x1,'error':_0x52d42f(0x1fb)};if(!Array['isArray'](_0xc9b9df[_0x52d42f(0x205)])||0x0===_0xc9b9df[_0x52d42f(0x205)]['length'])return{'valid':!0x1,'error':_0x52d42f(0x207)};for(const _0x56de6b of _0xc9b9df['rules'])if(!Array[_0x52d42f(0x202)](_0x56de6b[_0x52d42f(0x1fe)])||!_0x56de6b[_0x52d42f(0x201)])return{'valid':!0x1,'error':'each\x20rule\x20must\x20have\x20trigger\x20array\x20and\x20load\x20path'};return{'valid':!0x0};}catch{return{'valid':!0x1,'error':_0x134052['bpYUF']};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const _0x923316=_0x6e55;function _0x6e55(_0x4fd2aa,_0x2b673f){_0x4fd2aa=_0x4fd2aa-0x152;const _0x3d93fb=_0x3d93();let _0x6e558f=_0x3d93fb[_0x4fd2aa];return _0x6e558f;}(function(_0x5b78d6,_0x4a7a4f){const _0x47761f=_0x6e55,_0xd2b3da=_0x5b78d6();while(!![]){try{const _0x39dad4=-parseInt(_0x47761f(0x165))/0x1+-parseInt(_0x47761f(0x152))/0x2+-parseInt(_0x47761f(0x166))/0x3*(-parseInt(_0x47761f(0x161))/0x4)+parseInt(_0x47761f(0x163))/0x5*(parseInt(_0x47761f(0x15c))/0x6)+parseInt(_0x47761f(0x153))/0x7+parseInt(_0x47761f(0x154))/0x8+parseInt(_0x47761f(0x164))/0x9*(-parseInt(_0x47761f(0x155))/0xa);if(_0x39dad4===_0x4a7a4f)break;else _0xd2b3da['push'](_0xd2b3da['shift']());}catch(_0x593627){_0xd2b3da['push'](_0xd2b3da['shift']());}}}(_0x3d93,0xac695));function _0x3d93(){const _0x545be2=['filter','1583986djZlOd','7507304dPgDjq','856448sDFOjG','859970DIorwb','add','set','docs/','are','entries','map','1883304OuXhWF','the','this','and','for','257244kAHENQ','was','15EJYGOa','63nxSmGz','792743emPcJQ','36tCUooJ','get','sort','from','replace','trigger','toLowerCase','were'];_0x3d93=function(){return _0x545be2;};return _0x3d93();}const STOP_WORDS=new Set([_0x923316(0x15d),'a','an','is',_0x923316(0x159),_0x923316(0x162),_0x923316(0x16d),'be','been','to','of','in',_0x923316(0x160),'on','with','at','by',_0x923316(0x169),'it',_0x923316(0x15e),'that',_0x923316(0x15f),'or','but','not','no','i','my','me','we','our','you','your']);export function suggestRules(_0x1d8f02,_0x6235f0,_0x59a3be){const _0x663ece=_0x923316,_0x58882d={'aAzfG':function(_0x20fccd,_0x1f971d){return _0x20fccd<_0x1f971d;},'vtvKA':function(_0x239117,_0xe0f87e){return _0x239117+_0xe0f87e;}},_0x1d4fb4=new Set();for(const _0x4b1207 of _0x1d8f02)for(const _0x1a075f of _0x4b1207[_0x663ece(0x16b)])_0x1d4fb4[_0x663ece(0x156)](_0x1a075f[_0x663ece(0x16c)]());const _0x353fb3=new Map();for(const _0x1811d3 of _0x6235f0){const _0x284cf6=_0x1811d3[_0x663ece(0x16c)]()['split'](/\s+/);for(const _0x3e2bf5 of _0x284cf6){const _0x1831e1=_0x3e2bf5[_0x663ece(0x16a)](/[^a-z0-9-]/g,'');_0x58882d['aAzfG'](_0x1831e1['length'],0x3)||STOP_WORDS['has'](_0x1831e1)||_0x1d4fb4['has'](_0x1831e1)||_0x353fb3[_0x663ece(0x157)](_0x1831e1,_0x58882d['vtvKA'](_0x353fb3[_0x663ece(0x167)](_0x1831e1)??0x0,0x1));}}return Array['from'](_0x353fb3[_0x663ece(0x15a)]())[_0x663ece(0x16e)](([,_0x327add])=>_0x327add>=_0x59a3be)[_0x663ece(0x168)](([,_0x5dcc8d],[,_0x17b5f6])=>_0x17b5f6-_0x5dcc8d)[_0x663ece(0x15b)](([_0x1736b5,_0x1047e6])=>({'keyword':_0x1736b5,'frequency':_0x1047e6,'suggestedLoad':_0x663ece(0x158)+_0x1736b5+'/*.md'}));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x3029(_0x50360a,_0x5066d7){_0x50360a=_0x50360a-0xbb;const _0x33f319=_0x33f3();let _0x302936=_0x33f319[_0x50360a];return _0x302936;}(function(_0x27fd92,_0x39cd62){const _0x206284=_0x3029,_0x456516=_0x27fd92();while(!![]){try{const _0x3cc2a9=parseInt(_0x206284(0xc4))/0x1+parseInt(_0x206284(0xc8))/0x2+parseInt(_0x206284(0xc1))/0x3+-parseInt(_0x206284(0xc2))/0x4+-parseInt(_0x206284(0xbc))/0x5*(parseInt(_0x206284(0xcd))/0x6)+parseInt(_0x206284(0xc3))/0x7+-parseInt(_0x206284(0xbe))/0x8;if(_0x3cc2a9===_0x39cd62)break;else _0x456516['push'](_0x456516['shift']());}catch(_0x5ecc58){_0x456516['push'](_0x456516['shift']());}}}(_0x33f3,0x474f7));import{execSync}from'node:child_process';import{readdirSync}from'node:fs';function _0x33f3(){const _0x2325fd=['pipe','length','join','437622CpCbMy','DNA\x203:\x20','push','\x20Lessons\x20Learned\x20vorhanden\x20in\x20docs/lessons-learned/','\x20|\x20','5yROjCj','trim','2022008DwbCwX','kBfJw','xcCCb','607509CgmeMC','1548280aVBYPI','283206lKofPX','208236YMgAqg','_template.md','detached','YJJvY','1107296vJDTrc','git\x20log\x20--oneline\x20-1'];_0x33f3=function(){return _0x2325fd;};return _0x33f3();}import{join}from'node:path';export function buildSessionStartContext(_0x57799d){const _0x463d85=_0x3029,_0x20d0a3={'JtQBz':function(_0x14b06e,_0x7ff08b,_0x22b029){return _0x14b06e(_0x7ff08b,_0x22b029);},'xcCCb':'git\x20branch\x20--show-current','YJJvY':'utf-8','iRdxv':'pipe','lBRtQ':_0x463d85(0xc6),'LlvmL':function(_0x514fbe,_0x4a4cf6,_0x5df08){return _0x514fbe(_0x4a4cf6,_0x5df08);},'kBfJw':function(_0x45fae9,_0x5e9f8d){return _0x45fae9===_0x5e9f8d;}},{cwd:_0x44a5df}=_0x57799d;if(!_0x44a5df)return{};const _0x1039bb=[];try{const _0x4065fe=_0x20d0a3['JtQBz'](execSync,_0x20d0a3[_0x463d85(0xc0)],{'cwd':_0x44a5df,'encoding':_0x20d0a3[_0x463d85(0xc7)],'stdio':[_0x463d85(0xca),_0x20d0a3['iRdxv'],_0x463d85(0xca)]})[_0x463d85(0xbd)]()||_0x20d0a3['lBRtQ'],_0x390b69=_0x20d0a3['LlvmL'](execSync,_0x463d85(0xc9),{'cwd':_0x44a5df,'encoding':_0x20d0a3['YJJvY'],'stdio':[_0x463d85(0xca),_0x20d0a3['iRdxv'],'pipe']})['trim']();_0x1039bb[_0x463d85(0xcf)]('Git:\x20'+_0x4065fe+_0x463d85(0xbb)+_0x390b69);}catch{}try{const _0x256b0c=join(_0x44a5df,'docs/lessons-learned'),_0x3eca62=readdirSync(_0x256b0c)['filter'](_0x55dbd8=>_0x55dbd8['endsWith']('.md')&&_0x463d85(0xc5)!==_0x55dbd8);_0x3eca62['length']>0x0&&_0x1039bb[_0x463d85(0xcf)](_0x463d85(0xce)+_0x3eca62[_0x463d85(0xcb)]+_0x463d85(0xd0));}catch{}return _0x20d0a3[_0x463d85(0xbf)](0x0,_0x1039bb['length'])?{}:{'additionalContext':_0x1039bb[_0x463d85(0xcc)]('\x0a')};}
|