specops 0.1.0
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 +630 -0
- package/bin/install.js +2089 -0
- package/bin/specops.js +35 -0
- package/dist/__e2e__/01-state-engine.e2e.test.d.ts +10 -0
- package/dist/__e2e__/01-state-engine.e2e.test.js +1 -0
- package/dist/acceptance/lazyDetector.d.ts +10 -0
- package/dist/acceptance/lazyDetector.js +1 -0
- package/dist/acceptance/lazyDetector.test.d.ts +1 -0
- package/dist/acceptance/lazyDetector.test.js +1 -0
- package/dist/acceptance/reporter.d.ts +12 -0
- package/dist/acceptance/reporter.js +1 -0
- package/dist/acceptance/reporter.test.d.ts +1 -0
- package/dist/acceptance/reporter.test.js +1 -0
- package/dist/acceptance/runner.d.ts +26 -0
- package/dist/acceptance/runner.js +2 -0
- package/dist/acceptance/runner.test.d.ts +1 -0
- package/dist/acceptance/runner.test.js +1 -0
- package/dist/acceptance/types.d.ts +44 -0
- package/dist/acceptance/types.js +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +2 -0
- package/dist/context/index.d.ts +2 -0
- package/dist/context/index.js +1 -0
- package/dist/context/promptTemplate.d.ts +2 -0
- package/dist/context/promptTemplate.js +1 -0
- package/dist/context/promptTemplate.test.d.ts +1 -0
- package/dist/context/promptTemplate.test.js +1 -0
- package/dist/context/techContextLoader.d.ts +2 -0
- package/dist/context/techContextLoader.js +1 -0
- package/dist/context/techContextLoader.test.d.ts +1 -0
- package/dist/context/techContextLoader.test.js +1 -0
- package/dist/engine.d.ts +35 -0
- package/dist/engine.js +1 -0
- package/dist/evolution/distiller.d.ts +22 -0
- package/dist/evolution/distiller.js +1 -0
- package/dist/evolution/index.d.ts +8 -0
- package/dist/evolution/index.js +1 -0
- package/dist/evolution/memoryGraph.d.ts +34 -0
- package/dist/evolution/memoryGraph.js +1 -0
- package/dist/evolution/selector.d.ts +30 -0
- package/dist/evolution/selector.js +1 -0
- package/dist/evolution/signals.d.ts +18 -0
- package/dist/evolution/signals.js +1 -0
- package/dist/evolution/solidify.d.ts +20 -0
- package/dist/evolution/solidify.js +1 -0
- package/dist/evolution/store.d.ts +37 -0
- package/dist/evolution/store.js +1 -0
- package/dist/evolution/types.d.ts +350 -0
- package/dist/evolution/types.js +1 -0
- package/dist/init.d.ts +19 -0
- package/dist/init.js +1 -0
- package/dist/machines/agentMachine.d.ts +57 -0
- package/dist/machines/agentMachine.js +1 -0
- package/dist/machines/agentMachine.test.d.ts +1 -0
- package/dist/machines/agentMachine.test.js +1 -0
- package/dist/machines/supervisorMachine.d.ts +103 -0
- package/dist/machines/supervisorMachine.js +1 -0
- package/dist/machines/supervisorMachine.test.d.ts +1 -0
- package/dist/machines/supervisorMachine.test.js +1 -0
- package/dist/persistence/schema.d.ts +95 -0
- package/dist/persistence/schema.js +1 -0
- package/dist/persistence/stateFile.d.ts +17 -0
- package/dist/persistence/stateFile.js +1 -0
- package/dist/persistence/stateFile.test.d.ts +1 -0
- package/dist/persistence/stateFile.test.js +1 -0
- package/dist/plugin-engine.d.ts +42 -0
- package/dist/plugin-engine.js +1 -0
- package/dist/plugin.d.ts +9 -0
- package/dist/plugin.js +1 -0
- package/dist/types/index.d.ts +49 -0
- package/dist/types/index.js +1 -0
- package/dist/utils/id.d.ts +1 -0
- package/dist/utils/id.js +1 -0
- package/package.json +42 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Gene, Capsule, EvolutionEvent, MemoryGraphEvent, FailedCapsule, DistillerState, EvolutionStoreInterface } from './types.js';
|
|
2
|
+
/** 进化存储 — 管理 Gene/Capsule/Event 的文件读写 */
|
|
3
|
+
export declare class EvolutionStore implements EvolutionStoreInterface {
|
|
4
|
+
/** 存储根目录 */
|
|
5
|
+
private readonly dir;
|
|
6
|
+
constructor(projectDir: string);
|
|
7
|
+
private get genesPath();
|
|
8
|
+
private get capsulesPath();
|
|
9
|
+
private get eventsPath();
|
|
10
|
+
private get memoryGraphPath();
|
|
11
|
+
private get failedCapsulesPath();
|
|
12
|
+
private get distillerStatePath();
|
|
13
|
+
/** 读取所有 Gene */
|
|
14
|
+
readGenes(): Gene[];
|
|
15
|
+
/** 写入所有 Gene(原子写入) */
|
|
16
|
+
writeGenes(genes: Gene[]): void;
|
|
17
|
+
/** 读取所有 Capsule */
|
|
18
|
+
readCapsules(): Capsule[];
|
|
19
|
+
/** 写入所有 Capsule(原子写入) */
|
|
20
|
+
writeCapsules(capsules: Capsule[]): void;
|
|
21
|
+
/** 读取所有进化事件 */
|
|
22
|
+
readEvents(): EvolutionEvent[];
|
|
23
|
+
/** 追加进化事件 */
|
|
24
|
+
appendEvent(event: EvolutionEvent): void;
|
|
25
|
+
/** 读取所有记忆图谱事件 */
|
|
26
|
+
readMemoryGraphEvents(): MemoryGraphEvent[];
|
|
27
|
+
/** 追加记忆图谱事件 */
|
|
28
|
+
appendMemoryGraphEvent(event: MemoryGraphEvent): void;
|
|
29
|
+
/** 读取所有失败 Capsule */
|
|
30
|
+
readFailedCapsules(): FailedCapsule[];
|
|
31
|
+
/** 追加失败 Capsule */
|
|
32
|
+
appendFailedCapsule(capsule: FailedCapsule): void;
|
|
33
|
+
/** 读取蒸馏器状态 */
|
|
34
|
+
readDistillerState(): DistillerState;
|
|
35
|
+
/** 写入蒸馏器状态(原子写入) */
|
|
36
|
+
writeDistillerState(state: DistillerState): void;
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x216f1d,_0x529ebf){const _0x25370e={_0x3ce737:0x202,_0x1c8caf:0x2c1,_0x45277f:0x2b2,_0x4985af:0x201,_0x3d2414:0x218,_0x53115f:0x2ec,_0xa6e786:0x1cd},_0x58b6b1={_0x1b762b:0x160},_0xea80c0={_0x3819bb:0x91};function _0x234a83(_0x594a28,_0x1b5d53){return _0x5640(_0x594a28-_0xea80c0._0x3819bb,_0x1b5d53);}const _0x290869=_0x216f1d();function _0x523921(_0x493cbe,_0x169680){return _0x5640(_0x169680-_0x58b6b1._0x1b762b,_0x493cbe);}while(!![]){try{const _0x3e5c20=parseInt(_0x234a83(_0x25370e._0x3ce737,0x1d9))/(0x1*0x1fe7+0x1*-0x1a18+-0x5ce)+-parseInt(_0x523921(_0x25370e._0x1c8caf,_0x25370e._0x45277f))/(0x1*-0x1b9d+0x1fff+-0x460)+parseInt(_0x234a83(_0x25370e._0x4985af,_0x25370e._0x3d2414))/(0x1d15+-0x1ca+-0x1b48)+parseInt(_0x234a83(0x20b,0x212))/(-0xb5a+0x29a*0x2+0x62a)+-parseInt(_0x523921(0x300,_0x25370e._0x53115f))/(0x2*-0x126d+-0xd9e+0xeb*0x37)+parseInt(_0x234a83(0x1d5,0x1c6))/(0x1a7*-0xd+0xe*0xec+0x1f*0x47)*(parseInt(_0x234a83(0x1ea,_0x25370e._0xa6e786))/(-0xed*-0x10+-0x6*-0x5cc+-0x3191))+-parseInt(_0x523921(0x2f3,0x2e1))/(-0x20*0xef+0x1*0x1f3f+-0x157);if(_0x3e5c20===_0x529ebf)break;else _0x290869['push'](_0x290869['shift']());}catch(_0x234195){_0x290869['push'](_0x290869['shift']());}}}(_0x2bc2,0x9*0x7692+-0x92c2c+0xdc7ab));import{readFileSync,appendFileSync,existsSync,mkdirSync}from'node:fs';import{join}from'node:path';import _0x341f6c from'write-file-atomic';function ensureDir(_0x637082){const _0x5b48a3={_0x926636:0x1a1,_0x18f86f:0x1aa,_0x5f4d1e:0x211},_0x121cf7={_0xacf414:0xcf};function _0x4b3c43(_0x1fabbb,_0x59b967){return _0x5640(_0x1fabbb-_0x121cf7._0xacf414,_0x59b967);}const _0x160dac={'gTKwD':function(_0x2ec3cc,_0x353d81,_0x39e866){return _0x2ec3cc(_0x353d81,_0x39e866);}};function _0x20f70d(_0x3f9ace,_0x5fc51e){return _0x5640(_0x5fc51e-0x27,_0x3f9ace);}if(!existsSync(_0x637082)){const _0x3f225e={};_0x3f225e[_0x20f70d(_0x5b48a3._0x926636,_0x5b48a3._0x18f86f)]=!![],_0x160dac[_0x4b3c43(0x219,_0x5b48a3._0x5f4d1e)](mkdirSync,_0x637082,_0x3f225e);}}function _0x3786c8(_0x5b3b5b,_0x45f080){const _0x357b12={_0x2299be:0x1a7};return _0x5640(_0x45f080- -_0x357b12._0x2299be,_0x5b3b5b);}function _0x5640(_0x471958,_0x172616){_0x471958=_0x471958-(0x223b+-0x1b05+-0x5f8);const _0x8b2081=_0x2bc2();let _0x3e923a=_0x8b2081[_0x471958];if(_0x5640['qNzsyo']===undefined){var _0x13760c=function(_0x424fdf){const _0x5f5134='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3ff2ba='',_0x299533='';for(let _0x240f76=-0x1f4*0xb+-0x10d*0x3+0x18a3,_0x5930e4,_0x592877,_0xdd66c9=-0x1ebd*0x1+-0x1520+0x33dd*0x1;_0x592877=_0x424fdf['charAt'](_0xdd66c9++);~_0x592877&&(_0x5930e4=_0x240f76%(-0xf16+0x1b16+0x76*-0x1a)?_0x5930e4*(-0x43*-0x12+0x6ef+-0x1*0xb65)+_0x592877:_0x592877,_0x240f76++%(0x2d1+-0x240b+0x213e))?_0x3ff2ba+=String['fromCharCode'](0x1283+0x72*-0x45+0xd36&_0x5930e4>>(-(0xd1*-0x2f+0x1*0x1c2d+-0x28d*-0x4)*_0x240f76&-0x1*-0x245f+0xc3c+-0x3095)):-0x1742+0xd19+-0x9*-0x121){_0x592877=_0x5f5134['indexOf'](_0x592877);}for(let _0x385717=0x2*0xca0+0x1bcf+-0x350f,_0x233ac2=_0x3ff2ba['length'];_0x385717<_0x233ac2;_0x385717++){_0x299533+='%'+('00'+_0x3ff2ba['charCodeAt'](_0x385717)['toString'](-0x2*0xa13+0x3*0x9eb+0x98b*-0x1))['slice'](-(0x21a*-0x4+-0x22b7+0x2b21));}return decodeURIComponent(_0x299533);};_0x5640['fPOaCt']=_0x13760c,_0x5640['qLfVFm']={},_0x5640['qNzsyo']=!![];}const _0x4fc75c=_0x8b2081[0xe*0x1a5+-0x15cd+-0x139],_0x4fb1e4=_0x471958+_0x4fc75c,_0x5e9e9c=_0x5640['qLfVFm'][_0x4fb1e4];return!_0x5e9e9c?(_0x3e923a=_0x5640['fPOaCt'](_0x3e923a),_0x5640['qLfVFm'][_0x4fb1e4]=_0x3e923a):_0x3e923a=_0x5e9e9c,_0x3e923a;}function _0x2bc2(){const _0x4b4d0f=['shbVD1m','C3rYAw5NAwz5','yMD1t3m','C29U','y21mEgm','C3vSzxmUANnVBG','zMfPBgvKx2nHCa','D3jPDgvhzw5LCW','zgLZDgLSBgvYuW','BwPSDuS','wxbQqu8','qwv5EwG','Dgf0zvbHDgG','CMHireq','yxbWzw5KrMfPBa','r3jHCgHfDMvUDa','otaWotKZrgT4CuTO','mtaXmJuXovDhzwrvwq','CgGUANnVBMW','zMfPBgvKq2fWCW','zgf0yuzPBMDLCG','C3bSAxq','zMLSDgvY','D3jPDgvdyxbZDq','BgvYu3rHDgu','C3LUyW','mJC0mJaWz1HgufPp','teDLteC','rMLfqwq','CMvHzezHAwXLza','yxbWzw5KtwvTBW','uKTps3C','ugzAyvy','mJqWnZC2meDjzvvoCq','q2fWC3vSzxm','CMvJDxjZAxzL','tuzKCuG','y2fWC3vSzxmUAG','BgXLCLn0yxrL','vMzpzhe','quXswLe','CgfYC2u','ChjQAK4','Eg14vuG','mtC4mZyWmhnRu2DOuq','AfbHDgG','BgvZ','ChjPBNq','tNvAyvm','BwfW','CMvHzenHChn1Ba','Awj5ALK','DwXLC1bHDgG','zgLZDgLSBgvYxW','Cgfwwgi','zxzVBhv0Aw9U','C3rHDguUANnVBG','CvfhsuS','mteYnJa4nK9sruDZDW','DhjPBq','Auniz1C','u2T1Auy','D09Jt2S','CMvHzerPC3rPBa','z1rlD0q','wKDpyvq','CMvHzeDLBMvZ','BwnSsM8','y2fWC3vSzxnqyq','DxrMltG','zxzLBNrZugf0Aa','zeHHwMS','mtqYmZiZmLDZCMPeEq','yxbWzw5KrxzLBG','lNnWzwnVChm','zvzIDxy','zgLY','CNLhCMfWAev2zq','BwvTB3j5x2DYyq','mJfszKzQA3y','uhDnqNu','tg9RvNu','BwvTB3j5r3jHCa','z2vUzxnqyxrO','CgL0CMi','CMvHze1LBw9YEq'];_0x2bc2=function(){return _0x4b4d0f;};return _0x2bc2();}function readJsonSafe(_0x2b0208,_0x5ee20f){const _0x1bebd8={_0xc4009b:0x317,_0x12b41f:0x310,_0x47726d:0x319,_0xa912c0:0x307,_0x456664:0x357},_0x382115={_0xbf68f:0x229},_0x33a085={};function _0x2b777f(_0x3eb75c,_0x307d8a){return _0x5640(_0x3eb75c-0x1c1,_0x307d8a);}function _0x129dba(_0x11b09e,_0x27c2a3){return _0x5640(_0x27c2a3-_0x382115._0xbf68f,_0x11b09e);}_0x33a085[_0x2b777f(0x309,_0x1bebd8._0xc4009b)]=_0x2b777f(_0x1bebd8._0x12b41f,_0x1bebd8._0x47726d);const _0x2241bb=_0x33a085;try{if(!existsSync(_0x2b0208))return _0x5ee20f;const _0x1c3eb4=readFileSync(_0x2b0208,_0x2241bb['wOcOk']);if(!_0x1c3eb4[_0x2b777f(0x306,_0x1bebd8._0xa912c0)]())return _0x5ee20f;return JSON[_0x2b777f(0x34a,_0x1bebd8._0x456664)](_0x1c3eb4);}catch{return _0x5ee20f;}}function readJsonlSafe(_0x4ecbda){const _0x3029e1={_0x19043f:0x4bb,_0x173465:0x3a8,_0x31906f:0x390,_0x4a78fd:0x4f8,_0x413100:0x37c,_0x4bfd4:0x3ab,_0x5a082c:0x3f2,_0x57d1a3:0x50e,_0x28a445:0x3f9,_0x385eab:0x3cf,_0x1d888b:0x503,_0x4c28da:0x4f2,_0x30aa46:0x501,_0x29e4bf:0x3ea,_0x5b7e9e:0x3e4,_0x285baf:0x3e1,_0x4c346f:0x3b7,_0x551317:0x3b0,_0x3456ec:0x4da,_0x5696f9:0x4b1},_0x4931a5={_0xf7ae1b:0x53,_0x23e07c:0x8f,_0x44d437:0x174,_0x315764:0x6e},_0x193f4d={_0x239018:0x66a},_0x2d6f2a={_0x426558:0x259},_0x3f9228={_0x36418b:0x37d},_0x48f8dc={'pCbbZ':function(_0x5baa26,_0x2bd9de,_0x53e417,_0xd6d1bc){return _0x5baa26(_0x2bd9de,_0x53e417,_0xd6d1bc);},'cPzIN':function(_0x2cef72,_0x2bf6b2){return _0x2cef72+_0x2bf6b2;},'mclJo':function(_0x52a996,_0x36859a){return _0x52a996!==_0x36859a;},'VfOdq':_0x4d99bb(0x4e1,_0x3029e1._0x19043f),'paVXb':'DlTLq','rhHDD':function(_0x2b9bc8,_0x3ab949,_0x1e0366){return _0x2b9bc8(_0x3ab949,_0x1e0366);},'cLrFc':_0x1d4034(_0x3029e1._0x173465,_0x3029e1._0x31906f),'SgQUy':_0x4d99bb(_0x3029e1._0x4a78fd,0x516)};function _0x4d99bb(_0x266aa3,_0x19a501){return _0x5640(_0x266aa3-_0x3f9228._0x36418b,_0x19a501);}function _0x1d4034(_0x5390dc,_0x128c45){return _0x5640(_0x5390dc-_0x2d6f2a._0x426558,_0x128c45);}try{if(_0x1d4034(0x3a0,_0x3029e1._0x413100)===_0x48f8dc[_0x1d4034(0x399,_0x3029e1._0x4bfd4)]){const _0x1e5e0e={_0x5b98b4:0x9f};if(!_0x3e2278(_0x460b3b))return[];const _0x187e0f=_0x389944(_0x5f3754,_0x4d99bb(0x4cc,0x4b6));return _0x187e0f[_0x1d4034(0x3ce,_0x3029e1._0x5a082c)]('\x0a')[_0x4d99bb(_0x3029e1._0x57d1a3,0x4e7)](_0x344bf7=>_0x344bf7[_0x1d4034(0x39e,0x39b)]())[_0x1d4034(0x3cf,0x3f8)](_0x256d1e)[_0x1d4034(0x3ea,_0x3029e1._0x28a445)](_0x11a799=>{function _0x47fe38(_0xc38e9d,_0x4d3d5b){return _0x1d4034(_0xc38e9d- -0x4a9,_0x4d3d5b);}try{return _0x4e4dbc[_0x47fe38(-0xc7,-_0x1e5e0e._0x5b98b4)](_0x11a799);}catch{return null;}})[_0x1d4034(_0x3029e1._0x385eab,0x3c4)](_0x1ce7cb=>_0x1ce7cb!==null);}else{if(!existsSync(_0x4ecbda))return[];const _0x366bfc=_0x48f8dc[_0x4d99bb(0x4ea,_0x3029e1._0x1d888b)](readFileSync,_0x4ecbda,_0x48f8dc['cLrFc']);return _0x366bfc[_0x4d99bb(_0x3029e1._0x4c28da,_0x3029e1._0x30aa46)]('\x0a')[_0x1d4034(_0x3029e1._0x29e4bf,_0x3029e1._0x5b7e9e)](_0x25171c=>_0x25171c[_0x4d99bb(0x4c2,0x49d)]())[_0x1d4034(0x3cf,_0x3029e1._0x285baf)](Boolean)['map'](_0x782d94=>{function _0x24fac8(_0x4187f0,_0xcb08a){return _0x4d99bb(_0x4187f0- -_0x193f4d._0x239018,_0xcb08a);}const _0x300f10={'eVbuv':function(_0x4b8656,_0x5648aa,_0x30bbc1,_0x40cb53){return _0x48f8dc['pCbbZ'](_0x4b8656,_0x5648aa,_0x30bbc1,_0x40cb53);},'PfZaV':function(_0x596c4a,_0x4f1516){return _0x48f8dc['cPzIN'](_0x596c4a,_0x4f1516);}};function _0x2ebf9d(_0x2584cb,_0xba5bce){return _0x4d99bb(_0x2584cb- -0x559,_0xba5bce);}try{return JSON[_0x2ebf9d(-_0x4931a5._0xf7ae1b,-0x76)](_0x782d94);}catch{if(_0x48f8dc[_0x2ebf9d(-_0x4931a5._0x23e07c,-0x9e)](_0x24fac8(-0x189,-_0x4931a5._0x44d437),_0x48f8dc[_0x24fac8(-0x166,-0x151)]))_0x5930e4(_0x592877(_0xdd66c9,'..')),_0x300f10[_0x2ebf9d(-0x87,-0x7f)](_0x385717,_0x233ac2,_0x300f10[_0x2ebf9d(-0x5c,-_0x4931a5._0x315764)](_0xbb4572[_0x2ebf9d(-0x7b,-0x94)](_0x3b9919),'\x0a'),'utf-8');else return null;}})[_0x1d4034(_0x3029e1._0x385eab,0x3df)](_0x4f3a15=>_0x4f3a15!==null);}}catch{return _0x48f8dc[_0x1d4034(0x3a6,0x3a3)](_0x48f8dc['SgQUy'],_0x1d4034(_0x3029e1._0x4c346f,_0x3029e1._0x551317))?[]:_0x2f071d(this[_0x4d99bb(_0x3029e1._0x3456ec,_0x3029e1._0x5696f9)],[]);}}function appendJsonl(_0x84d2d2,_0x95b522){const _0x4ecd75={_0x17f221:0x4f7,_0x340607:0x508},_0x42934f={_0x3a1aff:0x1c1};function _0x5d4e1d(_0x3627d0,_0x47d0ea){return _0x5640(_0x47d0ea-0x378,_0x3627d0);}const _0x183ba9={'ZGOaT':function(_0x15433b,_0x5ca510){return _0x15433b(_0x5ca510);},'RKOKw':function(_0x43db7d,_0x203e86,_0x111e99,_0x21ba9b){return _0x43db7d(_0x203e86,_0x111e99,_0x21ba9b);},'NuZaS':'utf-8'};_0x183ba9[_0x4acac5(0x30c,0x32c)](ensureDir,join(_0x84d2d2,'..'));function _0x4acac5(_0x13de97,_0x51f719){return _0x5640(_0x13de97-_0x42934f._0x3a1aff,_0x51f719);}_0x183ba9[_0x5d4e1d(0x4e0,_0x4ecd75._0x17f221)](appendFileSync,_0x84d2d2,JSON[_0x5d4e1d(0x500,0x4d9)](_0x95b522)+'\x0a',_0x183ba9[_0x5d4e1d(0x517,_0x4ecd75._0x340607)]);}function writeJsonAtomic(_0x25e1fc,_0x522efb){const _0x5ba9f5={_0x15b669:0x171,_0x48823a:0x15c,_0x26a9a2:0x85,_0x4c5d26:0x7e,_0x494f3c:0x98},_0x2de038={_0x379b62:0x1e7};function _0x189e09(_0x1921d4,_0x5df9cd){return _0x5640(_0x5df9cd- -_0x2de038._0x379b62,_0x1921d4);}const _0x18465d={};_0x18465d[_0x31f08c(-0x173,-_0x5ba9f5._0x15b669)]=function(_0x16fdb0,_0x253920){return _0x16fdb0+_0x253920;};const _0x59ff9b=_0x18465d;ensureDir(join(_0x25e1fc,'..'));function _0x31f08c(_0x31c1f8,_0x56d159){return _0x5640(_0x31c1f8- -0x2d5,_0x56d159);}_0x341f6c[_0x31f08c(-_0x5ba9f5._0x48823a,-0x167)](_0x25e1fc,_0x59ff9b[_0x189e09(-0x9c,-_0x5ba9f5._0x26a9a2)](JSON[_0x189e09(-0xac,-0x86)](_0x522efb,null,-0x20*0xd6+-0x12da+0x2d9c),'\x0a'),_0x189e09(-_0x5ba9f5._0x4c5d26,-_0x5ba9f5._0x494f3c));}function _0x1be3e3(_0x3dcef7,_0xf18cf2){const _0x6e929a={_0x2eeb47:0x294};return _0x5640(_0x3dcef7-_0x6e929a._0x2eeb47,_0xf18cf2);}export class EvolutionStore{[_0x3786c8(-0x4e,-0x51)];constructor(_0x4c22c0){const _0x39f6f8={_0x271f64:0xd6,_0x3f1515:0xb0,_0x41d4ff:0x403,_0x4454ab:0x419,_0x2929ef:0x3f0,_0x58af65:0x400,_0x2d5c70:0x79},_0x2162ac={_0x5d45da:0x456},_0x3f3b0f={_0x4b0f59:0xc4},_0x59703b={};_0x59703b[_0xd78f2(_0x39f6f8._0x271f64,_0x39f6f8._0x3f1515)]=_0x4e6c2a(_0x39f6f8._0x41d4ff,0x42e),_0x59703b[_0x4e6c2a(_0x39f6f8._0x4454ab,0x3fa)]=_0x4e6c2a(_0x39f6f8._0x2929ef,0x419);const _0x3fe534=_0x59703b;function _0xd78f2(_0x299b84,_0x299ab6){return _0x3786c8(_0x299b84,_0x299ab6-_0x3f3b0f._0x4b0f59);}function _0x4e6c2a(_0xee81c4,_0x1d366a){return _0x3786c8(_0x1d366a,_0xee81c4-_0x2162ac._0x5d45da);}this[_0x4e6c2a(0x405,_0x39f6f8._0x58af65)]=join(_0x4c22c0,_0x3fe534['ibyjY'],_0x3fe534[_0xd78f2(_0x39f6f8._0x2d5c70,0x87)]),ensureDir(this['dir']);}get['genesPath'](){const _0x3f075a={_0x17cac:0xaa,_0x5d066f:0xb5},_0x28660f={'Aeyyh':function(_0x10cc62,_0x15583d,_0x3e350b){return _0x10cc62(_0x15583d,_0x3e350b);}};function _0x1a839a(_0x44cc40,_0x34ae7d){return _0x3786c8(_0x34ae7d,_0x44cc40- -0x6e);}return _0x28660f[_0x1a839a(-_0x3f075a._0x17cac,-_0x3f075a._0x5d066f)](join,this['dir'],'genes.json');}get[_0x3786c8(-0x3c,-0x59)+'th'](){const _0x2cec5e={_0x39f275:0x364,_0x1e35a4:0x342,_0x5d7e47:0x34c,_0x4b115d:0x26e,_0x47e37c:0x264,_0x1c895c:0x26f},_0x2275fe={_0x43caf2:0x386},_0xc73469={'PwMBu':function(_0x581c96,_0x5b0468,_0x154fdd){return _0x581c96(_0x5b0468,_0x154fdd);},'dHaZk':_0x478a54(_0x2cec5e._0x39f275,0x388)+_0x478a54(_0x2cec5e._0x1e35a4,_0x2cec5e._0x5d7e47)};function _0x592ed3(_0x44d386,_0x5be0e6){return _0x3786c8(_0x5be0e6,_0x44d386- -0x213);}function _0x478a54(_0x3410cc,_0xc6c7fe){return _0x3786c8(_0xc6c7fe,_0x3410cc-_0x2275fe._0x43caf2);}return _0xc73469[_0x592ed3(-0x260,-_0x2cec5e._0x4b115d)](join,this[_0x592ed3(-_0x2cec5e._0x47e37c,-_0x2cec5e._0x1c895c)],_0xc73469[_0x478a54(0x330,0x330)]);}get['eventsPath'](){const _0x196dc8={_0x2429b4:0x1ba,_0x258c5b:0x1dc,_0x3a999c:0x1da,_0x53d169:0x202,_0x404f16:0xe7},_0x43184c={_0x5045ac:0x1b1},_0x4249af={'FiEAd':function(_0x285f6d,_0xf676dd,_0x35df68){return _0x285f6d(_0xf676dd,_0x35df68);},'ALRZQ':'events.jso'+'nl'};function _0x1f9d6e(_0x168d08,_0x47f5d2){return _0x3786c8(_0x168d08,_0x47f5d2- -_0x43184c._0x5045ac);}function _0x1a0826(_0x30ccfe,_0x34bd11){return _0x1be3e3(_0x30ccfe- -0x335,_0x34bd11);}return _0x4249af[_0x1f9d6e(-_0x196dc8._0x2429b4,-_0x196dc8._0x258c5b)](join,this[_0x1f9d6e(-_0x196dc8._0x3a999c,-_0x196dc8._0x53d169)],_0x4249af[_0x1a0826(_0x196dc8._0x404f16,0xe7)]);}get[_0x3786c8(-0x2f,-0x4b)+_0x3786c8(-0xf,-0x1a)](){const _0x4b6d39={_0x640974:0x1fd,_0x10a41f:0x480,_0xd5ddd8:0x23a,_0x4cce53:0x250,_0xc43d6e:0x471},_0x43b422={_0x15c46c:0x201};function _0x3541cd(_0xd90473,_0x3532cc){return _0x1be3e3(_0xd90473-0x96,_0x3532cc);}function _0x6247a0(_0xe91190,_0x25ed8b){return _0x3786c8(_0xe91190,_0x25ed8b- -_0x43b422._0x15c46c);}const _0x375d63={'MFdqH':function(_0x17a78a,_0x513ced,_0x469fa6){return _0x17a78a(_0x513ced,_0x469fa6);}};return _0x375d63[_0x6247a0(-_0x4b6d39._0x640974,-0x224)](join,this[_0x3541cd(_0x4b6d39._0x10a41f,0x456)],_0x6247a0(-_0x4b6d39._0xd5ddd8,-_0x4b6d39._0x4cce53)+_0x3541cd(0x49c,_0x4b6d39._0xc43d6e));}get[_0x1be3e3(0x407,0x416)+'ulesPath'](){const _0x53fad0={_0x202c86:0x1e8,_0x1d3b93:0x1ed,_0x84ce22:0x1ca,_0x323fb4:0x1de,_0x389025:0x1e9},_0x3aa40b={_0x13b010:0x180};function _0x5080ee(_0xc81e22,_0x4b121d){return _0x1be3e3(_0x4b121d- -0x20c,_0xc81e22);}const _0x58eab5={};_0x58eab5[_0x5080ee(0x1c4,_0x53fad0._0x202c86)]=_0x5080ee(_0x53fad0._0x1d3b93,0x1ee)+_0x5080ee(0x212,0x1ed)+'l';const _0x367e9d=_0x58eab5;function _0x534bf4(_0x40d977,_0x5e4f36){return _0x3786c8(_0x40d977,_0x5e4f36- -_0x3aa40b._0x13b010);}return join(this[_0x5080ee(_0x53fad0._0x84ce22,_0x53fad0._0x323fb4)],_0x367e9d[_0x534bf4(-_0x53fad0._0x389025,-0x1c7)]);}get[_0x3786c8(-0x32,-0x3f)+_0x1be3e3(0x400,0x425)](){const _0x506f85={_0x48cde8:0x276,_0x3112ca:0x2d,_0x1b068e:0x27a,_0x132071:0x1a,_0x1ec823:0xf};function _0x35677e(_0xb596a1,_0xc0d0a){return _0x3786c8(_0xc0d0a,_0xb596a1-0x37);}const _0x340d19={};_0x340d19[_0x2d44da(-0x26c,-_0x506f85._0x48cde8)]=_0x35677e(-0x31,-_0x506f85._0x3112ca)+_0x2d44da(-0x288,-_0x506f85._0x1b068e);function _0x2d44da(_0x5f24d0,_0x36c511){return _0x3786c8(_0x5f24d0,_0x36c511- -0x215);}const _0x30fae3=_0x340d19;return join(this[_0x35677e(-_0x506f85._0x132071,-_0x506f85._0x1ec823)],_0x30fae3[_0x2d44da(-0x253,-_0x506f85._0x48cde8)]);}[_0x1be3e3(0x3e0,0x408)](){const _0x4a5173={_0x35cdd8:0x22};function _0x195a8b(_0x5da1e7,_0x268213){return _0x3786c8(_0x268213,_0x5da1e7-0x53);}return readJsonSafe(this[_0x195a8b(0x9,-_0x4a5173._0x35cdd8)],[]);}[_0x1be3e3(0x3fb,0x3fa)](_0xf9026d){const _0x5e97b6={_0x245a8b:0x1ca,_0x2cbef2:0x1b0};function _0x10c93c(_0x353986,_0x978ea6){return _0x1be3e3(_0x978ea6- -0x5a1,_0x353986);}writeJsonAtomic(this[_0x10c93c(-_0x5e97b6._0x245a8b,-_0x5e97b6._0x2cbef2)],_0xf9026d);}[_0x3786c8(-0x3a,-0x15)+'es'](){const _0x3c859a={_0x331ca4:0x24,_0xd5ecd6:0x409},_0x5d5bb0={_0x2e623e:0x27};function _0xb90b25(_0x55b12c,_0x2eb612){return _0x1be3e3(_0x2eb612- -0x3fb,_0x55b12c);}function _0x49baf7(_0x4af0d9,_0x4bbcd5){return _0x1be3e3(_0x4af0d9-_0x5d5bb0._0x2e623e,_0x4bbcd5);}const _0x232fdf={'xmxUH':function(_0x5aa2dd,_0x21a1a0,_0x25c317){return _0x5aa2dd(_0x21a1a0,_0x25c317);}};return _0x232fdf[_0xb90b25(-0x2,_0x3c859a._0x331ca4)](readJsonSafe,this[_0x49baf7(_0x3c859a._0xd5ecd6,0x432)+'th'],[]);}[_0x3786c8(-0x56,-0x30)+_0x1be3e3(0x422,0x409)](_0x260c62){const _0x57a603={_0x2e3400:0x65},_0x5d7555={_0x5ef7f9:0x1a0};function _0xfa81a3(_0x5410c7,_0x377a49){return _0x1be3e3(_0x377a49- -0x447,_0x5410c7);}const _0x44b0b5={'LokVu':function(_0x540f55,_0x48406c,_0x4fc6ff){return _0x540f55(_0x48406c,_0x4fc6ff);}};function _0xfeada7(_0x300230,_0x225169){return _0x3786c8(_0x300230,_0x225169-_0x5d7555._0x5ef7f9);}_0x44b0b5[_0xfeada7(0x142,0x154)](writeJsonAtomic,this[_0xfa81a3(-0x6b,-_0x57a603._0x2e3400)+'th'],_0x260c62);}['readEvents'](){return readJsonlSafe(this['eventsPath']);}[_0x1be3e3(0x3e7,0x40c)+'t'](_0x5b346a){const _0x50e005={_0x4d68b3:0x4ce},_0x1f787a={_0x390c47:0x1c8},_0x2349db={_0x3f9e63:0x50e},_0x555c1d={'prjjN':function(_0x4d1f82,_0x484fbd,_0x4d1e51){return _0x4d1f82(_0x484fbd,_0x4d1e51);}};function _0x20efb2(_0x4142ed,_0x2f5a98){return _0x3786c8(_0x4142ed,_0x2f5a98-_0x2349db._0x3f9e63);}function _0x5642f3(_0x35e42c,_0x11f67c){return _0x1be3e3(_0x35e42c- -_0x1f787a._0x390c47,_0x11f67c);}_0x555c1d[_0x5642f3(0x256,0x253)](appendJsonl,this[_0x20efb2(_0x50e005._0x4d68b3,0x4b7)],_0x5b346a);}[_0x3786c8(-0x35,-0x48)+_0x1be3e3(0x403,0x40d)+'s'](){const _0x3974e0={_0x2a7438:0x3d6,_0x45f618:0x3e0,_0x4edd9d:0x3f9},_0x13c970={_0x5d1647:0x444},_0x4ba27f={'qQGIK':function(_0x5b91db,_0x2b7543){return _0x5b91db(_0x2b7543);}};function _0xf4a7aa(_0x55cc0e,_0x1a3f42){return _0x3786c8(_0x55cc0e,_0x1a3f42-_0x13c970._0x5d1647);}function _0x4254dc(_0x589dc9,_0x378664){return _0x1be3e3(_0x378664- -0x45a,_0x589dc9);}return _0x4ba27f[_0xf4a7aa(_0x3974e0._0x2a7438,_0x3974e0._0x45f618)](readJsonlSafe,this[_0xf4a7aa(0x3e3,_0x3974e0._0x4edd9d)+_0xf4a7aa(0x433,0x42a)]);}[_0x3786c8(-0x42,-0x29)+_0x1be3e3(0x3eb,0x3d9)+'nt'](_0x36fe4d){const _0x4637d6={_0x192dc9:0x26e};function _0x1ae666(_0x28ecee,_0x784c62){return _0x1be3e3(_0x784c62- -0x182,_0x28ecee);}function _0x459e55(_0x8ed8a7,_0x2ce4f4){return _0x1be3e3(_0x8ed8a7- -0x189,_0x2ce4f4);}const _0x448af2={'qwapp':function(_0x3854b1,_0x56a42c,_0x4118e8){return _0x3854b1(_0x56a42c,_0x4118e8);}};_0x448af2['qwapp'](appendJsonl,this[_0x1ae666(0x286,_0x4637d6._0x192dc9)+_0x459e55(0x298,0x29f)],_0x36fe4d);}[_0x1be3e3(0x411,0x40f)+_0x3786c8(-0x3b,-0x25)](){const _0x26d9e2={_0x1e9132:0x26a,_0x3d1a59:0x2c9},_0xcaafba={_0x164664:0x30c},_0x2ee5d6={_0x20a3ca:0x236};function _0x419578(_0x5052b3,_0x4b2f77){return _0x3786c8(_0x4b2f77,_0x5052b3- -_0x2ee5d6._0x20a3ca);}function _0x4fe5a0(_0x295b25,_0x1328ba){return _0x3786c8(_0x1328ba,_0x295b25-_0xcaafba._0x164664);}return readJsonlSafe(this[_0x419578(-_0x26d9e2._0x1e9132,-0x284)+_0x4fe5a0(0x2a3,_0x26d9e2._0x3d1a59)]);}[_0x3786c8(-0x20,-0x39)+'edCapsule'](_0x1e277d){const _0x46de13={_0x21ddf7:0x49d};function _0x1f8a63(_0x7fb550,_0x1177d1){return _0x1be3e3(_0x7fb550- -_0x46de13._0x21ddf7,_0x1177d1);}appendJsonl(this[_0x1f8a63(-0x96,-0xba)+'ulesPath'],_0x1e277d);}[_0x1be3e3(0x3dd,0x3f1)+_0x3786c8(-0x4e,-0x2f)](){const _0x2ca2ab={_0x35a797:0x3c,_0xbc85e0:0x63,_0x350633:0x53,_0xde0f5d:0x2ed,_0xd872d7:0x2d8},_0x3b72c4={};function _0x3df2ff(_0x74c1cf,_0x443c0c){return _0x3786c8(_0x443c0c,_0x74c1cf- -0x24);}_0x3b72c4['lastRunAt']=null;function _0x47aa54(_0x348936,_0x87a415){return _0x3786c8(_0x348936,_0x87a415-0x313);}return _0x3b72c4[_0x3df2ff(-0x57,-0x4b)+_0x3df2ff(-_0x2ca2ab._0x35a797,-0x62)]=null,readJsonSafe(this[_0x3df2ff(-_0x2ca2ab._0xbc85e0,-_0x2ca2ab._0x350633)+_0x47aa54(_0x2ca2ab._0xde0f5d,_0x2ca2ab._0xd872d7)],_0x3b72c4);}['writeDisti'+_0x1be3e3(0x41a,0x414)](_0x11ed6c){const _0x4632ec={_0x5e2659:0x366},_0x2e6c58={_0x136f0b:0x2a0};function _0x2ff7b5(_0x3f3c44,_0x4aa9bb){return _0x3786c8(_0x3f3c44,_0x4aa9bb-0x39c);}function _0x4909c0(_0x5b75d6,_0x2ee6b7){return _0x3786c8(_0x2ee6b7,_0x5b75d6-_0x2e6c58._0x136f0b);}const _0x59c820={'mjluK':function(_0x56d3b4,_0x3bc152,_0x18eb42){return _0x56d3b4(_0x3bc152,_0x18eb42);}};_0x59c820[_0x4909c0(0x262,0x25c)](writeJsonAtomic,this[_0x2ff7b5(_0x4632ec._0x5e2659,0x35d)+'tatePath'],_0x11ed6c);}}
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
/** Gene 分类 */
|
|
2
|
+
export type GeneCategory = 'repair' | 'optimize' | 'innovate';
|
|
3
|
+
/** 表观遗传标记 — 环境印记 */
|
|
4
|
+
export interface EpigeneticMark {
|
|
5
|
+
/** 环境上下文(如 'darwin/arm64/v20.x') */
|
|
6
|
+
context: string;
|
|
7
|
+
/** 表达增益 [-0.5, 0.5] */
|
|
8
|
+
boost: number;
|
|
9
|
+
/** 原因 */
|
|
10
|
+
reason: string;
|
|
11
|
+
/** 创建时间 */
|
|
12
|
+
createdAt: string;
|
|
13
|
+
}
|
|
14
|
+
/** Gene — 进化策略模板 */
|
|
15
|
+
export interface Gene {
|
|
16
|
+
type: 'Gene';
|
|
17
|
+
/** 唯一标识,如 'gene_repair_test_failure' */
|
|
18
|
+
id: string;
|
|
19
|
+
/** 分类 */
|
|
20
|
+
category: GeneCategory;
|
|
21
|
+
/** 匹配的信号模式列表(支持正则如 /pattern/i 和子串匹配) */
|
|
22
|
+
signalsMatch: string[];
|
|
23
|
+
/** 前置条件描述 */
|
|
24
|
+
preconditions: string[];
|
|
25
|
+
/** 执行步骤列表(可操作指令) */
|
|
26
|
+
strategy: string[];
|
|
27
|
+
/** 约束 */
|
|
28
|
+
constraints: {
|
|
29
|
+
/** 最大可修改文件数 */
|
|
30
|
+
maxFiles: number;
|
|
31
|
+
/** 禁止修改的路径 */
|
|
32
|
+
forbiddenPaths: string[];
|
|
33
|
+
};
|
|
34
|
+
/** 验证命令列表 */
|
|
35
|
+
validation: string[];
|
|
36
|
+
/** 表观遗传标记 */
|
|
37
|
+
epigeneticMarks: EpigeneticMark[];
|
|
38
|
+
/** 创建时间 */
|
|
39
|
+
createdAt: string;
|
|
40
|
+
/** 更新时间 */
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
}
|
|
43
|
+
/** 爆炸半径 */
|
|
44
|
+
export interface BlastRadius {
|
|
45
|
+
/** 修改文件数 */
|
|
46
|
+
files: number;
|
|
47
|
+
/** 修改行数 */
|
|
48
|
+
lines: number;
|
|
49
|
+
}
|
|
50
|
+
/** 结果 */
|
|
51
|
+
export interface Outcome {
|
|
52
|
+
status: 'success' | 'failed';
|
|
53
|
+
score: number;
|
|
54
|
+
}
|
|
55
|
+
/** Capsule — 成功进化案例 */
|
|
56
|
+
export interface Capsule {
|
|
57
|
+
type: 'Capsule';
|
|
58
|
+
/** 唯一标识 */
|
|
59
|
+
id: string;
|
|
60
|
+
/** 触发条件(信号列表) */
|
|
61
|
+
trigger: string[];
|
|
62
|
+
/** 来源 Gene ID */
|
|
63
|
+
geneId: string;
|
|
64
|
+
/** 成功案例描述 */
|
|
65
|
+
summary: string;
|
|
66
|
+
/** 置信度 [0, 1] */
|
|
67
|
+
confidence: number;
|
|
68
|
+
/** 爆炸半径 */
|
|
69
|
+
blastRadius: BlastRadius;
|
|
70
|
+
/** 结果 */
|
|
71
|
+
outcome: Outcome;
|
|
72
|
+
/** 连续成功次数 */
|
|
73
|
+
successStreak: number;
|
|
74
|
+
/** 成功原因分析 */
|
|
75
|
+
successReason: string;
|
|
76
|
+
/** 创建时间 */
|
|
77
|
+
createdAt: string;
|
|
78
|
+
}
|
|
79
|
+
/** FailedCapsule — 失败进化案例 */
|
|
80
|
+
export interface FailedCapsule {
|
|
81
|
+
type: 'Capsule';
|
|
82
|
+
/** 唯一标识 */
|
|
83
|
+
id: string;
|
|
84
|
+
/** 触发条件 */
|
|
85
|
+
trigger: string[];
|
|
86
|
+
/** 来源 Gene ID */
|
|
87
|
+
geneId: string;
|
|
88
|
+
/** 描述 */
|
|
89
|
+
summary: string;
|
|
90
|
+
/** 置信度 */
|
|
91
|
+
confidence: number;
|
|
92
|
+
/** 爆炸半径 */
|
|
93
|
+
blastRadius: BlastRadius;
|
|
94
|
+
/** 结果 */
|
|
95
|
+
outcome: Outcome;
|
|
96
|
+
/** diff 快照 */
|
|
97
|
+
diffSnapshot: string;
|
|
98
|
+
/** 失败原因 */
|
|
99
|
+
failureReason: string;
|
|
100
|
+
/** 约束违规列表 */
|
|
101
|
+
constraintViolations: string[];
|
|
102
|
+
/** 创建时间 */
|
|
103
|
+
createdAt: string;
|
|
104
|
+
}
|
|
105
|
+
/** 进化事件 */
|
|
106
|
+
export interface EvolutionEvent {
|
|
107
|
+
type: 'EvolutionEvent';
|
|
108
|
+
/** 事件 ID */
|
|
109
|
+
id: string;
|
|
110
|
+
/** 上一个事件 ID(链式追踪) */
|
|
111
|
+
parentId: string | null;
|
|
112
|
+
/** 意图 */
|
|
113
|
+
intent: GeneCategory;
|
|
114
|
+
/** 触发信号 */
|
|
115
|
+
signals: string[];
|
|
116
|
+
/** 使用的 Gene ID 列表 */
|
|
117
|
+
genesUsed: string[];
|
|
118
|
+
/** 爆炸半径 */
|
|
119
|
+
blastRadius: BlastRadius;
|
|
120
|
+
/** 结果 */
|
|
121
|
+
outcome: Outcome;
|
|
122
|
+
/** 成功时生成的 Capsule ID */
|
|
123
|
+
capsuleId: string | null;
|
|
124
|
+
/** 元数据 */
|
|
125
|
+
meta: {
|
|
126
|
+
/** ISO 时间戳 */
|
|
127
|
+
at: string;
|
|
128
|
+
/** 信号指纹 */
|
|
129
|
+
signalKey: string;
|
|
130
|
+
/** 约束检查通过 */
|
|
131
|
+
constraintsOk: boolean;
|
|
132
|
+
/** 验证通过 */
|
|
133
|
+
validationOk: boolean;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
/** 记忆图谱事件类型 */
|
|
137
|
+
export type MemoryGraphEventKind = 'signal' | 'hypothesis' | 'attempt' | 'outcome' | 'confidence_edge';
|
|
138
|
+
/** 记忆图谱事件 */
|
|
139
|
+
export interface MemoryGraphEvent {
|
|
140
|
+
type: 'MemoryGraphEvent';
|
|
141
|
+
kind: MemoryGraphEventKind;
|
|
142
|
+
id: string;
|
|
143
|
+
ts: string;
|
|
144
|
+
signal: {
|
|
145
|
+
/** 信号指纹(去重用) */
|
|
146
|
+
key: string;
|
|
147
|
+
signals: string[];
|
|
148
|
+
errorSignature: string | null;
|
|
149
|
+
};
|
|
150
|
+
gene?: {
|
|
151
|
+
id: string;
|
|
152
|
+
category: string;
|
|
153
|
+
};
|
|
154
|
+
outcome?: {
|
|
155
|
+
status: 'success' | 'failed';
|
|
156
|
+
score: number;
|
|
157
|
+
note: string;
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/** 信号提取输入 */
|
|
161
|
+
export interface SignalInputs {
|
|
162
|
+
/** state.json 当前阶段 */
|
|
163
|
+
currentPhase?: string;
|
|
164
|
+
/** state.json 上一阶段 */
|
|
165
|
+
previousPhase?: string;
|
|
166
|
+
/** Agent 日志内容 */
|
|
167
|
+
agentLog?: string;
|
|
168
|
+
/** 用户输入文本 */
|
|
169
|
+
userInput?: string;
|
|
170
|
+
/** 最近的进化事件列表 */
|
|
171
|
+
recentEvents?: EvolutionEvent[];
|
|
172
|
+
}
|
|
173
|
+
/** 历史分析结果 */
|
|
174
|
+
export interface HistoryAnalysis {
|
|
175
|
+
/** 被抑制的信号集合 */
|
|
176
|
+
suppressedSignals: Set<string>;
|
|
177
|
+
/** 最近的意图列表 */
|
|
178
|
+
recentIntents: string[];
|
|
179
|
+
/** 连续修复次数 */
|
|
180
|
+
consecutiveRepairCount: number;
|
|
181
|
+
/** 空周期计数 */
|
|
182
|
+
emptyCycleCount: number;
|
|
183
|
+
/** 连续空周期计数 */
|
|
184
|
+
consecutiveEmptyCycles: number;
|
|
185
|
+
/** 连续失败计数 */
|
|
186
|
+
consecutiveFailureCount: number;
|
|
187
|
+
/** 最近失败计数 */
|
|
188
|
+
recentFailureCount: number;
|
|
189
|
+
/** 最近失败率 */
|
|
190
|
+
recentFailureRatio: number;
|
|
191
|
+
/** 信号频率 */
|
|
192
|
+
signalFreq: Record<string, number>;
|
|
193
|
+
/** Gene 使用频率 */
|
|
194
|
+
geneFreq: Record<string, number>;
|
|
195
|
+
}
|
|
196
|
+
/** Gene 选择选项 */
|
|
197
|
+
export interface SelectOpts {
|
|
198
|
+
/** 禁止使用的 Gene ID 集合 */
|
|
199
|
+
bannedGeneIds?: Set<string>;
|
|
200
|
+
/** MemoryGraph 推荐的首选 Gene ID */
|
|
201
|
+
preferredGeneId?: string | null;
|
|
202
|
+
/** 是否启用漂移 */
|
|
203
|
+
driftEnabled?: boolean;
|
|
204
|
+
/** 有效群体大小 */
|
|
205
|
+
effectivePopulationSize?: number;
|
|
206
|
+
}
|
|
207
|
+
/** Gene 选择结果 */
|
|
208
|
+
export interface SelectResult {
|
|
209
|
+
/** 选中的 Gene */
|
|
210
|
+
selected: Gene | null;
|
|
211
|
+
/** 备选 Gene 列表 */
|
|
212
|
+
alternatives: Gene[];
|
|
213
|
+
/** 漂移强度 */
|
|
214
|
+
driftIntensity: number;
|
|
215
|
+
}
|
|
216
|
+
/** 固化选项 */
|
|
217
|
+
export interface SolidifyOpts {
|
|
218
|
+
/** 进化意图 */
|
|
219
|
+
intent: GeneCategory;
|
|
220
|
+
/** 使用的 Gene */
|
|
221
|
+
gene: Gene;
|
|
222
|
+
/** 触发信号 */
|
|
223
|
+
signals: string[];
|
|
224
|
+
/** 信号指纹 */
|
|
225
|
+
signalKey: string;
|
|
226
|
+
/** 项目根目录 */
|
|
227
|
+
projectDir: string;
|
|
228
|
+
/** 进化存储实例 */
|
|
229
|
+
store: EvolutionStoreInterface;
|
|
230
|
+
/** 上一个事件 ID */
|
|
231
|
+
parentEventId?: string | null;
|
|
232
|
+
/** 摘要描述 */
|
|
233
|
+
summary?: string;
|
|
234
|
+
/** 是否试运行 */
|
|
235
|
+
dryRun?: boolean;
|
|
236
|
+
}
|
|
237
|
+
/** 固化结果 */
|
|
238
|
+
export interface SolidifyResult {
|
|
239
|
+
/** 是否成功 */
|
|
240
|
+
success: boolean;
|
|
241
|
+
/** 生成的事件 */
|
|
242
|
+
event: EvolutionEvent;
|
|
243
|
+
/** 成功时生成的 Capsule */
|
|
244
|
+
capsule: Capsule | null;
|
|
245
|
+
/** 失败时生成的 FailedCapsule */
|
|
246
|
+
failedCapsule: FailedCapsule | null;
|
|
247
|
+
/** 爆炸半径 */
|
|
248
|
+
blastRadius: BlastRadius;
|
|
249
|
+
/** 约束违规列表 */
|
|
250
|
+
constraintViolations: string[];
|
|
251
|
+
/** 验证结果 */
|
|
252
|
+
validationOk: boolean;
|
|
253
|
+
}
|
|
254
|
+
/** 蒸馏结果 */
|
|
255
|
+
export interface DistillResult {
|
|
256
|
+
/** 是否成功 */
|
|
257
|
+
ok: boolean;
|
|
258
|
+
/** 原因(失败时) */
|
|
259
|
+
reason?: string;
|
|
260
|
+
/** 新生成的 Gene */
|
|
261
|
+
gene?: Gene;
|
|
262
|
+
/** 验证错误 */
|
|
263
|
+
errors?: string[];
|
|
264
|
+
}
|
|
265
|
+
/** 蒸馏就绪检查结果 */
|
|
266
|
+
export interface DistillReadiness {
|
|
267
|
+
/** 是否就绪 */
|
|
268
|
+
ready: boolean;
|
|
269
|
+
/** 原因列表 */
|
|
270
|
+
reasons: string[];
|
|
271
|
+
}
|
|
272
|
+
/** 蒸馏选项 */
|
|
273
|
+
export interface DistillOpts {
|
|
274
|
+
/** LLM 调用函数(可注入,不绑定具体 LLM) */
|
|
275
|
+
llmCall: (prompt: string) => Promise<string>;
|
|
276
|
+
}
|
|
277
|
+
/** 模式分析报告 */
|
|
278
|
+
export interface PatternAnalysis {
|
|
279
|
+
/** 高频模式 */
|
|
280
|
+
highFrequency: Array<{
|
|
281
|
+
geneId: string;
|
|
282
|
+
count: number;
|
|
283
|
+
avgScore: number;
|
|
284
|
+
topTriggers: string[];
|
|
285
|
+
}>;
|
|
286
|
+
/** 策略漂移 */
|
|
287
|
+
strategyDrift: Array<{
|
|
288
|
+
geneId: string;
|
|
289
|
+
similarity: number;
|
|
290
|
+
earlySummary: string;
|
|
291
|
+
recentSummary: string;
|
|
292
|
+
}>;
|
|
293
|
+
/** 覆盖缺口 */
|
|
294
|
+
coverageGaps: Array<{
|
|
295
|
+
signal: string;
|
|
296
|
+
frequency: number;
|
|
297
|
+
}>;
|
|
298
|
+
/** 总成功数 */
|
|
299
|
+
totalSuccess: number;
|
|
300
|
+
/** 总 Capsule 数 */
|
|
301
|
+
totalCapsules: number;
|
|
302
|
+
/** 成功率 */
|
|
303
|
+
successRate: number;
|
|
304
|
+
}
|
|
305
|
+
/** 蒸馏器状态 */
|
|
306
|
+
export interface DistillerState {
|
|
307
|
+
lastRunAt: string | null;
|
|
308
|
+
dataFingerprint: string | null;
|
|
309
|
+
}
|
|
310
|
+
/** 进化存储接口 */
|
|
311
|
+
export interface EvolutionStoreInterface {
|
|
312
|
+
readGenes(): Gene[];
|
|
313
|
+
writeGenes(genes: Gene[]): void;
|
|
314
|
+
readCapsules(): Capsule[];
|
|
315
|
+
writeCapsules(capsules: Capsule[]): void;
|
|
316
|
+
readEvents(): EvolutionEvent[];
|
|
317
|
+
appendEvent(event: EvolutionEvent): void;
|
|
318
|
+
readMemoryGraphEvents(): MemoryGraphEvent[];
|
|
319
|
+
appendMemoryGraphEvent(event: MemoryGraphEvent): void;
|
|
320
|
+
readFailedCapsules(): FailedCapsule[];
|
|
321
|
+
appendFailedCapsule(capsule: FailedCapsule): void;
|
|
322
|
+
readDistillerState(): DistillerState;
|
|
323
|
+
writeDistillerState(state: DistillerState): void;
|
|
324
|
+
}
|
|
325
|
+
/** 系统硬上限:最大文件数 */
|
|
326
|
+
export declare const HARD_CAP_FILES = 60;
|
|
327
|
+
/** 系统硬上限:最大行数 */
|
|
328
|
+
export declare const HARD_CAP_LINES = 20000;
|
|
329
|
+
/** 验证命令超时(毫秒) */
|
|
330
|
+
export declare const VALIDATION_TIMEOUT_MS = 180000;
|
|
331
|
+
/** 蒸馏 Gene ID 前缀 */
|
|
332
|
+
export declare const DISTILLED_ID_PREFIX = "gene_distilled_";
|
|
333
|
+
/** 蒸馏 Gene 最大文件数 */
|
|
334
|
+
export declare const DISTILLED_MAX_FILES = 12;
|
|
335
|
+
/** 蒸馏最小 Capsule 数 */
|
|
336
|
+
export declare const DISTILLER_MIN_CAPSULES = 10;
|
|
337
|
+
/** 蒸馏最小间隔(小时) */
|
|
338
|
+
export declare const DISTILLER_INTERVAL_HOURS = 24;
|
|
339
|
+
/** 蒸馏最小成功率 */
|
|
340
|
+
export declare const DISTILLER_MIN_SUCCESS_RATE = 0.7;
|
|
341
|
+
/** 机会信号列表 */
|
|
342
|
+
export declare const OPPORTUNITY_SIGNALS: readonly ["user_feature_request", "user_improvement_suggestion", "perf_bottleneck", "capability_gap", "stable_success_plateau", "external_opportunity", "recurring_error", "unsupported_input_type", "evolution_stagnation_detected", "repair_loop_detected", "force_innovation_after_repair_loop"];
|
|
343
|
+
/** MemoryGraph Jaccard 相似度阈值 */
|
|
344
|
+
export declare const JACCARD_THRESHOLD = 0.34;
|
|
345
|
+
/** MemoryGraph 半衰期(天) */
|
|
346
|
+
export declare const HALF_LIFE_DAYS = 30;
|
|
347
|
+
/** 蒸馏 Gene 降权系数 */
|
|
348
|
+
export declare const DISTILLED_SCORE_FACTOR = 0.8;
|
|
349
|
+
/** 验证命令允许的前缀 */
|
|
350
|
+
export declare const VALIDATION_ALLOWED_PREFIXES: readonly ["node ", "npm ", "npx "];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x1545(_0x125b78,_0x5122ec){_0x125b78=_0x125b78-(0x692+-0x207e+0x1d*0xec);const _0x385b79=_0x6254();let _0x24b9f1=_0x385b79[_0x125b78];if(_0x1545['mjDXgU']===undefined){var _0x232e36=function(_0x5f21ee){const _0x390e8d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2c86f3='',_0x5be598='';for(let _0x2aae23=0x369*0x3+0x2254+-0x2c8f,_0x345774,_0x464e3a,_0x4e1997=0x1*0x2277+0x21e2+-0x4459;_0x464e3a=_0x5f21ee['charAt'](_0x4e1997++);~_0x464e3a&&(_0x345774=_0x2aae23%(0x1b4a+-0x1d48+0x101*0x2)?_0x345774*(0x95d+-0x4b5+-0x468)+_0x464e3a:_0x464e3a,_0x2aae23++%(-0x11b*-0x1f+-0x599+-0x1ca8))?_0x2c86f3+=String['fromCharCode'](0xb*-0xd7+-0x88c+0x259*0x8&_0x345774>>(-(-0x8cb*-0x1+0x2309+-0x2bd2)*_0x2aae23&0x4d8+0x14ce+-0xa0*0x29)):0x2*0x5fb+-0x1*0x1279+0x1*0x683){_0x464e3a=_0x390e8d['indexOf'](_0x464e3a);}for(let _0x54eaea=0x1811+0x16d8+0xfa3*-0x3,_0x1c352f=_0x2c86f3['length'];_0x54eaea<_0x1c352f;_0x54eaea++){_0x5be598+='%'+('00'+_0x2c86f3['charCodeAt'](_0x54eaea)['toString'](0x1337+-0x22a0+0xe9*0x11))['slice'](-(0xd4f*0x2+-0x2169*0x1+-0x6cd*-0x1));}return decodeURIComponent(_0x5be598);};_0x1545['VCdzvy']=_0x232e36,_0x1545['nNytdD']={},_0x1545['mjDXgU']=!![];}const _0x4e5700=_0x385b79[0xbec+-0x127f+0x693],_0x13655a=_0x125b78+_0x4e5700,_0xbda799=_0x1545['nNytdD'][_0x13655a];return!_0xbda799?(_0x24b9f1=_0x1545['VCdzvy'](_0x24b9f1),_0x1545['nNytdD'][_0x13655a]=_0x24b9f1):_0x24b9f1=_0xbda799,_0x24b9f1;}(function(_0x48e95e,_0x45a09d){const _0x14218a={_0x4847fc:0x4b9,_0x21e050:0x4ab,_0x380d6c:0x4b5,_0x265a93:0x4b1,_0x19b603:0x4b8,_0xcabfb7:0x49d,_0x3aab53:0x4ac,_0x22a812:0x4bb,_0x4dcd7b:0x498,_0x21106d:0x4a2};function _0x55db26(_0x15d100,_0x537cb3){return _0x1545(_0x537cb3-0x3cb,_0x15d100);}const _0x5a6d16=_0x48e95e();function _0x48082f(_0x5f2961,_0x8b028e){return _0x1545(_0x8b028e-0x6e,_0x5f2961);}while(!![]){try{const _0x23fd7d=-parseInt(_0x55db26(0x49f,0x49b))/(0x18a*-0x7+-0xdb5+0x187c)+-parseInt(_0x55db26(0x4be,_0x14218a._0x4847fc))/(-0x14da+0x20*-0xf1+0x32fc)*(-parseInt(_0x55db26(_0x14218a._0x21e050,0x4a3))/(-0x1308+0x1496+0x1*-0x18b))+parseInt(_0x55db26(_0x14218a._0x380d6c,0x4aa))/(0x1*0x261d+-0x111a+0x433*-0x5)+parseInt(_0x55db26(_0x14218a._0x265a93,_0x14218a._0x19b603))/(-0xfb7+0x2116+-0x115a)+-parseInt(_0x55db26(0x496,_0x14218a._0xcabfb7))/(0x27*-0xb3+0x1*0xab5+0x182*0xb)+parseInt(_0x55db26(0x4ae,_0x14218a._0x3aab53))/(-0xdf3*0x2+-0x1574+0x1*0x3161)+parseInt(_0x55db26(_0x14218a._0x22a812,0x4ab))/(0x2359+-0x1d70+-0x5e1)*(parseInt(_0x55db26(_0x14218a._0x4dcd7b,_0x14218a._0x21106d))/(-0x1*0x1f77+-0x14da*-0x1+-0x2f*-0x3a));if(_0x23fd7d===_0x45a09d)break;else _0x5a6d16['push'](_0x5a6d16['shift']());}catch(_0x216fdd){_0x5a6d16['push'](_0x5a6d16['shift']());}}}(_0x6254,-0x4*-0x13faf+0x4*-0x57140+-0x13*-0x19221));function _0x6254(){const _0x1c47c6=['mJaWnJDrvxbzB08','C3rHz25HDgLVBG','BgXLzf8','Dw5ZDxbWB3j0zq','z2vUzv9KAxn0Aq','DxnLCL9PBxbYBW','DxnLCL9Mzwf0Dq','mZK5ody1mLLJDgfIra','ohrPqvDoCq','nde0mZK1mxPrrNHQBW','CMvWywLYx2XVBW','Cf9KzxrLy3rLza','zxjYB3i','DMf0Aw9Ux2fMDa','zxjFCMvWywLYxW','z2vZDgLVBG','BNbTia','zw5Ly2S','C3rHyMXLx3n1yW','zf9PBNb1Df90Eq','BM9Kzsa','nZK2ndG1nxHPC2XKBq','mJjgEvL4q00','mtq2ntiWn3v0uwTNza','CgvYzL9IB3r0Ba','otaZnde2nfbPwur1zq','x2rLDgvJDgvK','ChbVCNr1BML0Eq','CMvJDxjYAw5NxW','zxzVBhv0Aw9UxW','nteYmZG2mLLjreLtua'];_0x6254=function(){return _0x1c47c6;};return _0x6254();}function _0x57d9f9(_0x55b44c,_0x1aab76){const _0x54e7a1={_0x503a2d:0x11b};return _0x1545(_0x55b44c- -_0x54e7a1._0x503a2d,_0x1aab76);}export const HARD_CAP_FILES=0x24e1*-0x1+0x3*-0x4ba+0x334b;export const HARD_CAP_LINES=-0x8846+0x6d26+0x6940;export const VALIDATION_TIMEOUT_MS=-0x1*-0x2ba4b+0x3d491+-0x3cfbc;export const DISTILLED_ID_PREFIX=_0x288e76(-0x21b,-0x21e)+_0x288e76(-0x224,-0x220);export const DISTILLED_MAX_FILES=-0x262f+-0x11b*-0x1f+0x3f6;export const DISTILLER_MIN_CAPSULES=-0x1a59+0xb*-0xd7+0x23a0;export const DISTILLER_INTERVAL_HOURS=0x55b*0x1+-0xb5*-0x1f+-0x1b2e;export const DISTILLER_MIN_SUCCESS_RATE=-0x4*0x21b+0x4d8+-0xe5*-0x4+0.7;function _0x288e76(_0x30c3ab,_0x46eeba){return _0x1545(_0x46eeba- -0x2fa,_0x30c3ab);}export const OPPORTUNITY_SIGNALS=[_0x288e76(-0x21e,-0x21c)+'re_request',_0x57d9f9(-0x3e,-0x49)+'vement_sug'+_0x57d9f9(-0x34,-0x43),_0x57d9f9(-0x4a,-0x3b)+_0x288e76(-0x209,-0x211),'capability'+'_gap',_0x57d9f9(-0x31,-0x3f)+'cess_plate'+'au','external_o'+_0x288e76(-0x221,-0x226),_0x57d9f9(-0x46,-0x3d)+_0x57d9f9(-0x37,-0x40),_0x57d9f9(-0x40,-0x49)+_0x288e76(-0x210,-0x20f)+'pe',_0x288e76(-0x214,-0x224)+_0x288e76(-0x21d,-0x221)+_0x288e76(-0x223,-0x227),_0x57d9f9(-0x39,-0x38)+_0x57d9f9(-0x38,-0x2f),'force_inno'+_0x57d9f9(-0x36,-0x27)+_0x288e76(-0x216,-0x214)+'loop'];export const JACCARD_THRESHOLD=0x2*0x5fb+-0x1*0x1279+0x1*0x683+0.34;export const HALF_LIFE_DAYS=0x1811+0x16d8+0x79*-0x63;export const DISTILLED_SCORE_FACTOR=0x1337+-0x22a0+0x315*0x5+0.8;export const VALIDATION_ALLOWED_PREFIXES=[_0x57d9f9(-0x2f,-0x28),_0x57d9f9(-0x33,-0x3a),'npx\x20'];
|
package/dist/init.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* init 命令 — 将 .opencode/ 目录(skills + agent)复制到用户项目的工作目录下
|
|
3
|
+
*
|
|
4
|
+
* 调用方式:
|
|
5
|
+
* specops init -d /path/to/project
|
|
6
|
+
*
|
|
7
|
+
* 复制内容:
|
|
8
|
+
* .opencode/skills/demand-analysis/SKILL.md
|
|
9
|
+
* .opencode/skills/competitor-search/SKILL.md
|
|
10
|
+
* .opencode/skills/feature-search/SKILL.md
|
|
11
|
+
* .opencode/skills/tech-selection/SKILL.md
|
|
12
|
+
* .opencode/agent/demand-analyst.md
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* 初始化项目 — 复制 .opencode/ 到目标目录
|
|
16
|
+
*/
|
|
17
|
+
export declare function initProject(targetDir: string, options?: {
|
|
18
|
+
force?: boolean;
|
|
19
|
+
}): Promise<void>;
|
package/dist/init.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x52d376,_0x7c0b27){const _0x57c7be={_0x35a401:0x320,_0xb3312c:0x47d,_0xe4d83f:0x46b,_0x37b83a:0x33c,_0x1cd033:0x333,_0x1a9757:0x4ef,_0x5a72a5:0x32c,_0x57415c:0x338,_0x189fc7:0x489,_0x3561d1:0x486},_0x2461f0={_0x304b3b:0x321};function _0x3997ca(_0x495b6b,_0x17668e){return _0x3ae6(_0x495b6b-_0x2461f0._0x304b3b,_0x17668e);}function _0x274b4b(_0x565035,_0x1562cf){return _0x3ae6(_0x565035-0x1a5,_0x1562cf);}const _0x224de1=_0x52d376();while(!![]){try{const _0x50c65e=-parseInt(_0x274b4b(0x33f,_0x57c7be._0x35a401))/(0x147f+0x592+-0x1a10*0x1)*(parseInt(_0x3997ca(_0x57c7be._0xb3312c,_0x57c7be._0xe4d83f))/(-0x74+0xabc+-0x2*0x523))+parseInt(_0x274b4b(_0x57c7be._0x37b83a,_0x57c7be._0x1cd033))/(-0x1*0x2029+0x1d56+0x2d6)*(parseInt(_0x274b4b(_0x57c7be._0x1cd033,0x349))/(-0x2*-0xd47+-0x1*-0x33+-0x1abd))+parseInt(_0x3997ca(0x46c,0x45d))/(0xaef+0xda3+-0x188d)*(-parseInt(_0x274b4b(0x315,0x336))/(-0x2247+-0x11b6+0x3403))+-parseInt(_0x3997ca(0x4c1,_0x57c7be._0x1a9757))/(-0x661*0x4+-0x19*0x73+-0x416*-0x9)*(parseInt(_0x274b4b(_0x57c7be._0x5a72a5,_0x57c7be._0x57415c))/(0x39*-0x55+0x19b*-0x13+0x3176*0x1))+-parseInt(_0x274b4b(0x2fd,0x307))/(0x1*-0x1862+0x4f+0x181c)+parseInt(_0x274b4b(0x2fc,0x327))/(0xd64+-0x53e*-0x1+-0x1298)*(parseInt(_0x3997ca(_0x57c7be._0x189fc7,0x466))/(0x13*-0xdb+-0x29*0x9e+-0x2*-0x14cd))+-parseInt(_0x3997ca(_0x57c7be._0x3561d1,0x477))/(-0x23ae*-0x1+0x97f*-0x2+-0x10a4)*(-parseInt(_0x3997ca(0x4c0,0x4a8))/(0x44f*0x1+-0x725+0x2e3));if(_0x50c65e===_0x7c0b27)break;else _0x224de1['push'](_0x224de1['shift']());}catch(_0x12a93a){_0x224de1['push'](_0x224de1['shift']());}}}(_0x483a,-0x10588*-0x1+0xbf7*-0x33+-0x9*-0x7275));import{existsSync,mkdirSync,cpSync,readdirSync,statSync}from'node:fs';import{join,resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),kanbanV1Root=resolve(__dirname,'..'),sourceOpencode=join(kanbanV1Root,'.opencode');function _0x3ae6(_0x4c08ee,_0xa2cb81){_0x4c08ee=_0x4c08ee-(0x9*-0x393+-0x3*-0x61b+0xf23);const _0xdca815=_0x483a();let _0x3b9225=_0xdca815[_0x4c08ee];if(_0x3ae6['ILwwGY']===undefined){var _0x3b1995=function(_0x590cb9){const _0x34573a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1c4434='',_0x283c78='';for(let _0x3ce733=-0x1f2a+0xcda+0x125*0x10,_0x26e581,_0x3eadf3,_0x50cbb1=-0x2c5+0x1*-0x1e36+0x20fb;_0x3eadf3=_0x590cb9['charAt'](_0x50cbb1++);~_0x3eadf3&&(_0x26e581=_0x3ce733%(-0x16ee+0x2d*-0x49+0x23c7)?_0x26e581*(0xa46+-0x541+-0x25*0x21)+_0x3eadf3:_0x3eadf3,_0x3ce733++%(0xf2f+0x11c*-0x16+-0x37*-0x2b))?_0x1c4434+=String['fromCharCode'](0xb3*0x2e+-0x256d+0x642&_0x26e581>>(-(-0x1eb*0x3+-0x1*-0x2351+-0x1d8e)*_0x3ce733&-0x606+0x1b2b*0x1+0x1*-0x151f)):0x1593*0x1+-0xb10+-0xa83){_0x3eadf3=_0x34573a['indexOf'](_0x3eadf3);}for(let _0x126fcd=-0x2f*-0x2d+-0x25d9+0x1d96,_0x509439=_0x1c4434['length'];_0x126fcd<_0x509439;_0x126fcd++){_0x283c78+='%'+('00'+_0x1c4434['charCodeAt'](_0x126fcd)['toString'](-0x1*0x72+-0x17f2+0x1874))['slice'](-(-0x2164+-0x1b*0x147+0x43e3));}return decodeURIComponent(_0x283c78);};_0x3ae6['cxiZoa']=_0x3b1995,_0x3ae6['lrTgyp']={},_0x3ae6['ILwwGY']=!![];}const _0x32759f=_0xdca815[-0xc3*-0x1a+0xa*-0x34d+-0x4*-0x34d],_0x59725e=_0x4c08ee+_0x32759f,_0x7e3763=_0x3ae6['lrTgyp'][_0x59725e];return!_0x7e3763?(_0x3b9225=_0x3ae6['cxiZoa'](_0x3b9225),_0x3ae6['lrTgyp'][_0x59725e]=_0x3b9225):_0x3b9225=_0x7e3763,_0x3b9225;}function countFiles(_0x29b1bf){const _0x33a87c={_0x1d2b8e:0x2f5,_0x2ce74c:0x2ce,_0xeb6514:0x2e2,_0x26d71a:0x2da,_0x1a3232:0x2bc,_0x2a2eb5:0x2b6,_0x1b235a:0x2aa,_0x5540a0:0x2bf,_0xe322bf:0x2d6,_0x226ee4:0x2de,_0x5b64e7:0x2af,_0x433979:0x2ed,_0x301440:0x2c3,_0x6d9599:0x2bf,_0x39143a:0x2bf,_0x2c28b3:0x2ae,_0x5ce302:0x2b8,_0x207e33:0x2db,_0x3b60ae:0x2b3},_0x49c2d3={_0x37ca28:0x142},_0x531e72={'PnavE':function(_0x38b17a,_0x207b90,_0x3359d7){return _0x38b17a(_0x207b90,_0x3359d7);},'QWWGO':function(_0x2e8a1e,_0x4605bd){return _0x2e8a1e(_0x4605bd);},'PFjFz':_0x23cc86(_0x33a87c._0x1d2b8e,0x306)+_0x49b289(0x2aa,_0x33a87c._0x2ce74c)+'/,使用\x20--for'+'ce\x20覆盖','CLGIW':'\x20\x20\x20路径:','NKGZA':function(_0x1a5306,_0x31d3e5){return _0x1a5306!==_0x31d3e5;},'iXGuu':_0x23cc86(_0x33a87c._0xeb6514,0x303),'QGdam':'ZJOqq','YbgHk':_0x23cc86(0x2fd,_0x33a87c._0x26d71a)};if(!existsSync(_0x29b1bf))return-0x23a3+0x1*0x24f5+-0x152;function _0x49b289(_0x179433,_0x827cbc){return _0x3ae6(_0x827cbc-_0x49c2d3._0x37ca28,_0x179433);}let _0x20fc10=0x18e*-0x1+0x2321+0x23d*-0xf;for(const _0x23c868 of _0x531e72[_0x49b289(_0x33a87c._0x1a3232,_0x33a87c._0x2a2eb5)](readdirSync,_0x29b1bf)){if(_0x531e72['NKGZA'](_0x531e72[_0x49b289(_0x33a87c._0x1b235a,0x2cc)],_0x23cc86(0x2fc,0x303))){const _0x3e4e95={};_0x3e4e95['recursive']=!![],_0x4fd2ce(_0x2a5f18,_0x3e4e95);}else{const _0x534514=join(_0x29b1bf,_0x23c868);if(_0x531e72[_0x23cc86(_0x33a87c._0x5540a0,_0x33a87c._0xe322bf)](statSync,_0x534514)[_0x49b289(0x2cf,_0x33a87c._0x226ee4)+'y']()){if(_0x531e72['NKGZA'](_0x531e72[_0x23cc86(_0x33a87c._0x5b64e7,0x2c9)],_0x49b289(0x303,0x2d5)))_0x20fc10+=_0x531e72[_0x49b289(0x2a0,_0x33a87c._0x2a2eb5)](countFiles,_0x534514);else{const _0x1277a4=_0x531e72['PnavE'](_0xf7db42,_0x53ce68,_0x183618);_0x29a923(_0x1277a4)[_0x23cc86(_0x33a87c._0x433979,0x2fe)+'y']()?_0x3f712d+=_0x531e72['QWWGO'](_0x5a313d,_0x1277a4):_0x3cb717++;}}else _0x531e72[_0x49b289(_0x33a87c._0x301440,_0x33a87c._0x6d9599)]!==_0x531e72[_0x49b289(0x2e8,_0x33a87c._0x39143a)]?(_0x47dbda[_0x49b289(0x2d4,_0x33a87c._0x2c28b3)](_0x531e72[_0x23cc86(_0x33a87c._0x5ce302,0x2d9)]),_0x766aaa[_0x23cc86(_0x33a87c._0x207e33,0x2ce)](_0x531e72[_0x23cc86(0x2da,0x2eb)],_0x492968),_0x101341[_0x49b289(0x29a,_0x33a87c._0x3b60ae)](-0x2619+-0x3df*-0x7+0x9*0x139)):_0x20fc10++;}}function _0x23cc86(_0xf7d1ec,_0x13ef5e){return _0x3ae6(_0x13ef5e-0x162,_0xf7d1ec);}return _0x20fc10;}export async function initProject(_0x5d1d2e,_0x38d672={}){const _0xdeb2fb={_0x33dfef:0x228,_0x3e9773:0x258,_0x5f102d:0x33f,_0x14a40b:0x33c,_0x4a9abd:0x314,_0xb8447d:0x213,_0x43354a:0x23b,_0x559779:0x320,_0x4f1e08:0x234,_0xe76053:0x213,_0x4ce63d:0x346,_0x3c4897:0x337,_0x4da956:0x260,_0x4cb63c:0x257,_0x5b672b:0x259,_0x4277ae:0x32a,_0x1a68a7:0x368,_0x1d988f:0x374,_0x3f5ec7:0x31c,_0x3e8580:0x342,_0x3dd863:0x327,_0x4cfd12:0x356,_0x5bdebc:0x20b,_0x4da869:0x31f,_0xa8a0f:0x2fb,_0xdd518:0x263,_0x5f312e:0x225,_0x4435ff:0x20e,_0x2d3daa:0x214,_0x3c93ff:0x212,_0x5095f3:0x23b,_0x2296f8:0x32e,_0x201e13:0x238,_0xe1a274:0x23d,_0x212ca5:0x345,_0x35e671:0x277,_0x3a8095:0x25c,_0x554266:0x34e,_0x3a582f:0x224,_0x5c4803:0x225,_0x287089:0x21b,_0x467e14:0x23f,_0x232aad:0x340,_0x4b53b6:0x342,_0x1fe0cd:0x35b,_0x2c04da:0x353,_0x3382d4:0x24e,_0x4f9b3c:0x24c,_0x545e38:0x338,_0x445f59:0x348,_0x2e4dc1:0x248,_0x1e94ae:0x358,_0x26eaa9:0x341,_0x2b379f:0x22d,_0x38441b:0x25b,_0x5a7f4a:0x22c,_0x5ed2d4:0x243,_0x53871c:0x369,_0x2f0d83:0x348,_0x9bd476:0x31b,_0x40e0f0:0x325,_0x3084f6:0x224,_0xa566f6:0x206,_0x5c7ac3:0x376,_0x38b2ed:0x210,_0x2ee3d4:0x210,_0x235345:0x30f,_0x1f4db5:0x225,_0x56f022:0x225,_0x393b71:0x1fd,_0x553030:0x34a,_0x99ba68:0x336,_0x1cd71d:0x325,_0x46fd4e:0x244,_0x5393d5:0x223,_0x1037da:0x215,_0x133045:0x260,_0x4f79bf:0x21e,_0x4b1577:0x324,_0x44058a:0x306,_0x2d3267:0x237,_0x570208:0x328,_0x230d87:0x20c,_0x412c42:0x355,_0x3f3c9f:0x33f,_0x55c725:0x25d,_0x4f23ca:0x239},_0x4462a9={'aBJJj':function(_0x5871a7,_0x368e57,_0x31bec1){return _0x5871a7(_0x368e57,_0x31bec1);},'kGKgl':_0x3474dd(-_0xdeb2fb._0x33dfef,-0x23e),'uvnkl':function(_0x186e60,_0x12f12c){return _0x186e60(_0x12f12c);},'IRMns':function(_0x317616,_0x41ba76){return _0x317616(_0x41ba76);},'txBzh':_0x3474dd(-_0xdeb2fb._0x33dfef,-0x205)+_0x3474dd(-0x200,-0x21d)+_0x3474dd(-_0xdeb2fb._0x3e9773,-0x25a)+_0x34c08d(_0xdeb2fb._0x5f102d,0x353),'cgaQa':_0x34c08d(_0xdeb2fb._0x14a40b,_0xdeb2fb._0x4a9abd),'qnFTK':_0x3474dd(-_0xdeb2fb._0xb8447d,-_0xdeb2fb._0x43354a)+_0x34c08d(_0xdeb2fb._0x559779,0x32d),'iJgSH':_0x3474dd(-_0xdeb2fb._0x4f1e08,-_0xdeb2fb._0xe76053),'dLtIa':function(_0x5c5de3,_0xddfc54,_0x5bf107,_0x177611){return _0x5c5de3(_0xddfc54,_0x5bf107,_0x177611);},'OeYkd':_0x34c08d(_0xdeb2fb._0x4ce63d,_0xdeb2fb._0x3c4897),'OjwaK':_0x3474dd(-_0xdeb2fb._0x4da956,-_0xdeb2fb._0x4cb63c)+_0x3474dd(-_0xdeb2fb._0x5b672b,-0x23c),'DEVEA':'tech-selec'+_0x34c08d(_0xdeb2fb._0x4277ae,0x32c),'tsnhZ':function(_0x2f9ee2,_0x3f67c4,_0x29994a){return _0x2f9ee2(_0x3f67c4,_0x29994a);},'zCbSe':function(_0x5cedd4,_0xd6c0e3,_0x4b3b16,_0x428a89){return _0x5cedd4(_0xd6c0e3,_0x4b3b16,_0x428a89);},'ueTGF':function(_0x3295e8,_0xcb68e8,_0x1c3edf){return _0x3295e8(_0xcb68e8,_0x1c3edf);},'gqqFH':_0x3474dd(-_0xdeb2fb._0x3e9773,-0x25f),'dbUAe':function(_0x60a5a,_0x3cd0bc,_0x2430ee){return _0x60a5a(_0x3cd0bc,_0x2430ee);},'nRyVB':_0x34c08d(_0xdeb2fb._0x1a68a7,_0xdeb2fb._0x1d988f)+_0x34c08d(_0xdeb2fb._0x3f5ec7,_0xdeb2fb._0x3e8580)+')','CSekX':_0x34c08d(0x329,0x353),'ccauG':_0x3474dd(-0x23b,-0x236)+_0x34c08d(_0xdeb2fb._0x3dd863,_0xdeb2fb._0x4cfd12)+_0x3474dd(-0x220,-_0xdeb2fb._0x5bdebc)+_0x34c08d(_0xdeb2fb._0x4da869,0x319),'sFuUM':_0x3474dd(-0x268,-0x23a)+'encode\x20会自动'+'加载\x20.openco'+'de/\x20下的\x20ski'+_0x34c08d(0x316,_0xdeb2fb._0xa8a0f)},_0x5bc86c=resolve(_0x5d1d2e),_0x224d8a=_0x4462a9[_0x3474dd(-_0xdeb2fb._0xdd518,-0x24e)](join,_0x5bc86c,_0x4462a9[_0x3474dd(-_0xdeb2fb._0x5f312e,-0x204)]);!_0x4462a9['uvnkl'](existsSync,sourceOpencode)&&(console[_0x3474dd(-_0xdeb2fb._0x4435ff,-_0xdeb2fb._0x2d3daa)](_0x3474dd(-0x1e7,-0x20e)+'ode/\x20目录不存在'+':',sourceOpencode),process[_0x34c08d(_0xdeb2fb._0x3c4897,0x332)](-0x20ce+0x26dc+-0x60d));!_0x4462a9[_0x3474dd(-_0xdeb2fb._0x3c93ff,-0x234)](existsSync,_0x5bc86c)&&(console[_0x3474dd(-_0xdeb2fb._0x5095f3,-0x214)]('❌\x20目标目录不存在:',_0x5bc86c),process['exit'](-0x359*-0xb+0xed3+-0x3f9*0xd));_0x4462a9[_0x34c08d(0x31b,_0xdeb2fb._0x2296f8)](existsSync,_0x224d8a)&&!_0x38d672['force']&&(console[_0x3474dd(-_0xdeb2fb._0x201e13,-_0xdeb2fb._0xe1a274)](_0x4462a9[_0x3474dd(-0x237,-0x249)]),console[_0x3474dd(-0x21d,-0x23d)](_0x4462a9[_0x34c08d(_0xdeb2fb._0x212ca5,0x36f)],_0x224d8a),process['exit'](-0x937*-0x4+-0x81*0x47+-0x114));console[_0x3474dd(-0x243,-0x225)](_0x4462a9[_0x3474dd(-_0xdeb2fb._0x35e671,-_0xdeb2fb._0x3a8095)]);function _0x3474dd(_0x30092b,_0x5aacba){return _0x3ae6(_0x5aacba- -0x3a9,_0x30092b);}console['log'](_0x34c08d(_0xdeb2fb._0x554266,0x36b),sourceOpencode),console[_0x3474dd(-_0xdeb2fb._0x3a582f,-_0xdeb2fb._0x5c4803)](_0x4462a9[_0x34c08d(0x35e,0x378)],_0x224d8a),console[_0x3474dd(-_0xdeb2fb._0x287089,-0x225)]();const _0x44c8b5=[_0x4462a9[_0x3474dd(-0x225,-_0xdeb2fb._0x467e14)](join,_0x224d8a,_0x4462a9[_0x34c08d(_0xdeb2fb._0x232aad,0x33e)],_0x34c08d(_0xdeb2fb._0x4b53b6,_0xdeb2fb._0x1fe0cd)+'lysis'),join(_0x224d8a,_0x4462a9[_0x34c08d(0x340,0x341)],'competitor'+'-search'),join(_0x224d8a,_0x4462a9[_0x34c08d(0x340,_0xdeb2fb._0x2c04da)],_0x4462a9['OjwaK']),join(_0x224d8a,'skills',_0x4462a9[_0x3474dd(-_0xdeb2fb._0x3382d4,-_0xdeb2fb._0x4f9b3c)]),_0x4462a9[_0x34c08d(0x319,_0xdeb2fb._0x545e38)](join,_0x224d8a,'agent')];for(const _0x1c484d of _0x44c8b5){const _0x496b2f={};_0x496b2f[_0x34c08d(_0xdeb2fb._0x445f59,_0xdeb2fb._0x5f102d)]=!![],mkdirSync(_0x1c484d,_0x496b2f);}const _0x69e704=['demand-ana'+'lysis',_0x3474dd(-_0xdeb2fb._0x2e4dc1,-0x255)+_0x34c08d(_0xdeb2fb._0x1e94ae,0x351),_0x4462a9[_0x34c08d(_0xdeb2fb._0x26eaa9,0x32e)],_0x3474dd(-_0xdeb2fb._0x2b379f,-_0xdeb2fb._0x38441b)+'tion'];for(const _0x1cd7c7 of _0x69e704){if('duFhG'!=='duFhG')_0x17ebc6++;else{const _0x3e0cd4=join(sourceOpencode,'skills',_0x1cd7c7),_0x268df7=join(_0x224d8a,_0x4462a9[_0x34c08d(0x340,0x334)],_0x1cd7c7),_0x897d0a={};_0x897d0a['recursive']=!![],_0x4462a9['zCbSe'](cpSync,_0x3e0cd4,_0x268df7,_0x897d0a);const _0xcf506b=_0x4462a9[_0x3474dd(-_0xdeb2fb._0x5a7f4a,-0x234)](countFiles,_0x268df7);console[_0x3474dd(-_0xdeb2fb._0x5ed2d4,-0x225)](_0x3474dd(-_0xdeb2fb._0xe1a274,-0x218)+'s/'+_0x1cd7c7+'/\x20('+_0xcf506b+_0x34c08d(_0xdeb2fb._0x53871c,0x383));}}const _0x2de61b=_0x4462a9['ueTGF'](join,sourceOpencode,_0x3474dd(-0x255,-0x25f)),_0x19b9d9=join(_0x224d8a,_0x4462a9[_0x34c08d(0x353,0x353)]),_0x20ea63={};_0x20ea63[_0x34c08d(_0xdeb2fb._0x2f0d83,0x342)]=!![],cpSync(_0x2de61b,_0x19b9d9,_0x20ea63);const _0x1af184=_0x4462a9[_0x34c08d(_0xdeb2fb._0x9bd476,0x33f)](countFiles,_0x19b9d9);console[_0x34c08d(0x34a,_0xdeb2fb._0x40e0f0)](_0x3474dd(-0x227,-0x219)+_0x34c08d(0x32f,0x320)+_0x1af184+_0x3474dd(-_0xdeb2fb._0x3084f6,-_0xdeb2fb._0xa566f6));const _0x427daf=_0x4462a9[_0x34c08d(0x351,_0xdeb2fb._0x5c7ac3)](join,_0x5bc86c,_0x3474dd(-_0xdeb2fb._0x38b2ed,-_0xdeb2fb._0x2ee3d4));if(!_0x4462a9['IRMns'](existsSync,_0x427daf)){const _0xd869c4={};_0xd869c4[_0x34c08d(0x348,0x319)]=!![],_0x4462a9['aBJJj'](mkdirSync,_0x427daf,_0xd869c4),console[_0x34c08d(0x34a,0x35d)](_0x4462a9[_0x34c08d(_0xdeb2fb._0x235345,0x2ff)]);}console[_0x3474dd(-0x207,-_0xdeb2fb._0x1f4db5)](),console[_0x3474dd(-0x23e,-_0xdeb2fb._0x56f022)](_0x3474dd(-_0xdeb2fb._0x4f1e08,-0x22b));function _0x34c08d(_0x2ac59b,_0x570a60){return _0x3ae6(_0x2ac59b-0x1c6,_0x570a60);}console[_0x3474dd(-_0xdeb2fb._0x393b71,-_0xdeb2fb._0x56f022)](),console[_0x34c08d(_0xdeb2fb._0x553030,0x339)](_0x4462a9[_0x34c08d(0x347,_0xdeb2fb._0x99ba68)]),console[_0x3474dd(-0x1f7,-0x225)](_0x4462a9[_0x34c08d(_0xdeb2fb._0x1cd71d,0x315)]),console[_0x3474dd(-_0xdeb2fb._0x46fd4e,-0x225)](_0x3474dd(-0x24c,-_0xdeb2fb._0x5393d5)+'Agent(需求分析'+_0x3474dd(-0x236,-_0xdeb2fb._0x1037da)),console[_0x3474dd(-0x229,-_0xdeb2fb._0x5f312e)](),console[_0x34c08d(_0xdeb2fb._0x553030,0x370)](_0x3474dd(-_0xdeb2fb._0x133045,-0x258)),console['log'](_0x4462a9['sFuUM']),console[_0x3474dd(-_0xdeb2fb._0x4f79bf,-0x225)](_0x34c08d(_0xdeb2fb._0x4b1577,_0xdeb2fb._0x44058a)+_0x3474dd(-0x232,-_0xdeb2fb._0x2d3267)+_0x34c08d(0x34b,0x32b)+_0x34c08d(_0xdeb2fb._0x570208,0x333)+'析链路'),console[_0x3474dd(-0x1f7,-_0xdeb2fb._0x1f4db5)](_0x3474dd(-0x205,-_0xdeb2fb._0x230d87)+_0x34c08d(0x349,_0xdeb2fb._0x554266)+_0x34c08d(_0xdeb2fb._0x412c42,_0xdeb2fb._0x3f3c9f)+_0x3474dd(-0x246,-_0xdeb2fb._0x55c725)+_0x3474dd(-_0xdeb2fb._0x4f23ca,-0x243));}function _0x483a(){const _0x35f2d8=['ChmGywr2yw5Jzq','Bg9N','yw5KlwfUywX5CW','icdWN6swideG5lIQ57Yw5O6sia','mte0nda4vLv4vfn0','icaG5RQq55UU5B2voG','q0XhsvC','AvHhDxu','zgjvqwu','ic5VCgvUy29Kzq','z3fXrKG','nJb5v2fqt0u','l3vWzgf0zs1VCa','icaG4PYfigfNzw50','icaG4PYfihnRAwXS','lxnLyxjJAa','BgjMz1q','iefNzw5077Yj','zxjYB3i','icaG55UU5Qch55UU5B2voG','mZe3mtLNy0zoDvy','AuPNu0G','lNnWzwnVChm','mJu4nZy2vwXhqw9j','4P2mioA6KcaUB3bLBMm','AxneAxjLy3rVCG','icdPGjROV4CGC3bLy28','l+ERNUwtGEAqNoE0OI/LIP/OG73MKjZNTki','mtGYz2PYwNLY','nJnoveHXsgy','EejsBhG','icaG4PYfic5ZCgvJ','ios4QUAwH+s7TIK','4PQG77IpicdNM67MOiFNM67LVzxLT7lLRzJLNkG','A0Dlz2W','BLj5vKi','ywDLBNq','nZi1yu9hze9H','zxjHDgLVBIdLKB3KU6q','Cw5gveS','DgvJAc1ZzwXLyW','l++8Jos9V+EuQcaTlwzVCG','BgWG5zkmigfNzw50','5l2/55sO5PA55BYpoG','zMvHDhvYzs1Zzq','DhnUAfO','y29TCgv0AxrVCG','svjnBNm','B3bZlYaO54Q25Ocb55UU5B2v','mJiZmtbLugz4rhK','nZmXodGWuhHuu3vU','l+AkGoACR+MaIEwEI++8Iq','t3bZioMfJEE9RG','yujksMO','mMHdwNDgrq','revwrue','icdPGjROV4CGC2TPBgW','y2nHDuC','DhHcEMG','u2TPBgZVViJPNidMSylLIiBMNPa','AxmIksdOP6BLJ5hPNidMSylLIiy','5BEY5A6j6kofoG','DgLVBG','ndq1odyWz2LiBu5A','5PU05PAW54Q25Ocb','uuDKyw0','mtqZAKfuzxnu','lYaO','zeX0swe','lM9Wzw5JB2rL','D2fYBG','yxjJAa','8j+AGcdLIj3LP4VLJjyGu3bLyW','icbVAc1TEs1VCa','mJy3meHPEujwra','zxHPDa','kg5HBwu9iMrLBq','icdWN5olidqG5lIQ5yIg5P6qia','uvDxr08','DxzUA2W','icaG6lEV5B6eoG','uezQrNO','yKfSv2G','y2uG6kAg55Uw','t2vzA2q','t2P3yuS','zgvTyw5KlwfUyq','wwjNsgS','4PYfiowiNEwNI+wmLUwUJoAiKo+8Gq','y2DHuwe','C2TPBgXZ','q1nLA1G','CMvJDxjZAxzL'];_0x483a=function(){return _0x35f2d8;};return _0x483a();}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { AgentContext, AgentInput } from '../types/index.js';
|
|
2
|
+
export declare function createAgentMachine(phases?: readonly string[]): import("xstate").StateMachine<AgentContext, {
|
|
3
|
+
type: "START";
|
|
4
|
+
} | {
|
|
5
|
+
type: "PHASE_COMPLETE";
|
|
6
|
+
result?: Record<string, unknown>;
|
|
7
|
+
} | {
|
|
8
|
+
type: "UPDATE_OPERATION";
|
|
9
|
+
operation: string;
|
|
10
|
+
skill: string;
|
|
11
|
+
} | {
|
|
12
|
+
type: "SPAWN_CHILD";
|
|
13
|
+
childId: string;
|
|
14
|
+
} | {
|
|
15
|
+
type: "CHILD_COMPLETE";
|
|
16
|
+
childId: string;
|
|
17
|
+
result: Record<string, unknown>;
|
|
18
|
+
}, {}, never, {
|
|
19
|
+
type: "clearOperation";
|
|
20
|
+
params: import("xstate").NonReducibleUnknown;
|
|
21
|
+
} | {
|
|
22
|
+
type: "setOperation";
|
|
23
|
+
params: import("xstate").NonReducibleUnknown;
|
|
24
|
+
}, never, never, string, string, AgentInput, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
25
|
+
id: "agent";
|
|
26
|
+
states: {
|
|
27
|
+
[x: string]: object;
|
|
28
|
+
};
|
|
29
|
+
}>;
|
|
30
|
+
export declare const agentMachine: import("xstate").StateMachine<AgentContext, {
|
|
31
|
+
type: "START";
|
|
32
|
+
} | {
|
|
33
|
+
type: "PHASE_COMPLETE";
|
|
34
|
+
result?: Record<string, unknown>;
|
|
35
|
+
} | {
|
|
36
|
+
type: "UPDATE_OPERATION";
|
|
37
|
+
operation: string;
|
|
38
|
+
skill: string;
|
|
39
|
+
} | {
|
|
40
|
+
type: "SPAWN_CHILD";
|
|
41
|
+
childId: string;
|
|
42
|
+
} | {
|
|
43
|
+
type: "CHILD_COMPLETE";
|
|
44
|
+
childId: string;
|
|
45
|
+
result: Record<string, unknown>;
|
|
46
|
+
}, {}, never, {
|
|
47
|
+
type: "clearOperation";
|
|
48
|
+
params: import("xstate").NonReducibleUnknown;
|
|
49
|
+
} | {
|
|
50
|
+
type: "setOperation";
|
|
51
|
+
params: import("xstate").NonReducibleUnknown;
|
|
52
|
+
}, never, never, string, string, AgentInput, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
53
|
+
id: "agent";
|
|
54
|
+
states: {
|
|
55
|
+
[x: string]: object;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x493d74,_0x480885){const _0x4b681f={_0x2a4d58:0x11d,_0x26141c:0xfc,_0x150a67:0xef,_0x3bf8f7:0xfd,_0x15c658:0x273},_0x7162fd={_0x5509d6:0x83},_0x103e61={_0x58461d:0x30e};function _0x34ecf2(_0x5f19c3,_0x4d5754){return _0x5a42(_0x5f19c3- -_0x103e61._0x58461d,_0x4d5754);}const _0x501c82=_0x493d74();function _0x4c5967(_0xf8b53f,_0x1c0d9b){return _0x5a42(_0x1c0d9b-_0x7162fd._0x5509d6,_0xf8b53f);}while(!![]){try{const _0x4a49a1=parseInt(_0x34ecf2(-0x105,-0xf7))/(0x5*0xc5+-0x57*0x4a+-0x12f*-0x12)+-parseInt(_0x34ecf2(-0x11f,-0x12e))/(0x2*-0xb15+-0x1085*-0x1+0x5a7)*(parseInt(_0x4c5967(0x293,0x280))/(0x1a23+0x1c9f*-0x1+-0x47*-0x9))+-parseInt(_0x34ecf2(-0x103,-0x104))/(-0x3d*-0x79+-0x847*-0x4+0xbf*-0x53)*(parseInt(_0x34ecf2(-0x112,-_0x4b681f._0x2a4d58))/(-0x173+-0x13b7+0x152f))+-parseInt(_0x34ecf2(-_0x4b681f._0x26141c,-_0x4b681f._0x150a67))/(0x24f4+-0x22b6+-0x8e*0x4)+-parseInt(_0x34ecf2(-_0x4b681f._0x3bf8f7,-0xf4))/(0xdad+0x2c2*-0x2+0x15b*-0x6)+-parseInt(_0x4c5967(_0x4b681f._0x15c658,0x271))/(-0x3*0x9ef+0x489+0x653*0x4)*(-parseInt(_0x4c5967(0x275,0x27d))/(0xcec+0x5*0x63d+0x4*-0xb05))+parseInt(_0x34ecf2(-0x115,-0x11a))/(0x2*0x11a1+-0x1f*0x61+-0x1*0x1779);if(_0x4a49a1===_0x480885)break;else _0x501c82['push'](_0x501c82['shift']());}catch(_0x5d810d){_0x501c82['push'](_0x501c82['shift']());}}}(_0x524c,-0x73e12+0x1da80+0x7a15*0x15));import{setup,assign}from'xstate';import{ANALYSIS_PHASES}from'../types/index.js';function _0x524c(){const _0x5e40cc=['qu5hAKq','y3vYCMvUDfnRAq','zMLUywW','mta3otqXodbhvwvcAg4','nJm5u3L3AMzi','ywDLBNrjza','mJvIBujmq0u','nda4odqZyMvnB1Lr','y29UDgv4Da','DhLWzq','CMvZDwX0','y29TCgXLDgvK','vMv4A20','ywn0Aw9UCW','uKfusu9o','ywDLBNq','ueHbu0vFq09nua','B3bLCMf0Aw9U','y3jLyxrLtwfJAa','nZmZotzmsefOrw8','BgvUz3rO','nJq1mdHmDLDMsvq','u1rbuLq','uffjvLi','shrMrMO','vvbeqvrfx09qrq','CMf0Aw9U','nZmXndy1qu9hBwrb','mJi3nJa4og9pB2r0va','y3vYCMvUDe9Wzq','DM51z0i','Aw5WDxq','Aw5L','mJKYodHiwu5JC3q','oe95u1z0Da','tevurq','AwrSzq','DgLVBG','C2v0t3bLCMf0Aq','CgfYzw50swq','thvXEvC'];_0x524c=function(){return _0x5e40cc;};return _0x524c();}function createPhaseStates(_0x3c8683){const _0x357c8c={_0x5b6fd2:0x38c,_0x453d42:0x383,_0x244758:0x38f,_0x1c2ce0:0x38a,_0x28ec29:0x37c,_0x3405b1:0x397,_0x1c6a48:0x37e,_0x4ae20c:0x37a,_0x21d3c4:0x38d,_0x39f0b6:0x373,_0x3626df:0x361,_0x3a31cf:0x370,_0x2994a3:0x1c5,_0x50a8ec:0x1be,_0x56d233:0x1d5,_0x20c2ea:0x1bd,_0x4faef2:0x1d1},_0x2a32f0={};_0x2a32f0['ANGjD']=function(_0x275a63,_0xfa5f9b){return _0x275a63<_0xfa5f9b;},_0x2a32f0['Vexkm']=function(_0x31f8ca,_0x41ed0b){return _0x31f8ca+_0x41ed0b;},_0x2a32f0[_0x1c4fa2(-0x1c7,-0x1d1)]='completed',_0x2a32f0['HtfFj']=_0x25011d(0x366,0x378);const _0x2c558d=_0x2a32f0,_0x44db06={};_0x44db06['target']=_0x3c8683[0x10b1*-0x1+0x4a*-0x1f+0x19a7*0x1];const _0x3bb57c={};_0x3bb57c[_0x25011d(0x393,_0x357c8c._0x5b6fd2)]=_0x44db06;const _0x5c6ce8={};function _0x25011d(_0x11c721,_0x5db5d0){return _0x5a42(_0x5db5d0-0x180,_0x11c721);}function _0x1c4fa2(_0x486eaa,_0x1c25b7){return _0x5a42(_0x486eaa- -0x3d4,_0x1c25b7);}_0x5c6ce8['on']=_0x3bb57c;const _0x17b54e={};_0x17b54e[_0x25011d(_0x357c8c._0x453d42,0x371)]=_0x5c6ce8;const _0x2c76ec=_0x17b54e;for(let _0x25fec1=0xf2a*-0x1+-0x982*0x3+0x2bb0;_0x25fec1<_0x3c8683[_0x25011d(_0x357c8c._0x244758,_0x357c8c._0x1c2ce0)];_0x25fec1++){const _0x4aa103=_0x3c8683[_0x25fec1],_0x11ce65=_0x2c558d[_0x25011d(_0x357c8c._0x28ec29,0x376)](_0x25fec1,_0x3c8683[_0x25011d(_0x357c8c._0x3405b1,0x38a)]-(-0x1*-0x43c+0x531*-0x5+0x12*0x135))?_0x3c8683[_0x2c558d[_0x25011d(_0x357c8c._0x1c6a48,0x382)](_0x25fec1,-0x1b4e+0x2261*-0x1+0x3db0)]:_0x2c558d[_0x25011d(_0x357c8c._0x4ae20c,_0x357c8c._0x21d3c4)],_0x47271e={};_0x47271e['target']=_0x11ce65,_0x47271e['actions']='clearOpera'+_0x25011d(0x37c,0x372);const _0x2098c4={};_0x2098c4[_0x1c4fa2(-0x1d1,-0x1bd)]=_0x25011d(_0x357c8c._0x28ec29,_0x357c8c._0x39f0b6)+'on';const _0x1ef408={};_0x1ef408[_0x25011d(0x373,0x386)+_0x25011d(_0x357c8c._0x3626df,_0x357c8c._0x3a31cf)]=_0x47271e,_0x1ef408[_0x1c4fa2(-_0x357c8c._0x2994a3,-_0x357c8c._0x50a8ec)+_0x1c4fa2(-0x1d0,-_0x357c8c._0x56d233)]=_0x2098c4;const _0x1107a1={};_0x1107a1['on']=_0x1ef408,_0x2c76ec[_0x4aa103]=_0x1107a1;}const _0x58d6e2={};return _0x58d6e2['type']=_0x2c558d[_0x1c4fa2(-0x1c6,-_0x357c8c._0x20c2ea)],_0x2c76ec[_0x1c4fa2(-0x1d3,-_0x357c8c._0x4faef2)]=_0x58d6e2,_0x2c76ec;}function _0x5a42(_0x4e2e02,_0x3ff99b){_0x4e2e02=_0x4e2e02-(-0x84c*0x4+0xaf7+0x6*0x406);const _0x56bf46=_0x524c();let _0x4fd2d7=_0x56bf46[_0x4e2e02];if(_0x5a42['hMrCTL']===undefined){var _0x39dd5c=function(_0x3ce92f){const _0x22facc='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xa283fb='',_0x393d29='';for(let _0x1156cb=-0x21f9+-0x18*-0x45+0x1b81,_0x31bc8a,_0x2ad965,_0x1bfb72=0x2*0x125+-0x22f8+0x20ae;_0x2ad965=_0x3ce92f['charAt'](_0x1bfb72++);~_0x2ad965&&(_0x31bc8a=_0x1156cb%(-0x1039+0x1cd8+-0xc9b)?_0x31bc8a*(0xc69+-0x4d*-0x43+-0x2050)+_0x2ad965:_0x2ad965,_0x1156cb++%(0xd2f+-0x1333+0x182*0x4))?_0xa283fb+=String['fromCharCode'](0x131*0xf+-0x1555+0x475&_0x31bc8a>>(-(0x2*-0xe20+-0x3b4*0x6+-0x1a*-0x1f1)*_0x1156cb&0x1*-0x12e3+-0x903+0x1bec)):-0x5*0x4e6+0x11*-0x9e+0x22fc){_0x2ad965=_0x22facc['indexOf'](_0x2ad965);}for(let _0x40c42b=0x1*-0x1cf9+-0x6c1+0x22*0x10d,_0x5cfc93=_0xa283fb['length'];_0x40c42b<_0x5cfc93;_0x40c42b++){_0x393d29+='%'+('00'+_0xa283fb['charCodeAt'](_0x40c42b)['toString'](0x1241+0x2e*-0x2d+-0xc7*0xd))['slice'](-(-0x6*-0xf3+0xa42+-0x7f9*0x2));}return decodeURIComponent(_0x393d29);};_0x5a42['megvCD']=_0x39dd5c,_0x5a42['cvYWcq']={},_0x5a42['hMrCTL']=!![];}const _0x51ce7a=_0x56bf46[-0x390+-0x28e*0x9+0xce*0x21],_0x236353=_0x4e2e02+_0x51ce7a,_0x21481c=_0x5a42['cvYWcq'][_0x236353];return!_0x21481c?(_0x4fd2d7=_0x5a42['megvCD'](_0x4fd2d7),_0x5a42['cvYWcq'][_0x236353]=_0x4fd2d7):_0x4fd2d7=_0x21481c,_0x4fd2d7;}export function createAgentMachine(_0x24ea09=ANALYSIS_PHASES){const _0x49a745={_0x1f2733:0x46d,_0x1be552:0x1a3,_0x351986:0x1c8,_0x789e33:0x496,_0x4d2861:0x493,_0x456c45:0x1a3,_0x42638b:0x1aa,_0x332e8e:0x1aa,_0x446030:0x1aa,_0x2ba9b2:0x1ba,_0xfc7283:0x488,_0x97628d:0x490,_0x6f281d:0x478,_0x341809:0x48b,_0xe0b5c5:0x1a7,_0x53c45e:0x1b6},_0x387115={_0x5a7cfc:0x283},_0x28ec43={'LuqyW':_0x545d8f(0x474,_0x49a745._0x1f2733),'vnugB':function(_0x1589e4,_0x6f5e70){return _0x1589e4(_0x6f5e70);}},_0x2ce1e3={};_0x2ce1e3[_0x123b8e(-0x1a7,-_0x49a745._0x1be552)]={},_0x2ce1e3['events']={},_0x2ce1e3[_0x123b8e(-_0x49a745._0x351986,-0x1b5)]={};function _0x545d8f(_0x5af238,_0x29efb8){return _0x5a42(_0x5af238-_0x387115._0x5a7cfc,_0x29efb8);}const _0x367d84={};_0x367d84[_0x545d8f(_0x49a745._0x789e33,0x49b)+_0x545d8f(_0x49a745._0x4d2861,0x48f)]=({event:_0x35accd})=>_0x35accd[_0x123b8e(-0x1b5,-0x1a2)]===_0x123b8e(-0x188,-0x192)+_0x123b8e(-0x19d,-0x19d)?_0x35accd[_0x123b8e(-0x19a,-0x19a)]:'',_0x367d84[_0x123b8e(-_0x49a745._0x456c45,-_0x49a745._0x42638b)+'ll']=({event:_0x5b6c9e})=>_0x5b6c9e[_0x123b8e(-0x1ad,-0x1a2)]===_0x123b8e(-0x193,-0x192)+'RATION'?_0x5b6c9e['skill']:'';const _0x29a0a4={};_0x29a0a4[_0x123b8e(-0x197,-0x18e)+'ration']=()=>'',_0x29a0a4[_0x123b8e(-_0x49a745._0x332e8e,-0x1aa)+'ll']=()=>'',_0x29a0a4['phaseResul'+'t']=({event:_0x35a9f2})=>_0x35a9f2[_0x545d8f(0x482,0x470)]==='PHASE_COMP'+_0x123b8e(-0x1b1,-0x1b1)?_0x35a9f2[_0x545d8f(0x483,0x46e)]??null:null;function _0x123b8e(_0x1d943d,_0x625c00){return _0x5a42(_0x625c00- -0x3a1,_0x1d943d);}return setup({'types':_0x2ce1e3,'actions':{'setOperation':assign(_0x367d84),'clearOperation':assign(_0x29a0a4)}})[_0x123b8e(-_0x49a745._0x446030,-0x199)+_0x123b8e(-_0x49a745._0x2ba9b2,-0x1b4)]({'id':_0x545d8f(_0x49a745._0xfc7283,_0x49a745._0x97628d),'initial':_0x28ec43[_0x545d8f(_0x49a745._0x6f281d,_0x49a745._0x341809)],'context':({input:_0x92a8a6})=>({'agentId':_0x92a8a6[_0x123b8e(-0x19d,-0x1a6)],'parentId':_0x92a8a6[_0x545d8f(0x477,0x463)]??null,'childIds':[],'currentOperation':'','currentSkill':'','phaseResult':null,'phases':_0x92a8a6['phases']??_0x24ea09}),'states':_0x28ec43[_0x123b8e(-_0x49a745._0xe0b5c5,-_0x49a745._0x53c45e)](createPhaseStates,_0x24ea09)});}export const agentMachine=createAgentMachine(ANALYSIS_PHASES);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|