Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

chore: Clean up root folder - remove test directories and temporary files

rUv1b9b9a5b2268
diff --git a/.claude-flow/metrics/performance.json b/.claude-flow/metrics/performance.json
index e876ee7fed..99ef836f14 100644
--- a/.claude-flow/metrics/performance.json
+++ b/.claude-flow/metrics/performance.json
@@ -1,5 +1,5 @@
{
- "startTime": 1758233775010,
+ "startTime": 1758233879776,
"totalTasks": 1,
"successfulTasks": 1,
"failedTasks": 0,
diff --git a/.claude-flow/metrics/system-metrics.json b/.claude-flow/metrics/system-metrics.json
index eac0b04399..b8597340fc 100644
--- a/.claude-flow/metrics/system-metrics.json
+++ b/.claude-flow/metrics/system-metrics.json
@@ -1,1598 +1,4334 @@
[
{
- "timestamp": 1758229813797,
+ "timestamp": 1758223068447,
"memoryTotal": 67427545088,
- "memoryUsed": 7178989568,
- "memoryFree": 60248555520,
- "memoryUsagePercent": 10.646968621845371,
- "memoryEfficiency": 89.35303137815463,
+ "memoryUsed": 6614605824,
+ "memoryFree": 60812939264,
+ "memoryUsagePercent": 9.809946091567248,
+ "memoryEfficiency": 90.19005390843276,
+ "cpuCount": 16,
+ "cpuLoad": 0.039375,
+ "platform": "linux",
+ "uptime": 6709.22
+ },
+ {
+ "timestamp": 1758223098477,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6575906816,
+ "memoryFree": 60851638272,
+ "memoryUsagePercent": 9.752552621362314,
+ "memoryEfficiency": 90.24744737863769,
+ "cpuCount": 16,
+ "cpuLoad": 0.02375,
+ "platform": "linux",
+ "uptime": 6739.25
+ },
+ {
+ "timestamp": 1758223128508,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6545383424,
+ "memoryFree": 60882161664,
+ "memoryUsagePercent": 9.707284189951732,
+ "memoryEfficiency": 90.29271581004826,
+ "cpuCount": 16,
+ "cpuLoad": 0.03,
+ "platform": "linux",
+ "uptime": 6769.28
+ },
+ {
+ "timestamp": 1758223158537,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6574727168,
+ "memoryFree": 60852817920,
+ "memoryUsagePercent": 9.750803116766736,
+ "memoryEfficiency": 90.24919688323327,
+ "cpuCount": 16,
+ "cpuLoad": 0.018125,
+ "platform": "linux",
+ "uptime": 6799.31
+ },
+ {
+ "timestamp": 1758223188568,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6599786496,
+ "memoryFree": 60827758592,
+ "memoryUsagePercent": 9.787967940085299,
+ "memoryEfficiency": 90.2120320599147,
+ "cpuCount": 16,
+ "cpuLoad": 0.024375,
+ "platform": "linux",
+ "uptime": 6829.34
+ },
+ {
+ "timestamp": 1758223218595,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6648459264,
+ "memoryFree": 60779085824,
+ "memoryUsagePercent": 9.860153228659097,
+ "memoryEfficiency": 90.1398467713409,
+ "cpuCount": 16,
+ "cpuLoad": 0.029375,
+ "platform": "linux",
+ "uptime": 6859.37
+ },
+ {
+ "timestamp": 1758223248625,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6534881280,
+ "memoryFree": 60892663808,
+ "memoryUsagePercent": 9.6917087393161,
+ "memoryEfficiency": 90.3082912606839,
+ "cpuCount": 16,
+ "cpuLoad": 0.0225,
+ "platform": "linux",
+ "uptime": 6889.4
+ },
+ {
+ "timestamp": 1758223278654,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6555869184,
+ "memoryFree": 60871675904,
+ "memoryUsagePercent": 9.722835341912427,
+ "memoryEfficiency": 90.27716465808757,
+ "cpuCount": 16,
+ "cpuLoad": 0.0175,
+ "platform": "linux",
+ "uptime": 6919.43
+ },
+ {
+ "timestamp": 1758223308656,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6549434368,
+ "memoryFree": 60878110720,
+ "memoryUsagePercent": 9.713292037330296,
+ "memoryEfficiency": 90.28670796266971,
+ "cpuCount": 16,
+ "cpuLoad": 0.0175,
+ "platform": "linux",
+ "uptime": 6949.43
+ },
+ {
+ "timestamp": 1758223338686,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6537224192,
+ "memoryFree": 60890320896,
+ "memoryUsagePercent": 9.695183449832317,
+ "memoryEfficiency": 90.30481655016769,
+ "cpuCount": 16,
+ "cpuLoad": 0.010625,
+ "platform": "linux",
+ "uptime": 6979.46
+ },
+ {
+ "timestamp": 1758223368717,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6505246720,
+ "memoryFree": 60922298368,
+ "memoryUsagePercent": 9.647758511020937,
+ "memoryEfficiency": 90.35224148897906,
+ "cpuCount": 16,
+ "cpuLoad": 0.010625,
+ "platform": "linux",
+ "uptime": 7009.49
+ },
+ {
+ "timestamp": 1758223398738,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6563319808,
+ "memoryFree": 60864225280,
+ "memoryUsagePercent": 9.733885164340746,
+ "memoryEfficiency": 90.26611483565925,
+ "cpuCount": 16,
+ "cpuLoad": 0.01375,
+ "platform": "linux",
+ "uptime": 7039.51
+ },
+ {
+ "timestamp": 1758223428769,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6550122496,
+ "memoryFree": 60877422592,
+ "memoryUsagePercent": 9.714312581677719,
+ "memoryEfficiency": 90.28568741832228,
+ "cpuCount": 16,
+ "cpuLoad": 0.011875,
+ "platform": "linux",
+ "uptime": 7069.54
+ },
+ {
+ "timestamp": 1758223458799,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6571134976,
+ "memoryFree": 60856410112,
+ "memoryUsagePercent": 9.745475632286452,
+ "memoryEfficiency": 90.25452436771354,
+ "cpuCount": 16,
+ "cpuLoad": 0.011875,
+ "platform": "linux",
+ "uptime": 7099.57
+ },
+ {
+ "timestamp": 1758223488829,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6542577664,
+ "memoryFree": 60884967424,
+ "memoryUsagePercent": 9.7031230418685,
+ "memoryEfficiency": 90.2968769581315,
+ "cpuCount": 16,
+ "cpuLoad": 0.006875,
+ "platform": "linux",
+ "uptime": 7129.6
+ },
+ {
+ "timestamp": 1758223518859,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6562459648,
+ "memoryFree": 60865085440,
+ "memoryUsagePercent": 9.73260948390647,
+ "memoryEfficiency": 90.26739051609353,
+ "cpuCount": 16,
+ "cpuLoad": 0.0175,
+ "platform": "linux",
+ "uptime": 7159.63
+ },
+ {
+ "timestamp": 1758223548862,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6607052800,
+ "memoryFree": 60820492288,
+ "memoryUsagePercent": 9.798744402420562,
+ "memoryEfficiency": 90.20125559757943,
+ "cpuCount": 16,
+ "cpuLoad": 0.015,
+ "platform": "linux",
+ "uptime": 7189.63
+ },
+ {
+ "timestamp": 1758223578892,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6649110528,
+ "memoryFree": 60778434560,
+ "memoryUsagePercent": 9.861119100987906,
+ "memoryEfficiency": 90.1388808990121,
+ "cpuCount": 16,
+ "cpuLoad": 0.025,
+ "platform": "linux",
+ "uptime": 7219.66
+ },
+ {
+ "timestamp": 1758223608921,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6656991232,
+ "memoryFree": 60770553856,
+ "memoryUsagePercent": 9.872806763633363,
+ "memoryEfficiency": 90.12719323636664,
+ "cpuCount": 16,
+ "cpuLoad": 0.03375,
+ "platform": "linux",
+ "uptime": 7249.69
+ },
+ {
+ "timestamp": 1758223638941,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6636064768,
+ "memoryFree": 60791480320,
+ "memoryUsagePercent": 9.841771281068059,
+ "memoryEfficiency": 90.15822871893194,
+ "cpuCount": 16,
+ "cpuLoad": 0.0275,
+ "platform": "linux",
+ "uptime": 7279.71
+ },
+ {
+ "timestamp": 1758223668970,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6633353216,
+ "memoryFree": 60794191872,
+ "memoryUsagePercent": 9.837749850365721,
+ "memoryEfficiency": 90.16225014963427,
+ "cpuCount": 16,
+ "cpuLoad": 0.0275,
+ "platform": "linux",
+ "uptime": 7309.74
+ },
+ {
+ "timestamp": 1758223699000,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6679322624,
+ "memoryFree": 60748222464,
+ "memoryUsagePercent": 9.905925857574653,
+ "memoryEfficiency": 90.09407414242534,
+ "cpuCount": 16,
+ "cpuLoad": 0.016875,
+ "platform": "linux",
+ "uptime": 7339.77
+ },
+ {
+ "timestamp": 1758223729031,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6639910912,
+ "memoryFree": 60787634176,
+ "memoryUsagePercent": 9.84747539500989,
+ "memoryEfficiency": 90.1525246049901,
+ "cpuCount": 16,
+ "cpuLoad": 0.025625,
+ "platform": "linux",
+ "uptime": 7369.8
+ },
+ {
+ "timestamp": 1758223759061,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6667821056,
+ "memoryFree": 60759724032,
+ "memoryUsagePercent": 9.888868187767768,
+ "memoryEfficiency": 90.11113181223223,
+ "cpuCount": 16,
+ "cpuLoad": 0.024375,
+ "platform": "linux",
+ "uptime": 7399.83
+ },
+ {
+ "timestamp": 1758223789091,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6640242688,
+ "memoryFree": 60787302400,
+ "memoryUsagePercent": 9.847967443177396,
+ "memoryEfficiency": 90.1520325568226,
+ "cpuCount": 16,
+ "cpuLoad": 0.0225,
+ "platform": "linux",
+ "uptime": 7429.86
+ },
+ {
+ "timestamp": 1758223819101,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6833233920,
+ "memoryFree": 60594311168,
+ "memoryUsagePercent": 10.134187609947707,
+ "memoryEfficiency": 89.8658123900523,
+ "cpuCount": 16,
+ "cpuLoad": 0.031875,
+ "platform": "linux",
+ "uptime": 7459.87
+ },
+ {
+ "timestamp": 1758223849131,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6674739200,
+ "memoryFree": 60752805888,
+ "memoryUsagePercent": 9.899128303260586,
+ "memoryEfficiency": 90.10087169673942,
+ "cpuCount": 16,
+ "cpuLoad": 0.039375,
+ "platform": "linux",
+ "uptime": 7489.9
+ },
+ {
+ "timestamp": 1758223879161,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6622318592,
+ "memoryFree": 60805226496,
+ "memoryUsagePercent": 9.821384692794586,
+ "memoryEfficiency": 90.17861530720542,
+ "cpuCount": 16,
+ "cpuLoad": 0.02375,
+ "platform": "linux",
+ "uptime": 7519.93
+ },
+ {
+ "timestamp": 1758223909190,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6605012992,
+ "memoryFree": 60822532096,
+ "memoryUsagePercent": 9.795719217390706,
+ "memoryEfficiency": 90.20428078260929,
+ "cpuCount": 16,
+ "cpuLoad": 0.03125,
+ "platform": "linux",
+ "uptime": 7549.96
+ },
+ {
+ "timestamp": 1758223939220,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6655344640,
+ "memoryFree": 60772200448,
+ "memoryUsagePercent": 9.870364746802036,
+ "memoryEfficiency": 90.12963525319796,
+ "cpuCount": 16,
+ "cpuLoad": 0.023125,
+ "platform": "linux",
+ "uptime": 7579.99
+ },
+ {
+ "timestamp": 1758223969251,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6673080320,
+ "memoryFree": 60754464768,
+ "memoryUsagePercent": 9.896668062423053,
+ "memoryEfficiency": 90.10333193757694,
+ "cpuCount": 16,
+ "cpuLoad": 0.065,
+ "platform": "linux",
+ "uptime": 7610.02
+ },
+ {
+ "timestamp": 1758223999280,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6769299456,
+ "memoryFree": 60658245632,
+ "memoryUsagePercent": 10.03936810566862,
+ "memoryEfficiency": 89.96063189433139,
+ "cpuCount": 16,
+ "cpuLoad": 0.05375,
+ "platform": "linux",
+ "uptime": 7640.05
+ },
+ {
+ "timestamp": 1758224029290,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6859845632,
+ "memoryFree": 60567699456,
+ "memoryUsagePercent": 10.1736547327167,
+ "memoryEfficiency": 89.8263452672833,
+ "cpuCount": 16,
+ "cpuLoad": 0.059375,
+ "platform": "linux",
+ "uptime": 7670.06
+ },
+ {
+ "timestamp": 1758224059321,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6836396032,
+ "memoryFree": 60591149056,
+ "memoryUsagePercent": 10.138877254210854,
+ "memoryEfficiency": 89.86112274578915,
+ "cpuCount": 16,
+ "cpuLoad": 0.09375,
+ "platform": "linux",
+ "uptime": 7700.09
+ },
+ {
+ "timestamp": 1758224089352,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6627659776,
+ "memoryFree": 60799885312,
+ "memoryUsagePercent": 9.829306060824566,
+ "memoryEfficiency": 90.17069393917544,
+ "cpuCount": 16,
+ "cpuLoad": 0.06375,
+ "platform": "linux",
+ "uptime": 7730.12
+ },
+ {
+ "timestamp": 1758224119382,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6608429056,
+ "memoryFree": 60819116032,
+ "memoryUsagePercent": 9.800785491115402,
+ "memoryEfficiency": 90.1992145088846,
+ "cpuCount": 16,
+ "cpuLoad": 0.04625,
+ "platform": "linux",
+ "uptime": 7760.15
+ },
+ {
+ "timestamp": 1758224149403,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6600773632,
+ "memoryFree": 60826771456,
+ "memoryUsagePercent": 9.789431935250349,
+ "memoryEfficiency": 90.21056806474965,
+ "cpuCount": 16,
+ "cpuLoad": 0.028125,
+ "platform": "linux",
+ "uptime": 7790.18
+ },
+ {
+ "timestamp": 1758224179415,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6652637184,
+ "memoryFree": 60774907904,
+ "memoryUsagePercent": 9.866349390768434,
+ "memoryEfficiency": 90.13365060923157,
+ "cpuCount": 16,
+ "cpuLoad": 0.021875,
+ "platform": "linux",
+ "uptime": 7820.19
+ },
+ {
+ "timestamp": 1758224209446,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6669701120,
+ "memoryFree": 60757843968,
+ "memoryUsagePercent": 9.89165646071697,
+ "memoryEfficiency": 90.10834353928303,
+ "cpuCount": 16,
+ "cpuLoad": 0.013125,
+ "platform": "linux",
+ "uptime": 7850.22
+ },
+ {
+ "timestamp": 1758224239476,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6721339392,
+ "memoryFree": 60706205696,
+ "memoryUsagePercent": 9.968239809454651,
+ "memoryEfficiency": 90.03176019054536,
+ "cpuCount": 16,
+ "cpuLoad": 0.015625,
+ "platform": "linux",
+ "uptime": 7880.25
+ },
+ {
+ "timestamp": 1758224269478,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6702309376,
+ "memoryFree": 60725235712,
+ "memoryUsagePercent": 9.940016898513486,
+ "memoryEfficiency": 90.05998310148651,
+ "cpuCount": 16,
+ "cpuLoad": 0.021875,
+ "platform": "linux",
+ "uptime": 7910.25
+ },
+ {
+ "timestamp": 1758224299509,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6678233088,
+ "memoryFree": 60749312000,
+ "memoryUsagePercent": 9.904309995691237,
+ "memoryEfficiency": 90.09569000430876,
+ "cpuCount": 16,
+ "cpuLoad": 0.035625,
+ "platform": "linux",
+ "uptime": 7940.28
+ },
+ {
+ "timestamp": 1758224329524,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6698078208,
+ "memoryFree": 60729466880,
+ "memoryUsagePercent": 9.933741765710597,
+ "memoryEfficiency": 90.0662582342894,
+ "cpuCount": 16,
+ "cpuLoad": 0.04,
+ "platform": "linux",
+ "uptime": 7970.3
+ },
+ {
+ "timestamp": 1758224359554,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6813986816,
+ "memoryFree": 60613558272,
+ "memoryUsagePercent": 10.105642741563607,
+ "memoryEfficiency": 89.8943572584364,
+ "cpuCount": 16,
+ "cpuLoad": 0.059375,
+ "platform": "linux",
+ "uptime": 8000.33
+ },
+ {
+ "timestamp": 1758224389557,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6845915136,
+ "memoryFree": 60581629952,
+ "memoryUsagePercent": 10.15299478435017,
+ "memoryEfficiency": 89.84700521564983,
+ "cpuCount": 16,
+ "cpuLoad": 0.074375,
+ "platform": "linux",
+ "uptime": 8030.33
+ },
+ {
+ "timestamp": 1758224419586,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6686261248,
+ "memoryFree": 60741283840,
+ "memoryUsagePercent": 9.916216346411142,
+ "memoryEfficiency": 90.08378365358885,
+ "cpuCount": 16,
+ "cpuLoad": 0.06,
+ "platform": "linux",
+ "uptime": 8060.36
+ },
+ {
+ "timestamp": 1758224449616,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6805475328,
+ "memoryFree": 60622069760,
+ "memoryUsagePercent": 10.093019579933012,
+ "memoryEfficiency": 89.90698042006699,
+ "cpuCount": 16,
+ "cpuLoad": 0.063125,
+ "platform": "linux",
+ "uptime": 8090.39
+ },
+ {
+ "timestamp": 1758224479640,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6869368832,
+ "memoryFree": 60558176256,
+ "memoryUsagePercent": 10.187778337524755,
+ "memoryEfficiency": 89.81222166247525,
+ "cpuCount": 16,
+ "cpuLoad": 0.07,
+ "platform": "linux",
+ "uptime": 8120.41
+ },
+ {
+ "timestamp": 1758224509671,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6993137664,
+ "memoryFree": 60434407424,
+ "memoryUsagePercent": 10.371336602679548,
+ "memoryEfficiency": 89.62866339732045,
+ "cpuCount": 16,
+ "cpuLoad": 0.055625,
+ "platform": "linux",
+ "uptime": 8150.44
+ },
+ {
+ "timestamp": 1758224539700,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7000674304,
+ "memoryFree": 60426870784,
+ "memoryUsagePercent": 10.382513993151298,
+ "memoryEfficiency": 89.61748600684871,
+ "cpuCount": 16,
+ "cpuLoad": 0.05125,
+ "platform": "linux",
+ "uptime": 8180.47
+ },
+ {
+ "timestamp": 1758224569731,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6934528000,
+ "memoryFree": 60493017088,
+ "memoryUsagePercent": 10.2844141677555,
+ "memoryEfficiency": 89.7155858322445,
+ "cpuCount": 16,
+ "cpuLoad": 0.04875,
+ "platform": "linux",
+ "uptime": 8210.5
+ },
+ {
+ "timestamp": 1758224599761,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6812004352,
+ "memoryFree": 60615540736,
+ "memoryUsagePercent": 10.102702601896038,
+ "memoryEfficiency": 89.89729739810396,
+ "cpuCount": 16,
+ "cpuLoad": 0.06625,
+ "platform": "linux",
+ "uptime": 8240.53
+ },
+ {
+ "timestamp": 1758224629791,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6771752960,
+ "memoryFree": 60655792128,
+ "memoryUsagePercent": 10.043006832240673,
+ "memoryEfficiency": 89.95699316775932,
+ "cpuCount": 16,
+ "cpuLoad": 0.04875,
+ "platform": "linux",
+ "uptime": 8270.56
+ },
+ {
+ "timestamp": 1758224659795,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6819160064,
+ "memoryFree": 60608385024,
+ "memoryUsagePercent": 10.113315048175464,
+ "memoryEfficiency": 89.88668495182453,
+ "cpuCount": 16,
+ "cpuLoad": 0.029375,
+ "platform": "linux",
+ "uptime": 8300.57
+ },
+ {
+ "timestamp": 1758224689824,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6858645504,
+ "memoryFree": 60568899584,
+ "memoryUsagePercent": 10.17187485477745,
+ "memoryEfficiency": 89.82812514522254,
+ "cpuCount": 16,
+ "cpuLoad": 0.03625,
+ "platform": "linux",
+ "uptime": 8330.6
+ },
+ {
+ "timestamp": 1758224719854,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6984847360,
+ "memoryFree": 60442697728,
+ "memoryUsagePercent": 10.359041473160625,
+ "memoryEfficiency": 89.64095852683937,
+ "cpuCount": 16,
+ "cpuLoad": 0.05,
+ "platform": "linux",
+ "uptime": 8360.63
+ },
+ {
+ "timestamp": 1758224749885,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7549833216,
+ "memoryFree": 59877711872,
+ "memoryUsagePercent": 11.196956979742742,
+ "memoryEfficiency": 88.80304302025726,
+ "cpuCount": 16,
+ "cpuLoad": 0.056875,
+ "platform": "linux",
+ "uptime": 8390.66
+ },
+ {
+ "timestamp": 1758224779914,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7262416896,
+ "memoryFree": 60165128192,
+ "memoryUsagePercent": 10.77069747463264,
+ "memoryEfficiency": 89.22930252536736,
+ "cpuCount": 16,
+ "cpuLoad": 0.064375,
+ "platform": "linux",
+ "uptime": 8420.69
+ },
+ {
+ "timestamp": 1758224809945,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6887653376,
+ "memoryFree": 60539891712,
+ "memoryUsagePercent": 10.214895658756213,
+ "memoryEfficiency": 89.7851043412438,
+ "cpuCount": 16,
+ "cpuLoad": 0.106875,
+ "platform": "linux",
+ "uptime": 8450.72
+ },
+ {
+ "timestamp": 1758224839975,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6874578944,
+ "memoryFree": 60552966144,
+ "memoryUsagePercent": 10.195505316155224,
+ "memoryEfficiency": 89.80449468384478,
+ "cpuCount": 16,
+ "cpuLoad": 0.081875,
+ "platform": "linux",
+ "uptime": 8480.75
+ },
+ {
+ "timestamp": 1758224870004,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6792794112,
+ "memoryFree": 60634750976,
+ "memoryUsagePercent": 10.074212405530549,
+ "memoryEfficiency": 89.92578759446945,
+ "cpuCount": 16,
+ "cpuLoad": 0.0525,
+ "platform": "linux",
+ "uptime": 8510.78
+ },
+ {
+ "timestamp": 1758224900006,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6755225600,
+ "memoryFree": 60672319488,
+ "memoryUsagePercent": 10.018495543896377,
+ "memoryEfficiency": 89.98150445610362,
+ "cpuCount": 16,
+ "cpuLoad": 0.049375,
+ "platform": "linux",
+ "uptime": 8540.78
+ },
+ {
+ "timestamp": 1758224930037,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6776446976,
+ "memoryFree": 60651098112,
+ "memoryUsagePercent": 10.049968402610576,
+ "memoryEfficiency": 89.95003159738943,
+ "cpuCount": 16,
+ "cpuLoad": 0.033125,
+ "platform": "linux",
+ "uptime": 8570.81
+ },
+ {
+ "timestamp": 1758224960065,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6822830080,
+ "memoryFree": 60604715008,
+ "memoryUsagePercent": 10.118757951361706,
+ "memoryEfficiency": 89.8812420486383,
+ "cpuCount": 16,
+ "cpuLoad": 0.02,
+ "platform": "linux",
+ "uptime": 8600.84
+ },
+ {
+ "timestamp": 1758224990094,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6975119360,
+ "memoryFree": 60452425728,
+ "memoryUsagePercent": 10.344614134915842,
+ "memoryEfficiency": 89.65538586508416,
+ "cpuCount": 16,
+ "cpuLoad": 0.01875,
+ "platform": "linux",
+ "uptime": 8630.87
+ },
+ {
+ "timestamp": 1758225020123,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6848970752,
+ "memoryFree": 60578574336,
+ "memoryUsagePercent": 10.157526487226216,
+ "memoryEfficiency": 89.84247351277378,
+ "cpuCount": 16,
+ "cpuLoad": 0.076875,
+ "platform": "linux",
+ "uptime": 8660.9
+ },
+ {
+ "timestamp": 1758225050150,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6861312000,
+ "memoryFree": 60566233088,
+ "memoryUsagePercent": 10.175829464123705,
+ "memoryEfficiency": 89.82417053587629,
+ "cpuCount": 16,
+ "cpuLoad": 0.05625,
+ "platform": "linux",
+ "uptime": 8690.92
+ },
+ {
+ "timestamp": 1758225080181,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6893363200,
+ "memoryFree": 60534181888,
+ "memoryUsagePercent": 10.223363746972309,
+ "memoryEfficiency": 89.77663625302769,
+ "cpuCount": 16,
+ "cpuLoad": 0.0975,
+ "platform": "linux",
+ "uptime": 8720.95
+ },
+ {
+ "timestamp": 1758225110211,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6906224640,
+ "memoryFree": 60521320448,
+ "memoryUsagePercent": 10.242438206799097,
+ "memoryEfficiency": 89.7575617932009,
+ "cpuCount": 16,
+ "cpuLoad": 0.07625,
+ "platform": "linux",
+ "uptime": 8750.98
+ },
+ {
+ "timestamp": 1758225140240,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6845530112,
+ "memoryFree": 60582014976,
+ "memoryUsagePercent": 10.152423765489115,
+ "memoryEfficiency": 89.84757623451088,
+ "cpuCount": 16,
+ "cpuLoad": 0.065625,
+ "platform": "linux",
+ "uptime": 8781.01
+ },
+ {
+ "timestamp": 1758225170271,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6852550656,
+ "memoryFree": 60574994432,
+ "memoryUsagePercent": 10.162835747700298,
+ "memoryEfficiency": 89.8371642522997,
+ "cpuCount": 16,
+ "cpuLoad": 0.05375,
+ "platform": "linux",
+ "uptime": 8811.04
+ },
+ {
+ "timestamp": 1758225200294,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6845706240,
+ "memoryFree": 60581838848,
+ "memoryUsagePercent": 10.152684976244704,
+ "memoryEfficiency": 89.8473150237553,
+ "cpuCount": 16,
+ "cpuLoad": 0.124375,
+ "platform": "linux",
+ "uptime": 8841.07
+ },
+ {
+ "timestamp": 1758225230310,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6838992896,
+ "memoryFree": 60588552192,
+ "memoryUsagePercent": 10.14272859418862,
+ "memoryEfficiency": 89.85727140581137,
+ "cpuCount": 16,
+ "cpuLoad": 0.089375,
+ "platform": "linux",
+ "uptime": 8871.08
+ },
+ {
+ "timestamp": 1758225260317,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7035158528,
+ "memoryFree": 60392386560,
+ "memoryUsagePercent": 10.43365662922828,
+ "memoryEfficiency": 89.56634337077172,
+ "cpuCount": 16,
+ "cpuLoad": 0.089375,
+ "platform": "linux",
+ "uptime": 8901.09
+ },
+ {
+ "timestamp": 1758225290347,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6900146176,
+ "memoryFree": 60527398912,
+ "memoryUsagePercent": 10.233423398396884,
+ "memoryEfficiency": 89.76657660160312,
+ "cpuCount": 16,
+ "cpuLoad": 0.08,
+ "platform": "linux",
+ "uptime": 8931.12
+ },
+ {
+ "timestamp": 1758225320356,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7039520768,
+ "memoryFree": 60388024320,
+ "memoryUsagePercent": 10.440126151430679,
+ "memoryEfficiency": 89.55987384856932,
+ "cpuCount": 16,
+ "cpuLoad": 0.09375,
+ "platform": "linux",
+ "uptime": 8961.13
+ },
+ {
+ "timestamp": 1758225350387,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7257882624,
+ "memoryFree": 60169662464,
+ "memoryUsagePercent": 10.763972816343385,
+ "memoryEfficiency": 89.23602718365662,
+ "cpuCount": 16,
+ "cpuLoad": 0.18875,
+ "platform": "linux",
+ "uptime": 8991.16
+ },
+ {
+ "timestamp": 1758225380403,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6912991232,
+ "memoryFree": 60514553856,
+ "memoryUsagePercent": 10.252473559548731,
+ "memoryEfficiency": 89.74752644045127,
+ "cpuCount": 16,
+ "cpuLoad": 0.136875,
+ "platform": "linux",
+ "uptime": 9021.18
+ },
+ {
+ "timestamp": 1758225410415,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6906376192,
+ "memoryFree": 60521168896,
+ "memoryUsagePercent": 10.242662969542279,
+ "memoryEfficiency": 89.75733703045772,
+ "cpuCount": 16,
+ "cpuLoad": 0.098125,
+ "platform": "linux",
+ "uptime": 9051.19
+ },
+ {
+ "timestamp": 1758225440438,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6819811328,
+ "memoryFree": 60607733760,
+ "memoryUsagePercent": 10.114280920504273,
+ "memoryEfficiency": 89.88571907949573,
+ "cpuCount": 16,
+ "cpuLoad": 0.059375,
+ "platform": "linux",
+ "uptime": 9081.21
+ },
+ {
+ "timestamp": 1758225470469,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6835843072,
+ "memoryFree": 60591702016,
+ "memoryUsagePercent": 10.138057173931676,
+ "memoryEfficiency": 89.86194282606833,
+ "cpuCount": 16,
+ "cpuLoad": 0.045625,
+ "platform": "linux",
+ "uptime": 9111.24
+ },
+ {
+ "timestamp": 1758225500470,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6844256256,
+ "memoryFree": 60583288832,
+ "memoryUsagePercent": 10.15053454351264,
+ "memoryEfficiency": 89.84946545648737,
+ "cpuCount": 16,
+ "cpuLoad": 0.0275,
+ "platform": "linux",
+ "uptime": 9141.24
+ },
+ {
+ "timestamp": 1758225530501,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6814978048,
+ "memoryFree": 60612567040,
+ "memoryUsagePercent": 10.107112811397391,
+ "memoryEfficiency": 89.89288718860261,
+ "cpuCount": 16,
+ "cpuLoad": 0.020625,
+ "platform": "linux",
+ "uptime": 9171.27
+ },
+ {
+ "timestamp": 1758225560531,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6820589568,
+ "memoryFree": 60606955520,
+ "memoryUsagePercent": 10.115435107563856,
+ "memoryEfficiency": 89.88456489243615,
+ "cpuCount": 16,
+ "cpuLoad": 0.0225,
+ "platform": "linux",
+ "uptime": 9201.3
+ },
+ {
+ "timestamp": 1758225590558,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6838165504,
+ "memoryFree": 60589379584,
+ "memoryUsagePercent": 10.141501511104222,
+ "memoryEfficiency": 89.85849848889578,
+ "cpuCount": 16,
+ "cpuLoad": 0.0175,
+ "platform": "linux",
+ "uptime": 9231.33
+ },
+ {
+ "timestamp": 1758225620584,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6840709120,
+ "memoryFree": 60586835968,
+ "memoryUsagePercent": 10.145273880388435,
+ "memoryEfficiency": 89.85472611961157,
+ "cpuCount": 16,
+ "cpuLoad": 0.010625,
+ "platform": "linux",
+ "uptime": 9261.36
+ },
+ {
+ "timestamp": 1758225650613,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6836203520,
+ "memoryFree": 60591341568,
+ "memoryUsagePercent": 10.138591744780326,
+ "memoryEfficiency": 89.86140825521967,
+ "cpuCount": 16,
+ "cpuLoad": 0.010625,
+ "platform": "linux",
+ "uptime": 9291.39
+ },
+ {
+ "timestamp": 1758225680644,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6830055424,
+ "memoryFree": 60597489664,
+ "memoryUsagePercent": 10.129473667009622,
+ "memoryEfficiency": 89.87052633299038,
+ "cpuCount": 16,
+ "cpuLoad": 0.00625,
+ "platform": "linux",
+ "uptime": 9321.42
+ },
+ {
+ "timestamp": 1758225710674,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6829142016,
+ "memoryFree": 60598403072,
+ "memoryUsagePercent": 10.128119015881797,
+ "memoryEfficiency": 89.8718809841182,
+ "cpuCount": 16,
+ "cpuLoad": 0.015625,
+ "platform": "linux",
+ "uptime": 9351.45
+ },
+ {
+ "timestamp": 1758225740704,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6821515264,
+ "memoryFree": 60606029824,
+ "memoryUsagePercent": 10.116807982697885,
+ "memoryEfficiency": 89.88319201730212,
+ "cpuCount": 16,
+ "cpuLoad": 0.009375,
+ "platform": "linux",
+ "uptime": 9381.48
+ },
+ {
+ "timestamp": 1758225770734,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6837923840,
+ "memoryFree": 60589621248,
+ "memoryUsagePercent": 10.141143105648878,
+ "memoryEfficiency": 89.85885689435112,
+ "cpuCount": 16,
+ "cpuLoad": 0.010625,
+ "platform": "linux",
+ "uptime": 9411.51
+ },
+ {
+ "timestamp": 1758225800763,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6839439360,
+ "memoryFree": 60588105728,
+ "memoryUsagePercent": 10.143390733080695,
+ "memoryEfficiency": 89.8566092669193,
+ "cpuCount": 16,
+ "cpuLoad": 0.00625,
+ "platform": "linux",
+ "uptime": 9441.54
+ },
+ {
+ "timestamp": 1758225830793,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6865866752,
+ "memoryFree": 60561678336,
+ "memoryUsagePercent": 10.182584495756632,
+ "memoryEfficiency": 89.81741550424337,
+ "cpuCount": 16,
+ "cpuLoad": 0.00375,
+ "platform": "linux",
+ "uptime": 9471.57
+ },
+ {
+ "timestamp": 1758225860797,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6850166784,
+ "memoryFree": 60577378304,
+ "memoryUsagePercent": 10.159300290496734,
+ "memoryEfficiency": 89.84069970950327,
+ "cpuCount": 16,
+ "cpuLoad": 0.0025,
+ "platform": "linux",
+ "uptime": 9501.57
+ },
+ {
+ "timestamp": 1758225890828,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6843633664,
+ "memoryFree": 60583911424,
+ "memoryUsagePercent": 10.149611193864972,
+ "memoryEfficiency": 89.85038880613503,
+ "cpuCount": 16,
+ "cpuLoad": 0.00125,
+ "platform": "linux",
+ "uptime": 9531.6
+ },
+ {
+ "timestamp": 1758225920846,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6842617856,
+ "memoryFree": 60584927232,
+ "memoryUsagePercent": 10.14810467601878,
+ "memoryEfficiency": 89.85189532398122,
+ "cpuCount": 16,
+ "cpuLoad": 0.01375,
+ "platform": "linux",
+ "uptime": 9561.62
+ },
+ {
+ "timestamp": 1758225950877,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6845247488,
+ "memoryFree": 60582297600,
+ "memoryUsagePercent": 10.152004613346424,
+ "memoryEfficiency": 89.84799538665358,
+ "cpuCount": 16,
+ "cpuLoad": 0.0125,
+ "platform": "linux",
+ "uptime": 9591.65
+ },
+ {
+ "timestamp": 1758225980907,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6837985280,
+ "memoryFree": 60589559808,
+ "memoryUsagePercent": 10.141234225679897,
+ "memoryEfficiency": 89.8587657743201,
+ "cpuCount": 16,
+ "cpuLoad": 0.0075,
+ "platform": "linux",
+ "uptime": 9621.68
+ },
+ {
+ "timestamp": 1758226010937,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6837661696,
+ "memoryFree": 60589883392,
+ "memoryUsagePercent": 10.14075432684986,
+ "memoryEfficiency": 89.85924567315014,
+ "cpuCount": 16,
+ "cpuLoad": 0.013125,
+ "platform": "linux",
+ "uptime": 9651.71
+ },
+ {
+ "timestamp": 1758226040967,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6819368960,
+ "memoryFree": 60608176128,
+ "memoryUsagePercent": 10.11362485628093,
+ "memoryEfficiency": 89.88637514371906,
+ "cpuCount": 16,
+ "cpuLoad": 0.018125,
+ "platform": "linux",
+ "uptime": 9681.74
+ },
+ {
+ "timestamp": 1758226070998,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6769725440,
+ "memoryFree": 60657819648,
+ "memoryUsagePercent": 10.039999871217024,
+ "memoryEfficiency": 89.96000012878298,
+ "cpuCount": 16,
+ "cpuLoad": 0.015625,
+ "platform": "linux",
+ "uptime": 9711.77
+ },
+ {
+ "timestamp": 1758226101028,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6762639360,
+ "memoryFree": 60664905728,
+ "memoryUsagePercent": 10.029490694306086,
+ "memoryEfficiency": 89.97050930569391,
+ "cpuCount": 16,
+ "cpuLoad": 0.009375,
+ "platform": "linux",
+ "uptime": 9741.8
+ },
+ {
+ "timestamp": 1758226131059,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6775685120,
+ "memoryFree": 60651859968,
+ "memoryUsagePercent": 10.048838514225933,
+ "memoryEfficiency": 89.95116148577407,
+ "cpuCount": 16,
+ "cpuLoad": 0.010625,
+ "platform": "linux",
+ "uptime": 9771.83
+ },
+ {
+ "timestamp": 1758226161089,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6805094400,
+ "memoryFree": 60622450688,
+ "memoryUsagePercent": 10.09245463574069,
+ "memoryEfficiency": 89.9075453642593,
+ "cpuCount": 16,
+ "cpuLoad": 0.01125,
+ "platform": "linux",
+ "uptime": 9801.86
+ },
+ {
+ "timestamp": 1758226191119,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6771396608,
+ "memoryFree": 60656148480,
+ "memoryUsagePercent": 10.042478336060759,
+ "memoryEfficiency": 89.95752166393925,
+ "cpuCount": 16,
+ "cpuLoad": 0.006875,
+ "platform": "linux",
+ "uptime": 9831.89
+ },
+ {
+ "timestamp": 1758226221149,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6788595712,
+ "memoryFree": 60638949376,
+ "memoryUsagePercent": 10.067985870077537,
+ "memoryEfficiency": 89.93201412992246,
+ "cpuCount": 16,
+ "cpuLoad": 0.004375,
+ "platform": "linux",
+ "uptime": 9861.92
+ },
+ {
+ "timestamp": 1758226251179,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6793019392,
+ "memoryFree": 60634525696,
+ "memoryUsagePercent": 10.074546512310954,
+ "memoryEfficiency": 89.92545348768904,
+ "cpuCount": 16,
+ "cpuLoad": 0.015625,
+ "platform": "linux",
+ "uptime": 9891.95
+ },
+ {
+ "timestamp": 1758226281210,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6804410368,
+ "memoryFree": 60623134720,
+ "memoryUsagePercent": 10.091440166062004,
+ "memoryEfficiency": 89.908559833938,
+ "cpuCount": 16,
+ "cpuLoad": 0.013125,
+ "platform": "linux",
+ "uptime": 9921.98
+ },
+ {
+ "timestamp": 1758226311241,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6771281920,
+ "memoryFree": 60656263168,
+ "memoryUsagePercent": 10.042308245336189,
+ "memoryEfficiency": 89.95769175466381,
+ "cpuCount": 16,
+ "cpuLoad": 0.0075,
+ "platform": "linux",
+ "uptime": 9952.01
+ },
+ {
+ "timestamp": 1758226341271,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6766858240,
+ "memoryFree": 60660686848,
+ "memoryUsagePercent": 10.03574760310277,
+ "memoryEfficiency": 89.96425239689722,
+ "cpuCount": 16,
+ "cpuLoad": 0.008125,
+ "platform": "linux",
+ "uptime": 9982.04
+ },
+ {
+ "timestamp": 1758226371301,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6774501376,
+ "memoryFree": 60653043712,
+ "memoryUsagePercent": 10.047082934961619,
+ "memoryEfficiency": 89.95291706503838,
+ "cpuCount": 16,
+ "cpuLoad": 0.005,
+ "platform": "linux",
+ "uptime": 10012.07
+ },
+ {
+ "timestamp": 1758226401331,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6788034560,
+ "memoryFree": 60639510528,
+ "memoryUsagePercent": 10.067153640460889,
+ "memoryEfficiency": 89.93284635953911,
+ "cpuCount": 16,
+ "cpuLoad": 0.00625,
+ "platform": "linux",
+ "uptime": 10042.1
+ },
+ {
+ "timestamp": 1758226431361,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6776115200,
+ "memoryFree": 60651429888,
+ "memoryUsagePercent": 10.04947635444307,
+ "memoryEfficiency": 89.95052364555693,
+ "cpuCount": 16,
+ "cpuLoad": 0.00375,
+ "platform": "linux",
+ "uptime": 10072.13
+ },
+ {
+ "timestamp": 1758226461391,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6792785920,
+ "memoryFree": 60634759168,
+ "memoryUsagePercent": 10.074200256193079,
+ "memoryEfficiency": 89.92579974380692,
+ "cpuCount": 16,
+ "cpuLoad": 0.00625,
+ "platform": "linux",
+ "uptime": 10102.16
+ },
+ {
+ "timestamp": 1758226491421,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6835630080,
+ "memoryFree": 60591915008,
+ "memoryUsagePercent": 10.137741291157475,
+ "memoryEfficiency": 89.86225870884252,
+ "cpuCount": 16,
+ "cpuLoad": 0.00375,
+ "platform": "linux",
+ "uptime": 10132.19
+ },
+ {
+ "timestamp": 1758226521450,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6770647040,
+ "memoryFree": 60656898048,
+ "memoryUsagePercent": 10.041366671682319,
+ "memoryEfficiency": 89.95863332831769,
+ "cpuCount": 16,
+ "cpuLoad": 0.001875,
+ "platform": "linux",
+ "uptime": 10162.22
+ },
+ {
+ "timestamp": 1758226551481,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6795522048,
+ "memoryFree": 60632023040,
+ "memoryUsagePercent": 10.078258134907822,
+ "memoryEfficiency": 89.92174186509217,
+ "cpuCount": 16,
+ "cpuLoad": 0.00125,
+ "platform": "linux",
+ "uptime": 10192.25
+ },
+ {
+ "timestamp": 1758226581512,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6781251584,
+ "memoryFree": 60646293504,
+ "memoryUsagePercent": 10.057093989036318,
+ "memoryEfficiency": 89.94290601096368,
+ "cpuCount": 16,
+ "cpuLoad": 0.01375,
+ "platform": "linux",
+ "uptime": 10222.28
+ },
+ {
+ "timestamp": 1758226611536,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6764670976,
+ "memoryFree": 60662874112,
+ "memoryUsagePercent": 10.032503729998469,
+ "memoryEfficiency": 89.96749627000153,
+ "cpuCount": 16,
+ "cpuLoad": 0.02,
+ "platform": "linux",
+ "uptime": 10252.31
+ },
+ {
+ "timestamp": 1758226641567,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6840840192,
+ "memoryFree": 60586704896,
+ "memoryUsagePercent": 10.145468269787946,
+ "memoryEfficiency": 89.85453173021206,
+ "cpuCount": 16,
+ "cpuLoad": 0.011875,
+ "platform": "linux",
+ "uptime": 10282.34
+ },
+ {
+ "timestamp": 1758226671598,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6788259840,
+ "memoryFree": 60639285248,
+ "memoryUsagePercent": 10.067487747241294,
+ "memoryEfficiency": 89.9325122527587,
+ "cpuCount": 16,
+ "cpuLoad": 0.021875,
+ "platform": "linux",
+ "uptime": 10312.37
+ },
+ {
+ "timestamp": 1758226701629,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6794457088,
+ "memoryFree": 60633088000,
+ "memoryUsagePercent": 10.076678721036815,
+ "memoryEfficiency": 89.92332127896319,
+ "cpuCount": 16,
+ "cpuLoad": 0.013125,
+ "platform": "linux",
+ "uptime": 10342.4
+ },
+ {
+ "timestamp": 1758226731659,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6790565888,
+ "memoryFree": 60636979200,
+ "memoryUsagePercent": 10.070907785738902,
+ "memoryEfficiency": 89.9290922142611,
+ "cpuCount": 16,
+ "cpuLoad": 0.01625,
+ "platform": "linux",
+ "uptime": 10372.43
+ },
+ {
+ "timestamp": 1758226761690,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6776041472,
+ "memoryFree": 60651503616,
+ "memoryUsagePercent": 10.049367010405847,
+ "memoryEfficiency": 89.95063298959415,
+ "cpuCount": 16,
+ "cpuLoad": 0.01,
+ "platform": "linux",
+ "uptime": 10402.46
+ },
+ {
+ "timestamp": 1758226791721,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6797799424,
+ "memoryFree": 60629745664,
+ "memoryUsagePercent": 10.081635650724285,
+ "memoryEfficiency": 89.91836434927572,
+ "cpuCount": 16,
+ "cpuLoad": 0.01,
+ "platform": "linux",
+ "uptime": 10432.49
+ },
+ {
+ "timestamp": 1758226821750,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6774894592,
+ "memoryFree": 60652650496,
+ "memoryUsagePercent": 10.047666103160147,
+ "memoryEfficiency": 89.95233389683986,
+ "cpuCount": 16,
+ "cpuLoad": 0.00625,
+ "platform": "linux",
+ "uptime": 10462.52
+ },
+ {
+ "timestamp": 1758226851780,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6770409472,
+ "memoryFree": 60657135616,
+ "memoryUsagePercent": 10.041014340895709,
+ "memoryEfficiency": 89.95898565910429,
+ "cpuCount": 16,
+ "cpuLoad": 0.00375,
+ "platform": "linux",
+ "uptime": 10492.55
+ },
+ {
+ "timestamp": 1758226881811,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6751244288,
+ "memoryFree": 60676300800,
+ "memoryUsagePercent": 10.0125909658863,
+ "memoryEfficiency": 89.9874090341137,
+ "cpuCount": 16,
+ "cpuLoad": 0.005625,
+ "platform": "linux",
+ "uptime": 10522.58
+ },
+ {
+ "timestamp": 1758226911842,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6762172416,
+ "memoryFree": 60665372672,
+ "memoryUsagePercent": 10.028798182070336,
+ "memoryEfficiency": 89.97120181792967,
+ "cpuCount": 16,
+ "cpuLoad": 0.019375,
+ "platform": "linux",
+ "uptime": 10552.61
+ },
+ {
+ "timestamp": 1758226941871,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6764838912,
+ "memoryFree": 60662706176,
+ "memoryUsagePercent": 10.032752791416591,
+ "memoryEfficiency": 89.96724720858342,
+ "cpuCount": 16,
+ "cpuLoad": 0.011875,
+ "platform": "linux",
+ "uptime": 10582.64
+ },
+ {
+ "timestamp": 1758226971892,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6744367104,
+ "memoryFree": 60683177984,
+ "memoryUsagePercent": 10.00239159708083,
+ "memoryEfficiency": 89.99760840291917,
+ "cpuCount": 16,
+ "cpuLoad": 0.013125,
+ "platform": "linux",
+ "uptime": 10612.66
+ },
+ {
+ "timestamp": 1758227001922,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6783967232,
+ "memoryFree": 60643577856,
+ "memoryUsagePercent": 10.061121494407386,
+ "memoryEfficiency": 89.93887850559261,
+ "cpuCount": 16,
+ "cpuLoad": 0.008125,
+ "platform": "linux",
+ "uptime": 10642.69
+ },
+ {
+ "timestamp": 1758227031922,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6772027392,
+ "memoryFree": 60655517696,
+ "memoryUsagePercent": 10.043413835045893,
+ "memoryEfficiency": 89.9565861649541,
+ "cpuCount": 16,
+ "cpuLoad": 0.01625,
+ "platform": "linux",
+ "uptime": 10672.69
+ },
+ {
+ "timestamp": 1758227061953,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6800244736,
+ "memoryFree": 60627300352,
+ "memoryUsagePercent": 10.085262227958868,
+ "memoryEfficiency": 89.91473777204114,
+ "cpuCount": 16,
+ "cpuLoad": 0.018125,
+ "platform": "linux",
+ "uptime": 10702.73
+ },
+ {
+ "timestamp": 1758227091954,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6762803200,
+ "memoryFree": 60664741888,
+ "memoryUsagePercent": 10.02973368105547,
+ "memoryEfficiency": 89.97026631894452,
+ "cpuCount": 16,
+ "cpuLoad": 0.010625,
+ "platform": "linux",
+ "uptime": 10732.73
+ },
+ {
+ "timestamp": 1758227121984,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6756032512,
+ "memoryFree": 60671512576,
+ "memoryUsagePercent": 10.019692253637102,
+ "memoryEfficiency": 89.9803077463629,
+ "cpuCount": 16,
+ "cpuLoad": 0.00625,
+ "platform": "linux",
+ "uptime": 10762.76
+ },
+ {
+ "timestamp": 1758227152014,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6756724736,
+ "memoryFree": 60670820352,
+ "memoryUsagePercent": 10.020718872653257,
+ "memoryEfficiency": 89.97928112734674,
+ "cpuCount": 16,
+ "cpuLoad": 0.00375,
+ "platform": "linux",
+ "uptime": 10792.79
+ },
+ {
+ "timestamp": 1758227182044,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6794743808,
+ "memoryFree": 60632801280,
+ "memoryUsagePercent": 10.07710394784824,
+ "memoryEfficiency": 89.92289605215176,
+ "cpuCount": 16,
+ "cpuLoad": 0.01875,
+ "platform": "linux",
+ "uptime": 10822.82
+ },
+ {
+ "timestamp": 1758227212074,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6779531264,
+ "memoryFree": 60648013824,
+ "memoryUsagePercent": 10.054542628167765,
+ "memoryEfficiency": 89.94545737183223,
+ "cpuCount": 16,
+ "cpuLoad": 0.02625,
+ "platform": "linux",
+ "uptime": 10852.85
+ },
+ {
+ "timestamp": 1758227242091,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6831554560,
+ "memoryFree": 60595990528,
+ "memoryUsagePercent": 10.131696995766502,
+ "memoryEfficiency": 89.8683030042335,
+ "cpuCount": 16,
+ "cpuLoad": 0.024375,
+ "platform": "linux",
+ "uptime": 10882.86
+ },
+ {
+ "timestamp": 1758227272121,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6975442944,
+ "memoryFree": 60452102144,
+ "memoryUsagePercent": 10.345094033745879,
+ "memoryEfficiency": 89.65490596625412,
+ "cpuCount": 16,
+ "cpuLoad": 0.056875,
+ "platform": "linux",
+ "uptime": 10912.89
+ },
+ {
+ "timestamp": 1758227302152,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7074476032,
+ "memoryFree": 60353069056,
+ "memoryUsagePercent": 10.491967374412146,
+ "memoryEfficiency": 89.50803262558786,
+ "cpuCount": 16,
+ "cpuLoad": 0.075625,
+ "platform": "linux",
+ "uptime": 10942.92
+ },
+ {
+ "timestamp": 1758227332164,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6942834688,
+ "memoryFree": 60484710400,
+ "memoryUsagePercent": 10.296733595949362,
+ "memoryEfficiency": 89.70326640405064,
+ "cpuCount": 16,
+ "cpuLoad": 0.065,
+ "platform": "linux",
+ "uptime": 10972.94
+ },
+ {
+ "timestamp": 1758227362195,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7491559424,
+ "memoryFree": 59935985664,
+ "memoryUsagePercent": 11.110532667654935,
+ "memoryEfficiency": 88.88946733234506,
+ "cpuCount": 16,
+ "cpuLoad": 0.065625,
+ "platform": "linux",
+ "uptime": 11002.97
+ },
+ {
+ "timestamp": 1758227392225,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6905143296,
+ "memoryFree": 60522401792,
+ "memoryUsagePercent": 10.240834494253152,
+ "memoryEfficiency": 89.75916550574685,
+ "cpuCount": 16,
+ "cpuLoad": 0.04,
+ "platform": "linux",
+ "uptime": 11033
+ },
+ {
+ "timestamp": 1758227422256,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6876868608,
+ "memoryFree": 60550676480,
+ "memoryUsagePercent": 10.19890105597789,
+ "memoryEfficiency": 89.80109894402212,
+ "cpuCount": 16,
+ "cpuLoad": 0.029375,
+ "platform": "linux",
+ "uptime": 11063.03
+ },
+ {
+ "timestamp": 1758227452287,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6873051136,
+ "memoryFree": 60554493952,
+ "memoryUsagePercent": 10.1932394647172,
+ "memoryEfficiency": 89.8067605352828,
+ "cpuCount": 16,
+ "cpuLoad": 0.0175,
+ "platform": "linux",
+ "uptime": 11093.06
+ },
+ {
+ "timestamp": 1758227482317,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6846918656,
+ "memoryFree": 60580626432,
+ "memoryUsagePercent": 10.15448307819016,
+ "memoryEfficiency": 89.84551692180985,
+ "cpuCount": 16,
+ "cpuLoad": 0.024375,
+ "platform": "linux",
+ "uptime": 11123.09
+ },
+ {
+ "timestamp": 1758227512348,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6870736896,
+ "memoryFree": 60556808192,
+ "memoryUsagePercent": 10.189807276882124,
+ "memoryEfficiency": 89.81019272311788,
+ "cpuCount": 16,
+ "cpuLoad": 0.015,
+ "platform": "linux",
+ "uptime": 11153.12
+ },
+ {
+ "timestamp": 1758227542378,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6854774784,
+ "memoryFree": 60572770304,
+ "memoryUsagePercent": 10.16613429282321,
+ "memoryEfficiency": 89.83386570717678,
+ "cpuCount": 16,
+ "cpuLoad": 0.0125,
+ "platform": "linux",
+ "uptime": 11183.15
+ },
+ {
+ "timestamp": 1758227572408,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6858584064,
+ "memoryFree": 60568961024,
+ "memoryUsagePercent": 10.17178373474643,
+ "memoryEfficiency": 89.82821626525357,
+ "cpuCount": 16,
+ "cpuLoad": 0.011875,
+ "platform": "linux",
+ "uptime": 11213.18
+ },
+ {
+ "timestamp": 1758227602439,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6855274496,
+ "memoryFree": 60572270592,
+ "memoryUsagePercent": 10.166875402408838,
+ "memoryEfficiency": 89.83312459759117,
+ "cpuCount": 16,
+ "cpuLoad": 0.015,
+ "platform": "linux",
+ "uptime": 11243.21
+ },
+ {
+ "timestamp": 1758227632470,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6901952512,
+ "memoryFree": 60525592576,
+ "memoryUsagePercent": 10.236102327308862,
+ "memoryEfficiency": 89.76389767269114,
+ "cpuCount": 16,
+ "cpuLoad": 0.01375,
+ "platform": "linux",
+ "uptime": 11273.24
+ },
+ {
+ "timestamp": 1758227662500,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6893613056,
+ "memoryFree": 60533932032,
+ "memoryUsagePercent": 10.223734301765122,
+ "memoryEfficiency": 89.77626569823488,
+ "cpuCount": 16,
+ "cpuLoad": 0.008125,
+ "platform": "linux",
+ "uptime": 11303.27
+ },
+ {
+ "timestamp": 1758227692530,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6873706496,
+ "memoryFree": 60553838592,
+ "memoryUsagePercent": 10.194211411714743,
+ "memoryEfficiency": 89.80578858828525,
+ "cpuCount": 16,
+ "cpuLoad": 0.005,
+ "platform": "linux",
+ "uptime": 11333.3
+ },
+ {
+ "timestamp": 1758227722558,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6907146240,
+ "memoryFree": 60520398848,
+ "memoryUsagePercent": 10.243805007264392,
+ "memoryEfficiency": 89.7561949927356,
+ "cpuCount": 16,
+ "cpuLoad": 0.003125,
+ "platform": "linux",
+ "uptime": 11363.33
+ },
+ {
+ "timestamp": 1758227752580,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6914097152,
+ "memoryFree": 60513447936,
+ "memoryUsagePercent": 10.254113720107087,
+ "memoryEfficiency": 89.74588627989291,
+ "cpuCount": 16,
+ "cpuLoad": 0.006875,
+ "platform": "linux",
+ "uptime": 11393.35
+ },
+ {
+ "timestamp": 1758227782610,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6883139584,
+ "memoryFree": 60544405504,
+ "memoryUsagePercent": 10.208201373810633,
+ "memoryEfficiency": 89.79179862618936,
+ "cpuCount": 16,
+ "cpuLoad": 0.011875,
+ "platform": "linux",
+ "uptime": 11423.38
+ },
+ {
+ "timestamp": 1758227812640,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6977200128,
+ "memoryFree": 60450344960,
+ "memoryUsagePercent": 10.34770006663304,
+ "memoryEfficiency": 89.65229993336696,
+ "cpuCount": 16,
+ "cpuLoad": 0.0325,
+ "platform": "linux",
+ "uptime": 11453.41
+ },
+ {
+ "timestamp": 1758227842670,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6890291200,
+ "memoryFree": 60537253888,
+ "memoryUsagePercent": 10.218807745421325,
+ "memoryEfficiency": 89.78119225457867,
+ "cpuCount": 16,
+ "cpuLoad": 0.031875,
+ "platform": "linux",
+ "uptime": 11483.44
+ },
+ {
+ "timestamp": 1758227872676,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6896013312,
+ "memoryFree": 60531531776,
+ "memoryUsagePercent": 10.227294057643626,
+ "memoryEfficiency": 89.77270594235637,
+ "cpuCount": 16,
+ "cpuLoad": 0.034375,
+ "platform": "linux",
+ "uptime": 11513.45
+ },
+ {
+ "timestamp": 1758227902677,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6918541312,
+ "memoryFree": 60509003776,
+ "memoryUsagePercent": 10.260704735684177,
+ "memoryEfficiency": 89.73929526431583,
+ "cpuCount": 16,
+ "cpuLoad": 0.05,
+ "platform": "linux",
+ "uptime": 11543.45
+ },
+ {
+ "timestamp": 1758227932678,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6956445696,
+ "memoryFree": 60471099392,
+ "memoryUsagePercent": 10.31691972015459,
+ "memoryEfficiency": 89.68308027984541,
+ "cpuCount": 16,
+ "cpuLoad": 0.049375,
+ "platform": "linux",
+ "uptime": 11573.45
+ },
+ {
+ "timestamp": 1758227962704,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6901506048,
+ "memoryFree": 60526039040,
+ "memoryUsagePercent": 10.235440188416785,
+ "memoryEfficiency": 89.76455981158321,
+ "cpuCount": 16,
+ "cpuLoad": 0.059375,
+ "platform": "linux",
+ "uptime": 11603.48
+ },
+ {
+ "timestamp": 1758227992735,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6943432704,
+ "memoryFree": 60484112384,
+ "memoryUsagePercent": 10.29762049758462,
+ "memoryEfficiency": 89.70237950241538,
+ "cpuCount": 16,
+ "cpuLoad": 0.054375,
+ "platform": "linux",
+ "uptime": 11633.51
+ },
+ {
+ "timestamp": 1758228022766,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6923018240,
+ "memoryFree": 60504526848,
+ "memoryUsagePercent": 10.267344348611147,
+ "memoryEfficiency": 89.73265565138885,
+ "cpuCount": 16,
+ "cpuLoad": 0.04625,
+ "platform": "linux",
+ "uptime": 11663.54
+ },
+ {
+ "timestamp": 1758228052795,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6943477760,
+ "memoryFree": 60484067328,
+ "memoryUsagePercent": 10.297687318940701,
+ "memoryEfficiency": 89.7023126810593,
+ "cpuCount": 16,
+ "cpuLoad": 0.04,
+ "platform": "linux",
+ "uptime": 11693.57
+ },
+ {
+ "timestamp": 1758228082820,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6911942656,
+ "memoryFree": 60515602432,
+ "memoryUsagePercent": 10.250918444352664,
+ "memoryEfficiency": 89.74908155564734,
+ "cpuCount": 16,
+ "cpuLoad": 0.024375,
+ "platform": "linux",
+ "uptime": 11723.59
+ },
+ {
+ "timestamp": 1758228112850,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6900936704,
+ "memoryFree": 60526608384,
+ "memoryUsagePercent": 10.23459580946267,
+ "memoryEfficiency": 89.76540419053732,
+ "cpuCount": 16,
+ "cpuLoad": 0.02125,
+ "platform": "linux",
+ "uptime": 11753.62
+ },
+ {
+ "timestamp": 1758228142871,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7041687552,
+ "memoryFree": 60385857536,
+ "memoryUsagePercent": 10.443339651191307,
+ "memoryEfficiency": 89.55666034880869,
"cpuCount": 16,
"cpuLoad": 0.05,
"platform": "linux",
- "uptime": 13454.57
+ "uptime": 11783.64
+ },
+ {
+ "timestamp": 1758228172902,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6906605568,
+ "memoryFree": 60520939520,
+ "memoryUsagePercent": 10.24300315099142,
+ "memoryEfficiency": 89.75699684900857,
+ "cpuCount": 16,
+ "cpuLoad": 0.0375,
+ "platform": "linux",
+ "uptime": 11813.67
+ },
+ {
+ "timestamp": 1758228202932,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6937681920,
+ "memoryFree": 60489863168,
+ "memoryUsagePercent": 10.289091662681178,
+ "memoryEfficiency": 89.71090833731883,
+ "cpuCount": 16,
+ "cpuLoad": 0.030625,
+ "platform": "linux",
+ "uptime": 11843.7
+ },
+ {
+ "timestamp": 1758228232943,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6919680000,
+ "memoryFree": 60507865088,
+ "memoryUsagePercent": 10.262393493592409,
+ "memoryEfficiency": 89.73760650640759,
+ "cpuCount": 16,
+ "cpuLoad": 0.051875,
+ "platform": "linux",
+ "uptime": 11873.72
+ },
+ {
+ "timestamp": 1758228262970,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7018094592,
+ "memoryFree": 60409450496,
+ "memoryUsagePercent": 10.408349559279745,
+ "memoryEfficiency": 89.59165044072026,
+ "cpuCount": 16,
+ "cpuLoad": 0.051875,
+ "platform": "linux",
+ "uptime": 11903.74
+ },
+ {
+ "timestamp": 1758228293001,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6960480256,
+ "memoryFree": 60467064832,
+ "memoryUsagePercent": 10.322903268858216,
+ "memoryEfficiency": 89.67709673114179,
+ "cpuCount": 16,
+ "cpuLoad": 0.049375,
+ "platform": "linux",
+ "uptime": 11933.77
+ },
+ {
+ "timestamp": 1758228323031,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6938034176,
+ "memoryFree": 60489510912,
+ "memoryUsagePercent": 10.289614084192356,
+ "memoryEfficiency": 89.71038591580765,
+ "cpuCount": 16,
+ "cpuLoad": 0.06,
+ "platform": "linux",
+ "uptime": 11963.8
+ },
+ {
+ "timestamp": 1758228353032,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7056658432,
+ "memoryFree": 60370886656,
+ "memoryUsagePercent": 10.465542565416436,
+ "memoryEfficiency": 89.53445743458356,
+ "cpuCount": 16,
+ "cpuLoad": 0.068125,
+ "platform": "linux",
+ "uptime": 11993.81
+ },
+ {
+ "timestamp": 1758228383062,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6937427968,
+ "memoryFree": 60490117120,
+ "memoryUsagePercent": 10.28871503321963,
+ "memoryEfficiency": 89.71128496678037,
+ "cpuCount": 16,
+ "cpuLoad": 0.04125,
+ "platform": "linux",
+ "uptime": 12023.83
+ },
+ {
+ "timestamp": 1758228413092,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6939807744,
+ "memoryFree": 60487737344,
+ "memoryUsagePercent": 10.292244415754459,
+ "memoryEfficiency": 89.70775558424555,
+ "cpuCount": 16,
+ "cpuLoad": 0.033125,
+ "platform": "linux",
+ "uptime": 12053.87
+ },
+ {
+ "timestamp": 1758228443106,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6991241216,
+ "memoryFree": 60436303872,
+ "memoryUsagePercent": 10.368524031055408,
+ "memoryEfficiency": 89.63147596894459,
+ "cpuCount": 16,
+ "cpuLoad": 0.061875,
+ "platform": "linux",
+ "uptime": 12083.88
+ },
+ {
+ "timestamp": 1758228473137,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7030603776,
+ "memoryFree": 60396941312,
+ "memoryUsagePercent": 10.426901597595355,
+ "memoryEfficiency": 89.57309840240464,
+ "cpuCount": 16,
+ "cpuLoad": 0.054375,
+ "platform": "linux",
+ "uptime": 12113.91
+ },
+ {
+ "timestamp": 1758228503166,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6983200768,
+ "memoryFree": 60444344320,
+ "memoryUsagePercent": 10.356599456329297,
+ "memoryEfficiency": 89.64340054367071,
+ "cpuCount": 16,
+ "cpuLoad": 0.054375,
+ "platform": "linux",
+ "uptime": 12143.94
+ },
+ {
+ "timestamp": 1758228533196,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6944833536,
+ "memoryFree": 60482711552,
+ "memoryUsagePercent": 10.29969803429187,
+ "memoryEfficiency": 89.70030196570814,
+ "cpuCount": 16,
+ "cpuLoad": 0.045625,
+ "platform": "linux",
+ "uptime": 12173.97
+ },
+ {
+ "timestamp": 1758228563205,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7021236224,
+ "memoryFree": 60406308864,
+ "memoryUsagePercent": 10.41300883019922,
+ "memoryEfficiency": 89.58699116980078,
+ "cpuCount": 16,
+ "cpuLoad": 0.0625,
+ "platform": "linux",
+ "uptime": 12203.98
+ },
+ {
+ "timestamp": 1758228593236,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6969229312,
+ "memoryFree": 60458315776,
+ "memoryUsagePercent": 10.33587876127542,
+ "memoryEfficiency": 89.66412123872458,
+ "cpuCount": 16,
+ "cpuLoad": 0.051875,
+ "platform": "linux",
+ "uptime": 12234.01
+ },
+ {
+ "timestamp": 1758228623266,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6997495808,
+ "memoryFree": 60430049280,
+ "memoryUsagePercent": 10.377800050213212,
+ "memoryEfficiency": 89.62219994978679,
+ "cpuCount": 16,
+ "cpuLoad": 0.045,
+ "platform": "linux",
+ "uptime": 12264.04
+ },
+ {
+ "timestamp": 1758228653297,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6943191040,
+ "memoryFree": 60484354048,
+ "memoryUsagePercent": 10.297262092129277,
+ "memoryEfficiency": 89.70273790787073,
+ "cpuCount": 16,
+ "cpuLoad": 0.030625,
+ "platform": "linux",
+ "uptime": 12294.07
+ },
+ {
+ "timestamp": 1758228683327,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7061155840,
+ "memoryFree": 60366389248,
+ "memoryUsagePercent": 10.472212551687079,
+ "memoryEfficiency": 89.52778744831292,
+ "cpuCount": 16,
+ "cpuLoad": 0.028125,
+ "platform": "linux",
+ "uptime": 12324.1
+ },
+ {
+ "timestamp": 1758228713357,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7084146688,
+ "memoryFree": 60343398400,
+ "memoryUsagePercent": 10.506309667294646,
+ "memoryEfficiency": 89.49369033270536,
+ "cpuCount": 16,
+ "cpuLoad": 0.0325,
+ "platform": "linux",
+ "uptime": 12354.13
+ },
+ {
+ "timestamp": 1758228743387,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7046418432,
+ "memoryFree": 60381126656,
+ "memoryUsagePercent": 10.450355893579824,
+ "memoryEfficiency": 89.54964410642017,
+ "cpuCount": 16,
+ "cpuLoad": 0.040625,
+ "platform": "linux",
+ "uptime": 12384.16
+ },
+ {
+ "timestamp": 1758228773417,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7003955200,
+ "memoryFree": 60423589888,
+ "memoryUsagePercent": 10.387379802807748,
+ "memoryEfficiency": 89.61262019719226,
+ "cpuCount": 16,
+ "cpuLoad": 0.03375,
+ "platform": "linux",
+ "uptime": 12414.19
+ },
+ {
+ "timestamp": 1758228803449,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 6992470016,
+ "memoryFree": 60435075072,
+ "memoryUsagePercent": 10.370346431675802,
+ "memoryEfficiency": 89.6296535683242,
+ "cpuCount": 16,
+ "cpuLoad": 0.05875,
+ "platform": "linux",
+ "uptime": 12444.22
+ },
+ {
+ "timestamp": 1758228833479,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7034372096,
+ "memoryFree": 60393172992,
+ "memoryUsagePercent": 10.432490292831229,
+ "memoryEfficiency": 89.56750970716877,
+ "cpuCount": 16,
+ "cpuLoad": 0.0575,
+ "platform": "linux",
+ "uptime": 12474.25
+ },
+ {
+ "timestamp": 1758228863509,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7006142464,
+ "memoryFree": 60421402624,
+ "memoryUsagePercent": 10.39062367591205,
+ "memoryEfficiency": 89.60937632408795,
+ "cpuCount": 16,
+ "cpuLoad": 0.034375,
+ "platform": "linux",
+ "uptime": 12504.28
+ },
+ {
+ "timestamp": 1758228893539,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7084126208,
+ "memoryFree": 60343418880,
+ "memoryUsagePercent": 10.506279293950973,
+ "memoryEfficiency": 89.49372070604903,
+ "cpuCount": 16,
+ "cpuLoad": 0.041875,
+ "platform": "linux",
+ "uptime": 12534.31
+ },
+ {
+ "timestamp": 1758228923569,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7013847040,
+ "memoryFree": 60413698048,
+ "memoryUsagePercent": 10.402050127801918,
+ "memoryEfficiency": 89.59794987219809,
+ "cpuCount": 16,
+ "cpuLoad": 0.035625,
+ "platform": "linux",
+ "uptime": 12564.34
+ },
+ {
+ "timestamp": 1758228953590,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7035703296,
+ "memoryFree": 60391841792,
+ "memoryUsagePercent": 10.434464560169989,
+ "memoryEfficiency": 89.56553543983001,
+ "cpuCount": 16,
+ "cpuLoad": 0.026875,
+ "platform": "linux",
+ "uptime": 12594.36
+ },
+ {
+ "timestamp": 1758228983606,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7003348992,
+ "memoryFree": 60424196096,
+ "memoryUsagePercent": 10.386480751835022,
+ "memoryEfficiency": 89.61351924816498,
+ "cpuCount": 16,
+ "cpuLoad": 0.023125,
+ "platform": "linux",
+ "uptime": 12624.38
+ },
+ {
+ "timestamp": 1758229013637,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7010938880,
+ "memoryFree": 60416606208,
+ "memoryUsagePercent": 10.39773711300032,
+ "memoryEfficiency": 89.60226288699968,
+ "cpuCount": 16,
+ "cpuLoad": 0.02625,
+ "platform": "linux",
+ "uptime": 12654.41
+ },
+ {
+ "timestamp": 1758229043652,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7031742464,
+ "memoryFree": 60395802624,
+ "memoryUsagePercent": 10.428590355503587,
+ "memoryEfficiency": 89.57140964449641,
+ "cpuCount": 16,
+ "cpuLoad": 0.02,
+ "platform": "linux",
+ "uptime": 12684.42
+ },
+ {
+ "timestamp": 1758229073681,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7030353920,
+ "memoryFree": 60397191168,
+ "memoryUsagePercent": 10.42653104280254,
+ "memoryEfficiency": 89.57346895719746,
+ "cpuCount": 16,
+ "cpuLoad": 0.02125,
+ "platform": "linux",
+ "uptime": 12714.45
+ },
+ {
+ "timestamp": 1758229103712,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7079493632,
+ "memoryFree": 60348051456,
+ "memoryUsagePercent": 10.499408843612088,
+ "memoryEfficiency": 89.50059115638791,
+ "cpuCount": 16,
+ "cpuLoad": 0.0375,
+ "platform": "linux",
+ "uptime": 12744.49
+ },
+ {
+ "timestamp": 1758229133734,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7036538880,
+ "memoryFree": 60391006208,
+ "memoryUsagePercent": 10.435703792591857,
+ "memoryEfficiency": 89.56429620740815,
+ "cpuCount": 16,
+ "cpuLoad": 0.02625,
+ "platform": "linux",
+ "uptime": 12774.51
+ },
+ {
+ "timestamp": 1758229163749,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7033712640,
+ "memoryFree": 60393832448,
+ "memoryUsagePercent": 10.431512271164951,
+ "memoryEfficiency": 89.56848772883505,
+ "cpuCount": 16,
+ "cpuLoad": 0.035,
+ "platform": "linux",
+ "uptime": 12804.52
+ },
+ {
+ "timestamp": 1758229193766,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7127855104,
+ "memoryFree": 60299689984,
+ "memoryUsagePercent": 10.571132457362053,
+ "memoryEfficiency": 89.42886754263795,
+ "cpuCount": 16,
+ "cpuLoad": 0.034375,
+ "platform": "linux",
+ "uptime": 12834.54
+ },
+ {
+ "timestamp": 1758229223797,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7053119488,
+ "memoryFree": 60374425600,
+ "memoryUsagePercent": 10.460294051629702,
+ "memoryEfficiency": 89.5397059483703,
+ "cpuCount": 16,
+ "cpuLoad": 0.043125,
+ "platform": "linux",
+ "uptime": 12864.57
+ },
+ {
+ "timestamp": 1758229253810,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7082954752,
+ "memoryFree": 60344590336,
+ "memoryUsagePercent": 10.504541938692864,
+ "memoryEfficiency": 89.49545806130713,
+ "cpuCount": 16,
+ "cpuLoad": 0.04125,
+ "platform": "linux",
+ "uptime": 12894.58
+ },
+ {
+ "timestamp": 1758229283840,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7046856704,
+ "memoryFree": 60380688384,
+ "memoryUsagePercent": 10.451005883134428,
+ "memoryEfficiency": 89.54899411686557,
+ "cpuCount": 16,
+ "cpuLoad": 0.03375,
+ "platform": "linux",
+ "uptime": 12924.61
+ },
+ {
+ "timestamp": 1758229313871,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7034470400,
+ "memoryFree": 60393074688,
+ "memoryUsagePercent": 10.43263608488086,
+ "memoryEfficiency": 89.56736391511915,
+ "cpuCount": 16,
+ "cpuLoad": 0.034375,
+ "platform": "linux",
+ "uptime": 12954.64
+ },
+ {
+ "timestamp": 1758229343886,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7052783616,
+ "memoryFree": 60374761472,
+ "memoryUsagePercent": 10.459795928793463,
+ "memoryEfficiency": 89.54020407120653,
+ "cpuCount": 16,
+ "cpuLoad": 0.03625,
+ "platform": "linux",
+ "uptime": 12984.66
+ },
+ {
+ "timestamp": 1758229373912,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7063052288,
+ "memoryFree": 60364492800,
+ "memoryUsagePercent": 10.47502512331122,
+ "memoryEfficiency": 89.52497487668879,
+ "cpuCount": 16,
+ "cpuLoad": 0.025625,
+ "platform": "linux",
+ "uptime": 13014.68
},
{
- "timestamp": 1758229843823,
+ "timestamp": 1758229403931,
"memoryTotal": 67427545088,
- "memoryUsed": 7103152128,
- "memoryFree": 60324392960,
- "memoryUsagePercent": 10.534496130223403,
- "memoryEfficiency": 89.4655038697766,
+ "memoryUsed": 7037816832,
+ "memoryFree": 60389728256,
+ "memoryUsagePercent": 10.437599089237066,
+ "memoryEfficiency": 89.56240091076293,
"cpuCount": 16,
- "cpuLoad": 0.04125,
+ "cpuLoad": 0.015625,
"platform": "linux",
- "uptime": 13484.6
+ "uptime": 13044.7
},
{
- "timestamp": 1758229873853,
+ "timestamp": 1758229433962,
"memoryTotal": 67427545088,
- "memoryUsed": 7074824192,
- "memoryFree": 60352720896,
- "memoryUsagePercent": 10.492483721254592,
- "memoryEfficiency": 89.50751627874541,
+ "memoryUsed": 7050907648,
+ "memoryFree": 60376637440,
+ "memoryUsagePercent": 10.457013730512994,
+ "memoryEfficiency": 89.542986269487,
"cpuCount": 16,
- "cpuLoad": 0.033125,
+ "cpuLoad": 0.01375,
"platform": "linux",
- "uptime": 13514.63
+ "uptime": 13074.74
},
{
- "timestamp": 1758229903883,
+ "timestamp": 1758229463993,
"memoryTotal": 67427545088,
- "memoryUsed": 7270756352,
- "memoryFree": 60156788736,
- "memoryUsagePercent": 10.783065500176377,
- "memoryEfficiency": 89.21693449982362,
+ "memoryUsed": 7061499904,
+ "memoryFree": 60366045184,
+ "memoryUsagePercent": 10.472722823860789,
+ "memoryEfficiency": 89.52727717613921,
"cpuCount": 16,
- "cpuLoad": 0.04875,
+ "cpuLoad": 0.011875,
"platform": "linux",
- "uptime": 13544.66
+ "uptime": 13104.77
},
{
- "timestamp": 1758229933913,
+ "timestamp": 1758229494016,
"memoryTotal": 67427545088,
- "memoryUsed": 7066669056,
- "memoryFree": 60360876032,
- "memoryUsagePercent": 10.480389055803911,
- "memoryEfficiency": 89.51961094419609,
+ "memoryUsed": 7056203776,
+ "memoryFree": 60371341312,
+ "memoryUsagePercent": 10.464868277186891,
+ "memoryEfficiency": 89.5351317228131,
"cpuCount": 16,
- "cpuLoad": 0.045,
+ "cpuLoad": 0.015625,
"platform": "linux",
- "uptime": 13574.69
+ "uptime": 13134.79
},
{
- "timestamp": 1758229963916,
+ "timestamp": 1758229524044,
"memoryTotal": 67427545088,
- "memoryUsed": 7083241472,
- "memoryFree": 60344303616,
- "memoryUsagePercent": 10.50496716550429,
- "memoryEfficiency": 89.4950328344957,
+ "memoryUsed": 7061540864,
+ "memoryFree": 60366004224,
+ "memoryUsagePercent": 10.472783570548135,
+ "memoryEfficiency": 89.52721642945187,
"cpuCount": 16,
- "cpuLoad": 0.03125,
+ "cpuLoad": 0.009375,
"platform": "linux",
- "uptime": 13604.69
+ "uptime": 13164.82
},
{
- "timestamp": 1758229993947,
+ "timestamp": 1758229554075,
"memoryTotal": 67427545088,
- "memoryUsed": 7125790720,
- "memoryFree": 60301754368,
- "memoryUsagePercent": 10.56807082431979,
- "memoryEfficiency": 89.43192917568021,
+ "memoryUsed": 7067455488,
+ "memoryFree": 60360089600,
+ "memoryUsagePercent": 10.481555392200963,
+ "memoryEfficiency": 89.51844460779904,
"cpuCount": 16,
- "cpuLoad": 0.039375,
+ "cpuLoad": 0.018125,
"platform": "linux",
- "uptime": 13634.72
+ "uptime": 13194.85
},
{
- "timestamp": 1758230023976,
+ "timestamp": 1758229584078,
"memoryTotal": 67427545088,
- "memoryUsed": 7097532416,
- "memoryFree": 60330012672,
- "memoryUsagePercent": 10.526161684719467,
- "memoryEfficiency": 89.47383831528053,
+ "memoryUsed": 7073898496,
+ "memoryFree": 60353646592,
+ "memoryUsagePercent": 10.491110846120561,
+ "memoryEfficiency": 89.50888915387944,
"cpuCount": 16,
- "cpuLoad": 0.038125,
+ "cpuLoad": 0.01375,
"platform": "linux",
- "uptime": 13664.75
+ "uptime": 13224.85
},
{
- "timestamp": 1758230054007,
+ "timestamp": 1758229614108,
"memoryTotal": 67427545088,
- "memoryUsed": 7234437120,
- "memoryFree": 60193107968,
- "memoryUsagePercent": 10.729201412506272,
- "memoryEfficiency": 89.27079858749373,
+ "memoryUsed": 7066611712,
+ "memoryFree": 60360933376,
+ "memoryUsagePercent": 10.480304010441627,
+ "memoryEfficiency": 89.51969598955837,
"cpuCount": 16,
- "cpuLoad": 0.03625,
+ "cpuLoad": 0.021875,
"platform": "linux",
- "uptime": 13694.78
+ "uptime": 13254.88
},
{
- "timestamp": 1758230084038,
+ "timestamp": 1758229644114,
"memoryTotal": 67427545088,
- "memoryUsed": 7153229824,
- "memoryFree": 60274315264,
- "memoryUsagePercent": 10.608765030173185,
- "memoryEfficiency": 89.39123496982681,
+ "memoryUsed": 7093911552,
+ "memoryFree": 60333633536,
+ "memoryUsagePercent": 10.520791677558043,
+ "memoryEfficiency": 89.47920832244196,
"cpuCount": 16,
- "cpuLoad": 0.03,
+ "cpuLoad": 0.030625,
"platform": "linux",
- "uptime": 13724.81
+ "uptime": 13284.89
},
{
- "timestamp": 1758230114068,
+ "timestamp": 1758229674144,
"memoryTotal": 67427545088,
- "memoryUsed": 7132119040,
- "memoryFree": 60295426048,
- "memoryUsagePercent": 10.577456187514818,
- "memoryEfficiency": 89.42254381248519,
+ "memoryUsed": 7082573824,
+ "memoryFree": 60344971264,
+ "memoryUsagePercent": 10.50397699450054,
+ "memoryEfficiency": 89.49602300549947,
"cpuCount": 16,
- "cpuLoad": 0.059375,
+ "cpuLoad": 0.0275,
"platform": "linux",
- "uptime": 13754.84
+ "uptime": 13314.92
},
{
- "timestamp": 1758230144098,
+ "timestamp": 1758229704160,
"memoryTotal": 67427545088,
- "memoryUsed": 7112732672,
- "memoryFree": 60314812416,
- "memoryUsagePercent": 10.54870478039374,
- "memoryEfficiency": 89.45129521960627,
+ "memoryUsed": 7093534720,
+ "memoryFree": 60334010368,
+ "memoryUsagePercent": 10.520232808034454,
+ "memoryEfficiency": 89.47976719196555,
"cpuCount": 16,
- "cpuLoad": 0.043125,
+ "cpuLoad": 0.02375,
+ "platform": "linux",
+ "uptime": 13344.93
+ },
+ {
+ "timestamp": 1758229734190,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7050190848,
+ "memoryFree": 60377354240,
+ "memoryUsagePercent": 10.455950663484431,
+ "memoryEfficiency": 89.54404933651557,
+ "cpuCount": 16,
+ "cpuLoad": 0.044375,
+ "platform": "linux",
+ "uptime": 13374.96
+ },
+ {
+ "timestamp": 1758229764213,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7027691520,
+ "memoryFree": 60399853568,
+ "memoryUsagePercent": 10.422582508125021,
+ "memoryEfficiency": 89.57741749187498,
+ "cpuCount": 16,
+ "cpuLoad": 0.03875,
+ "platform": "linux",
+ "uptime": 13404.99
+ },
+ {
+ "timestamp": 1758229794243,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7396974592,
+ "memoryFree": 60030570496,
+ "memoryUsagePercent": 10.970256417234491,
+ "memoryEfficiency": 89.0297435827655,
+ "cpuCount": 16,
+ "cpuLoad": 0.064375,
+ "platform": "linux",
+ "uptime": 13435.02
+ },
+ {
+ "timestamp": 1758229824273,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7171403776,
+ "memoryFree": 60256141312,
+ "memoryUsagePercent": 10.635718335348807,
+ "memoryEfficiency": 89.36428166465119,
+ "cpuCount": 16,
+ "cpuLoad": 0.051875,
+ "platform": "linux",
+ "uptime": 13465.05
+ },
+ {
+ "timestamp": 1758229854304,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7098408960,
+ "memoryFree": 60329136128,
+ "memoryUsagePercent": 10.527461663828683,
+ "memoryEfficiency": 89.47253833617131,
+ "cpuCount": 16,
+ "cpuLoad": 0.035,
"platform": "linux",
- "uptime": 13784.87
+ "uptime": 13495.08
},
{
- "timestamp": 1758230174129,
+ "timestamp": 1758229884322,
"memoryTotal": 67427545088,
- "memoryUsed": 7112998912,
- "memoryFree": 60314546176,
- "memoryUsagePercent": 10.549099633861491,
- "memoryEfficiency": 89.45090036613851,
+ "memoryUsed": 7073603584,
+ "memoryFree": 60353941504,
+ "memoryUsagePercent": 10.490673469971668,
+ "memoryEfficiency": 89.50932653002833,
"cpuCount": 16,
"cpuLoad": 0.038125,
"platform": "linux",
- "uptime": 13814.9
+ "uptime": 13525.09
},
{
- "timestamp": 1758230204158,
+ "timestamp": 1758229914329,
"memoryTotal": 67427545088,
- "memoryUsed": 7089487872,
- "memoryFree": 60338057216,
- "memoryUsagePercent": 10.514231035324624,
- "memoryEfficiency": 89.48576896467537,
+ "memoryUsed": 7094841344,
+ "memoryFree": 60332703744,
+ "memoryUsagePercent": 10.522170627360806,
+ "memoryEfficiency": 89.47782937263919,
"cpuCount": 16,
- "cpuLoad": 0.026875,
+ "cpuLoad": 0.045625,
"platform": "linux",
- "uptime": 13844.93
+ "uptime": 13555.1
},
{
- "timestamp": 1758230234163,
+ "timestamp": 1758229944352,
"memoryTotal": 67427545088,
- "memoryUsed": 7131688960,
- "memoryFree": 60295856128,
- "memoryUsagePercent": 10.576818347297682,
- "memoryEfficiency": 89.42318165270231,
+ "memoryUsed": 7113420800,
+ "memoryFree": 60314124288,
+ "memoryUsagePercent": 10.54972532474116,
+ "memoryEfficiency": 89.45027467525884,
"cpuCount": 16,
- "cpuLoad": 0.0425,
+ "cpuLoad": 0.038125,
"platform": "linux",
- "uptime": 13874.94
+ "uptime": 13585.13
},
{
- "timestamp": 1758230264194,
+ "timestamp": 1758229974382,
"memoryTotal": 67427545088,
- "memoryUsed": 7244861440,
- "memoryFree": 60182683648,
- "memoryUsagePercent": 10.744661444435947,
- "memoryEfficiency": 89.25533855556405,
+ "memoryUsed": 7113195520,
+ "memoryFree": 60314349568,
+ "memoryUsagePercent": 10.549391217960755,
+ "memoryEfficiency": 89.45060878203924,
"cpuCount": 16,
- "cpuLoad": 0.0625,
+ "cpuLoad": 0.03125,
"platform": "linux",
- "uptime": 13904.97
+ "uptime": 13615.16
},
{
- "timestamp": 1758230294223,
+ "timestamp": 1758230004402,
"memoryTotal": 67427545088,
- "memoryUsed": 7330643968,
- "memoryFree": 60096901120,
- "memoryUsagePercent": 10.871883231745635,
- "memoryEfficiency": 89.12811676825436,
+ "memoryUsed": 7129550848,
+ "memoryFree": 60297994240,
+ "memoryUsagePercent": 10.573647370218195,
+ "memoryEfficiency": 89.4263526297818,
"cpuCount": 16,
- "cpuLoad": 0.041875,
+ "cpuLoad": 0.033125,
"platform": "linux",
- "uptime": 13935
+ "uptime": 13645.17
},
{
- "timestamp": 1758230324254,
+ "timestamp": 1758230034421,
"memoryTotal": 67427545088,
- "memoryUsed": 7276408832,
- "memoryFree": 60151136256,
- "memoryUsagePercent": 10.791448543030189,
- "memoryEfficiency": 89.20855145696981,
+ "memoryUsed": 7115837440,
+ "memoryFree": 60311707648,
+ "memoryUsagePercent": 10.553309379294602,
+ "memoryEfficiency": 89.4466906207054,
"cpuCount": 16,
- "cpuLoad": 0.04625,
+ "cpuLoad": 0.031875,
"platform": "linux",
- "uptime": 13965.03
+ "uptime": 13675.19
},
{
- "timestamp": 1758230354284,
+ "timestamp": 1758230064422,
"memoryTotal": 67427545088,
- "memoryUsed": 7404871680,
- "memoryFree": 60022673408,
- "memoryUsagePercent": 10.981968378554889,
- "memoryEfficiency": 89.01803162144512,
+ "memoryUsed": 7421280256,
+ "memoryFree": 60006264832,
+ "memoryUsagePercent": 11.006303501505881,
+ "memoryEfficiency": 88.99369649849412,
"cpuCount": 16,
- "cpuLoad": 0.0775,
+ "cpuLoad": 0.030625,
"platform": "linux",
- "uptime": 13995.06
+ "uptime": 13705.2
},
{
- "timestamp": 1758230384314,
+ "timestamp": 1758230094431,
"memoryTotal": 67427545088,
- "memoryUsed": 7593287680,
- "memoryFree": 59834257408,
- "memoryUsagePercent": 11.2614031403486,
- "memoryEfficiency": 88.7385968596514,
+ "memoryUsed": 7202369536,
+ "memoryFree": 60225175552,
+ "memoryUsagePercent": 10.681642830982732,
+ "memoryEfficiency": 89.31835716901728,
"cpuCount": 16,
- "cpuLoad": 0.083125,
+ "cpuLoad": 0.05,
"platform": "linux",
- "uptime": 14025.09
+ "uptime": 13735.2
},
{
- "timestamp": 1758230414332,
+ "timestamp": 1758230124440,
"memoryTotal": 67427545088,
- "memoryUsed": 7632936960,
- "memoryFree": 59794608128,
- "memoryUsagePercent": 11.320205933699972,
- "memoryEfficiency": 88.67979406630003,
+ "memoryUsed": 7109746688,
+ "memoryFree": 60317798400,
+ "memoryUsagePercent": 10.544276346886182,
+ "memoryEfficiency": 89.45572365311382,
"cpuCount": 16,
- "cpuLoad": 0.075,
+ "cpuLoad": 0.06,
"platform": "linux",
- "uptime": 14055.1
+ "uptime": 13765.21
},
{
- "timestamp": 1758230444363,
+ "timestamp": 1758230154471,
"memoryTotal": 67427545088,
- "memoryUsed": 7332990976,
- "memoryFree": 60094554112,
- "memoryUsagePercent": 10.875364016930588,
- "memoryEfficiency": 89.12463598306941,
+ "memoryUsed": 7092793344,
+ "memoryFree": 60334751744,
+ "memoryUsagePercent": 10.519133292993484,
+ "memoryEfficiency": 89.48086670700651,
"cpuCount": 16,
- "cpuLoad": 0.095625,
+ "cpuLoad": 0.03625,
+ "platform": "linux",
+ "uptime": 13795.24
+ },
+ {
+ "timestamp": 1758230184501,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7119818752,
+ "memoryFree": 60307726336,
+ "memoryUsagePercent": 10.559213957304676,
+ "memoryEfficiency": 89.44078604269532,
+ "cpuCount": 16,
+ "cpuLoad": 0.0375,
+ "platform": "linux",
+ "uptime": 13825.27
+ },
+ {
+ "timestamp": 1758230214531,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7104966656,
+ "memoryFree": 60322578432,
+ "memoryUsagePercent": 10.53718720847285,
+ "memoryEfficiency": 89.46281279152714,
+ "cpuCount": 16,
+ "cpuLoad": 0.03625,
+ "platform": "linux",
+ "uptime": 13855.3
+ },
+ {
+ "timestamp": 1758230244546,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7134007296,
+ "memoryFree": 60293537792,
+ "memoryUsagePercent": 10.58025660980149,
+ "memoryEfficiency": 89.4197433901985,
+ "cpuCount": 16,
+ "cpuLoad": 0.049375,
+ "platform": "linux",
+ "uptime": 13885.32
+ },
+ {
+ "timestamp": 1758230274562,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7187980288,
+ "memoryFree": 60239564800,
+ "memoryUsagePercent": 10.66030251971792,
+ "memoryEfficiency": 89.33969748028208,
+ "cpuCount": 16,
+ "cpuLoad": 0.053125,
+ "platform": "linux",
+ "uptime": 13915.33
+ },
+ {
+ "timestamp": 1758230304592,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7253843968,
+ "memoryFree": 60173701120,
+ "memoryUsagePercent": 10.757983192971025,
+ "memoryEfficiency": 89.24201680702897,
+ "cpuCount": 16,
+ "cpuLoad": 0.045,
+ "platform": "linux",
+ "uptime": 13945.36
+ },
+ {
+ "timestamp": 1758230334622,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7337738240,
+ "memoryFree": 60089806848,
+ "memoryUsagePercent": 10.882404557994043,
+ "memoryEfficiency": 89.11759544200595,
+ "cpuCount": 16,
+ "cpuLoad": 0.04875,
+ "platform": "linux",
+ "uptime": 13975.39
+ },
+ {
+ "timestamp": 1758230364649,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7630958592,
+ "memoryFree": 59796586496,
+ "memoryUsagePercent": 11.317271868701138,
+ "memoryEfficiency": 88.68272813129886,
+ "cpuCount": 16,
+ "cpuLoad": 0.079375,
"platform": "linux",
- "uptime": 14085.14
+ "uptime": 14005.42
},
{
- "timestamp": 1758230474394,
+ "timestamp": 1758230394680,
"memoryTotal": 67427545088,
- "memoryUsed": 7297675264,
- "memoryFree": 60129869824,
- "memoryUsagePercent": 10.822988223100472,
- "memoryEfficiency": 89.17701177689953,
+ "memoryUsed": 7356616704,
+ "memoryFree": 60070928384,
+ "memoryUsagePercent": 10.910402706192025,
+ "memoryEfficiency": 89.08959729380797,
"cpuCount": 16,
"cpuLoad": 0.085,
"platform": "linux",
- "uptime": 14115.17
+ "uptime": 14035.45
+ },
+ {
+ "timestamp": 1758230424710,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7262126080,
+ "memoryFree": 60165419008,
+ "memoryUsagePercent": 10.770266173152478,
+ "memoryEfficiency": 89.22973382684752,
+ "cpuCount": 16,
+ "cpuLoad": 0.0775,
+ "platform": "linux",
+ "uptime": 14065.48
},
{
- "timestamp": 1758230504394,
+ "timestamp": 1758230454739,
"memoryTotal": 67427545088,
- "memoryUsed": 7339159552,
- "memoryFree": 60088385536,
- "memoryUsagePercent": 10.884512468044964,
- "memoryEfficiency": 89.11548753195504,
+ "memoryUsed": 7229886464,
+ "memoryFree": 60197658624,
+ "memoryUsagePercent": 10.722452455542081,
+ "memoryEfficiency": 89.27754754445792,
"cpuCount": 16,
- "cpuLoad": 0.105,
+ "cpuLoad": 0.095625,
"platform": "linux",
- "uptime": 14145.17
+ "uptime": 14095.51
},
{
- "timestamp": 1758230534424,
+ "timestamp": 1758230484770,
"memoryTotal": 67427545088,
- "memoryUsed": 7147458560,
- "memoryFree": 60280086528,
- "memoryUsagePercent": 10.600205821926068,
- "memoryEfficiency": 89.39979417807393,
+ "memoryUsed": 7504281600,
+ "memoryFree": 59923263488,
+ "memoryUsagePercent": 11.129400588744746,
+ "memoryEfficiency": 88.87059941125526,
"cpuCount": 16,
- "cpuLoad": 0.089375,
+ "cpuLoad": 0.100625,
"platform": "linux",
- "uptime": 14175.2
+ "uptime": 14125.54
},
{
- "timestamp": 1758230564454,
+ "timestamp": 1758230514790,
"memoryTotal": 67427545088,
- "memoryUsed": 7200247808,
- "memoryFree": 60227297280,
- "memoryUsagePercent": 10.678496152578184,
- "memoryEfficiency": 89.32150384742181,
+ "memoryUsed": 7315447808,
+ "memoryFree": 60112097280,
+ "memoryUsagePercent": 10.8493462107401,
+ "memoryEfficiency": 89.1506537892599,
"cpuCount": 16,
- "cpuLoad": 0.063125,
+ "cpuLoad": 0.10375,
"platform": "linux",
- "uptime": 14205.23
+ "uptime": 14155.56
},
{
- "timestamp": 1758230594470,
+ "timestamp": 1758230544806,
"memoryTotal": 67427545088,
- "memoryUsed": 7258968064,
- "memoryFree": 60168577024,
- "memoryUsagePercent": 10.765582603558068,
- "memoryEfficiency": 89.23441739644193,
+ "memoryUsed": 7155494912,
+ "memoryFree": 60272050176,
+ "memoryUsagePercent": 10.612124321983442,
+ "memoryEfficiency": 89.38787567801656,
"cpuCount": 16,
- "cpuLoad": 0.05375,
+ "cpuLoad": 0.075625,
"platform": "linux",
- "uptime": 14235.24
+ "uptime": 14185.58
},
{
- "timestamp": 1758230624501,
+ "timestamp": 1758230574822,
"memoryTotal": 67427545088,
- "memoryUsed": 7356305408,
- "memoryFree": 60071239680,
- "memoryUsagePercent": 10.909941031368191,
- "memoryEfficiency": 89.09005896863181,
+ "memoryUsed": 7288881152,
+ "memoryFree": 60138663936,
+ "memoryUsagePercent": 10.809945909327185,
+ "memoryEfficiency": 89.19005409067282,
"cpuCount": 16,
- "cpuLoad": 0.07625,
+ "cpuLoad": 0.0575,
"platform": "linux",
- "uptime": 14265.27
+ "uptime": 14215.59
},
{
- "timestamp": 1758230654530,
+ "timestamp": 1758230604827,
"memoryTotal": 67427545088,
- "memoryUsed": 7350464512,
- "memoryFree": 60077080576,
- "memoryUsagePercent": 10.901278553752586,
- "memoryEfficiency": 89.09872144624741,
+ "memoryUsed": 7408676864,
+ "memoryFree": 60018868224,
+ "memoryUsagePercent": 10.987611745809374,
+ "memoryEfficiency": 89.01238825419063,
"cpuCount": 16,
- "cpuLoad": 0.071875,
+ "cpuLoad": 0.055,
"platform": "linux",
- "uptime": 14295.3
+ "uptime": 14245.6
},
{
- "timestamp": 1758230684553,
+ "timestamp": 1758230634854,
"memoryTotal": 67427545088,
- "memoryUsed": 7456219136,
- "memoryFree": 59971325952,
- "memoryUsagePercent": 11.05812042581241,
- "memoryEfficiency": 88.9418795741876,
+ "memoryUsed": 7270383616,
+ "memoryFree": 60157161472,
+ "memoryUsagePercent": 10.782512705321526,
+ "memoryEfficiency": 89.21748729467848,
"cpuCount": 16,
- "cpuLoad": 0.068125,
+ "cpuLoad": 0.064375,
"platform": "linux",
- "uptime": 14325.33
+ "uptime": 14275.63
},
{
- "timestamp": 1758230714560,
+ "timestamp": 1758230664884,
"memoryTotal": 67427545088,
- "memoryUsed": 7427633152,
- "memoryFree": 59999911936,
- "memoryUsagePercent": 11.015725312713316,
- "memoryEfficiency": 88.98427468728669,
+ "memoryUsed": 7465410560,
+ "memoryFree": 59962134528,
+ "memoryUsagePercent": 11.071751982452954,
+ "memoryEfficiency": 88.92824801754705,
"cpuCount": 16,
- "cpuLoad": 0.086875,
+ "cpuLoad": 0.07,
"platform": "linux",
- "uptime": 14355.33
+ "uptime": 14305.66
},
{
- "timestamp": 1758230744590,
+ "timestamp": 1758230694913,
"memoryTotal": 67427545088,
- "memoryUsed": 7459995648,
- "memoryFree": 59967549440,
- "memoryUsagePercent": 11.063721270385752,
- "memoryEfficiency": 88.93627872961424,
+ "memoryUsed": 7356362752,
+ "memoryFree": 60071182336,
+ "memoryUsagePercent": 10.910026076730476,
+ "memoryEfficiency": 89.08997392326953,
"cpuCount": 16,
- "cpuLoad": 0.081875,
+ "cpuLoad": 0.066875,
"platform": "linux",
- "uptime": 14385.36
+ "uptime": 14335.69
},
{
- "timestamp": 1758230774620,
+ "timestamp": 1758230724921,
"memoryTotal": 67427545088,
- "memoryUsed": 7120367616,
- "memoryFree": 60307177472,
- "memoryUsagePercent": 10.56002796291512,
- "memoryEfficiency": 89.43997203708489,
+ "memoryUsed": 7412293632,
+ "memoryFree": 60015251456,
+ "memoryUsagePercent": 10.992975678302066,
+ "memoryEfficiency": 89.00702432169794,
"cpuCount": 16,
- "cpuLoad": 0.05875,
+ "cpuLoad": 0.083125,
"platform": "linux",
- "uptime": 14415.39
+ "uptime": 14365.69
},
{
- "timestamp": 1758230804641,
+ "timestamp": 1758230754948,
"memoryTotal": 67427545088,
- "memoryUsed": 7156092928,
- "memoryFree": 60271452160,
- "memoryUsagePercent": 10.6130112236187,
- "memoryEfficiency": 89.3869887763813,
+ "memoryUsed": 7173705728,
+ "memoryFree": 60253839360,
+ "memoryUsagePercent": 10.639132299177678,
+ "memoryEfficiency": 89.36086770082233,
"cpuCount": 16,
- "cpuLoad": 0.035625,
+ "cpuLoad": 0.069375,
"platform": "linux",
- "uptime": 14445.41
+ "uptime": 14395.72
},
{
- "timestamp": 1758230834672,
+ "timestamp": 1758230784979,
"memoryTotal": 67427545088,
- "memoryUsed": 7123447808,
- "memoryFree": 60304097280,
- "memoryUsagePercent": 10.564596113803573,
- "memoryEfficiency": 89.43540388619643,
+ "memoryUsed": 7113232384,
+ "memoryFree": 60314312704,
+ "memoryUsagePercent": 10.549445889979365,
+ "memoryEfficiency": 89.45055411002063,
"cpuCount": 16,
- "cpuLoad": 0.03,
+ "cpuLoad": 0.05,
"platform": "linux",
- "uptime": 14475.44
+ "uptime": 14425.75
},
{
- "timestamp": 1758230864701,
+ "timestamp": 1758230815009,
"memoryTotal": 67427545088,
- "memoryUsed": 7275745280,
- "memoryFree": 60151799808,
- "memoryUsagePercent": 10.790464446695177,
- "memoryEfficiency": 89.20953555330482,
+ "memoryUsed": 7128117248,
+ "memoryFree": 60299427840,
+ "memoryUsagePercent": 10.571521236161068,
+ "memoryEfficiency": 89.42847876383894,
"cpuCount": 16,
- "cpuLoad": 0.04125,
+ "cpuLoad": 0.035,
"platform": "linux",
- "uptime": 14505.47
+ "uptime": 14455.78
},
{
- "timestamp": 1758230894732,
+ "timestamp": 1758230845028,
"memoryTotal": 67427545088,
- "memoryUsed": 7288119296,
- "memoryFree": 60139425792,
- "memoryUsagePercent": 10.808816020942542,
- "memoryEfficiency": 89.19118397905746,
+ "memoryUsed": 7122538496,
+ "memoryFree": 60305006592,
+ "memoryUsagePercent": 10.563247537344482,
+ "memoryEfficiency": 89.43675246265552,
"cpuCount": 16,
- "cpuLoad": 0.03125,
+ "cpuLoad": 0.025,
+ "platform": "linux",
+ "uptime": 14485.8
+ },
+ {
+ "timestamp": 1758230875053,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7349637120,
+ "memoryFree": 60077907968,
+ "memoryUsagePercent": 10.900051470668188,
+ "memoryEfficiency": 89.09994852933181,
+ "cpuCount": 16,
+ "cpuLoad": 0.04375,
"platform": "linux",
- "uptime": 14535.5
+ "uptime": 14515.83
},
{
- "timestamp": 1758230924763,
+ "timestamp": 1758230905083,
"memoryTotal": 67427545088,
- "memoryUsed": 7359033344,
- "memoryFree": 60068511744,
- "memoryUsagePercent": 10.913986760745466,
- "memoryEfficiency": 89.08601323925453,
+ "memoryUsed": 7388966912,
+ "memoryFree": 60038578176,
+ "memoryUsagePercent": 10.958380439858258,
+ "memoryEfficiency": 89.04161956014174,
"cpuCount": 16,
- "cpuLoad": 0.078125,
+ "cpuLoad": 0.040625,
"platform": "linux",
- "uptime": 14565.54
+ "uptime": 14545.86
},
{
- "timestamp": 1758230954781,
+ "timestamp": 1758230935086,
"memoryTotal": 67427545088,
- "memoryUsed": 7408844800,
- "memoryFree": 60018700288,
- "memoryUsagePercent": 10.987860807227495,
- "memoryEfficiency": 89.01213919277251,
+ "memoryUsed": 7353634816,
+ "memoryFree": 60073910272,
+ "memoryUsagePercent": 10.905980347353204,
+ "memoryEfficiency": 89.0940196526468,
"cpuCount": 16,
- "cpuLoad": 0.115625,
+ "cpuLoad": 0.095,
"platform": "linux",
- "uptime": 14595.55
+ "uptime": 14575.86
},
{
- "timestamp": 1758230984811,
+ "timestamp": 1758230965094,
"memoryTotal": 67427545088,
- "memoryUsed": 7406137344,
- "memoryFree": 60021407744,
- "memoryUsagePercent": 10.983845451193893,
- "memoryEfficiency": 89.0161545488061,
+ "memoryUsed": 7480520704,
+ "memoryFree": 59947024384,
+ "memoryUsagePercent": 11.094161435415064,
+ "memoryEfficiency": 88.90583856458494,
"cpuCount": 16,
- "cpuLoad": 0.136875,
+ "cpuLoad": 0.1175,
+ "platform": "linux",
+ "uptime": 14605.87
+ },
+ {
+ "timestamp": 1758230995125,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7436541952,
+ "memoryFree": 59991003136,
+ "memoryUsagePercent": 11.028937717211171,
+ "memoryEfficiency": 88.97106228278884,
+ "cpuCount": 16,
+ "cpuLoad": 0.17375,
+ "platform": "linux",
+ "uptime": 14635.9
+ },
+ {
+ "timestamp": 1758231025148,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7411924992,
+ "memoryFree": 60015620096,
+ "memoryUsagePercent": 10.99242895811595,
+ "memoryEfficiency": 89.00757104188405,
+ "cpuCount": 16,
+ "cpuLoad": 0.2175,
"platform": "linux",
- "uptime": 14625.58
+ "uptime": 14665.92
},
{
- "timestamp": 1758231014824,
+ "timestamp": 1758231055177,
"memoryTotal": 67427545088,
- "memoryUsed": 7469535232,
- "memoryFree": 59958009856,
- "memoryUsagePercent": 11.077869173868743,
- "memoryEfficiency": 88.92213082613125,
+ "memoryUsed": 7442452480,
+ "memoryFree": 59985092608,
+ "memoryUsagePercent": 11.037703464195264,
+ "memoryEfficiency": 88.96229653580474,
"cpuCount": 16,
"cpuLoad": 0.223125,
"platform": "linux",
- "uptime": 14655.6
+ "uptime": 14695.95
},
{
- "timestamp": 1758231044855,
+ "timestamp": 1758231085207,
"memoryTotal": 67427545088,
- "memoryUsed": 7536766976,
- "memoryFree": 59890778112,
- "memoryUsagePercent": 11.177578786479222,
- "memoryEfficiency": 88.82242121352078,
+ "memoryUsed": 7581892608,
+ "memoryFree": 59845652480,
+ "memoryUsagePercent": 11.244503411928815,
+ "memoryEfficiency": 88.75549658807118,
"cpuCount": 16,
- "cpuLoad": 0.235625,
+ "cpuLoad": 0.19625,
"platform": "linux",
- "uptime": 14685.63
+ "uptime": 14725.98
},
{
- "timestamp": 1758231074885,
+ "timestamp": 1758231115213,
"memoryTotal": 67427545088,
- "memoryUsed": 7629643776,
- "memoryFree": 59797901312,
- "memoryUsagePercent": 11.315321900037317,
- "memoryEfficiency": 88.68467809996268,
+ "memoryUsed": 7526850560,
+ "memoryFree": 59900694528,
+ "memoryUsagePercent": 11.162872013472644,
+ "memoryEfficiency": 88.83712798652735,
"cpuCount": 16,
- "cpuLoad": 0.204375,
+ "cpuLoad": 0.178125,
"platform": "linux",
- "uptime": 14715.66
+ "uptime": 14755.99
},
{
- "timestamp": 1758231104914,
+ "timestamp": 1758231145242,
"memoryTotal": 67427545088,
- "memoryUsed": 7624265728,
- "memoryFree": 59803279360,
- "memoryUsagePercent": 11.307345859988727,
- "memoryEfficiency": 88.69265414001127,
+ "memoryUsed": 7384403968,
+ "memoryFree": 60043141120,
+ "memoryUsagePercent": 10.951613258887862,
+ "memoryEfficiency": 89.04838674111214,
"cpuCount": 16,
- "cpuLoad": 0.199375,
+ "cpuLoad": 0.168125,
"platform": "linux",
- "uptime": 14745.69
+ "uptime": 14786.01
},
{
- "timestamp": 1758231134944,
+ "timestamp": 1758231175272,
"memoryTotal": 67427545088,
- "memoryUsed": 7471669248,
- "memoryFree": 59955875840,
- "memoryUsagePercent": 11.081034076279494,
- "memoryEfficiency": 88.9189659237205,
+ "memoryUsed": 7376166912,
+ "memoryFree": 60051378176,
+ "memoryUsagePercent": 10.93939710006249,
+ "memoryEfficiency": 89.0606028999375,
"cpuCount": 16,
- "cpuLoad": 0.153125,
+ "cpuLoad": 0.203125,
"platform": "linux",
- "uptime": 14775.72
+ "uptime": 14816.04
},
{
- "timestamp": 1758231164974,
+ "timestamp": 1758231205303,
"memoryTotal": 67427545088,
- "memoryUsed": 7345979392,
- "memoryFree": 60081565696,
- "memoryUsagePercent": 10.89462679148815,
- "memoryEfficiency": 89.10537320851185,
+ "memoryUsed": 7377928192,
+ "memoryFree": 60049616896,
+ "memoryUsagePercent": 10.942009207618387,
+ "memoryEfficiency": 89.05799079238162,
"cpuCount": 16,
- "cpuLoad": 0.205625,
+ "cpuLoad": 0.22,
"platform": "linux",
- "uptime": 14805.75
+ "uptime": 14846.08
},
{
- "timestamp": 1758231195004,
+ "timestamp": 1758231235332,
"memoryTotal": 67427545088,
- "memoryUsed": 7388233728,
- "memoryFree": 60039311360,
- "memoryUsagePercent": 10.957293074154757,
- "memoryEfficiency": 89.04270692584524,
+ "memoryUsed": 7498096640,
+ "memoryFree": 59929448448,
+ "memoryUsagePercent": 11.12022783895543,
+ "memoryEfficiency": 88.87977216104457,
"cpuCount": 16,
- "cpuLoad": 0.2325,
+ "cpuLoad": 0.261875,
"platform": "linux",
- "uptime": 14835.78
+ "uptime": 14876.1
},
{
- "timestamp": 1758231225033,
+ "timestamp": 1758231265363,
"memoryTotal": 67427545088,
- "memoryUsed": 7530659840,
- "memoryFree": 59896885248,
- "memoryUsagePercent": 11.168521455395863,
- "memoryEfficiency": 88.83147854460414,
+ "memoryUsed": 7426400256,
+ "memoryFree": 60001144832,
+ "memoryUsagePercent": 11.013896837424188,
+ "memoryEfficiency": 88.98610316257582,
"cpuCount": 16,
- "cpuLoad": 0.241875,
+ "cpuLoad": 0.19625,
"platform": "linux",
- "uptime": 14865.81
+ "uptime": 14906.14
},
{
- "timestamp": 1758231255064,
+ "timestamp": 1758231295394,
"memoryTotal": 67427545088,
- "memoryUsed": 7481987072,
- "memoryFree": 59945558016,
- "memoryUsagePercent": 11.096336166822066,
- "memoryEfficiency": 88.90366383317793,
+ "memoryUsed": 7447515136,
+ "memoryFree": 59980029952,
+ "memoryUsagePercent": 11.045211754751287,
+ "memoryEfficiency": 88.95478824524871,
"cpuCount": 16,
- "cpuLoad": 0.225625,
+ "cpuLoad": 0.14625,
"platform": "linux",
- "uptime": 14895.84
+ "uptime": 14936.17
},
{
- "timestamp": 1758231285074,
+ "timestamp": 1758231325399,
"memoryTotal": 67427545088,
- "memoryUsed": 7377215488,
- "memoryFree": 60050329600,
- "memoryUsagePercent": 10.940952215258559,
- "memoryEfficiency": 89.05904778474144,
+ "memoryUsed": 8197066752,
+ "memoryFree": 59230478336,
+ "memoryUsagePercent": 12.156851834516546,
+ "memoryEfficiency": 87.84314816548346,
"cpuCount": 16,
- "cpuLoad": 0.1675,
+ "cpuLoad": 0.164375,
"platform": "linux",
- "uptime": 14925.85
+ "uptime": 14966.17
},
{
- "timestamp": 1758231315091,
+ "timestamp": 1758231355429,
"memoryTotal": 67427545088,
- "memoryUsed": 7885107200,
- "memoryFree": 59542437888,
- "memoryUsagePercent": 11.694192914348447,
- "memoryEfficiency": 88.30580708565155,
+ "memoryUsed": 7671697408,
+ "memoryFree": 59755847680,
+ "memoryUsagePercent": 11.377690523935927,
+ "memoryEfficiency": 88.62230947606407,
"cpuCount": 16,
- "cpuLoad": 0.154375,
+ "cpuLoad": 0.144375,
"platform": "linux",
- "uptime": 14955.86
+ "uptime": 14996.2
},
{
- "timestamp": 1758231345122,
+ "timestamp": 1758231385458,
"memoryTotal": 67427545088,
- "memoryUsed": 7445659648,
- "memoryFree": 59981885440,
- "memoryUsagePercent": 11.042459929814493,
- "memoryEfficiency": 88.9575400701855,
+ "memoryUsed": 7517634560,
+ "memoryFree": 59909910528,
+ "memoryUsagePercent": 11.149204008819689,
+ "memoryEfficiency": 88.8507959911803,
"cpuCount": 16,
- "cpuLoad": 0.159375,
+ "cpuLoad": 0.1075,
"platform": "linux",
- "uptime": 14985.89
+ "uptime": 15026.23
},
{
- "timestamp": 1758231375151,
+ "timestamp": 1758231415487,
"memoryTotal": 67427545088,
- "memoryUsed": 7687614464,
- "memoryFree": 59739930624,
- "memoryUsagePercent": 11.401296686638759,
- "memoryEfficiency": 88.59870331336124,
+ "memoryUsed": 7366623232,
+ "memoryFree": 60060921856,
+ "memoryUsagePercent": 10.925243121910764,
+ "memoryEfficiency": 89.07475687808923,
"cpuCount": 16,
- "cpuLoad": 0.12125,
+ "cpuLoad": 0.110625,
"platform": "linux",
- "uptime": 15015.92
+ "uptime": 15056.26
},
{
- "timestamp": 1758231405180,
+ "timestamp": 1758231445518,
"memoryTotal": 67427545088,
- "memoryUsed": 7441285120,
- "memoryFree": 59986259968,
- "memoryUsagePercent": 11.03597218360589,
- "memoryEfficiency": 88.96402781639411,
+ "memoryUsed": 7281668096,
+ "memoryFree": 60145876992,
+ "memoryUsagePercent": 10.799248417685476,
+ "memoryEfficiency": 89.20075158231452,
"cpuCount": 16,
- "cpuLoad": 0.0925,
+ "cpuLoad": 0.07875,
"platform": "linux",
- "uptime": 15045.95
+ "uptime": 15086.29
},
{
- "timestamp": 1758231435210,
+ "timestamp": 1758231475548,
"memoryTotal": 67427545088,
- "memoryUsed": 7264190464,
- "memoryFree": 60163354624,
- "memoryUsagePercent": 10.773327806194741,
- "memoryEfficiency": 89.22667219380526,
+ "memoryUsed": 7702212608,
+ "memoryFree": 59725332480,
+ "memoryUsagePercent": 11.422946806009037,
+ "memoryEfficiency": 88.57705319399096,
"cpuCount": 16,
- "cpuLoad": 0.093125,
+ "cpuLoad": 0.08875,
"platform": "linux",
- "uptime": 15075.98
+ "uptime": 15116.32
},
{
- "timestamp": 1758231465240,
+ "timestamp": 1758231505574,
"memoryTotal": 67427545088,
- "memoryUsed": 7525048320,
- "memoryFree": 59902496768,
- "memoryUsagePercent": 11.160199159229398,
- "memoryEfficiency": 88.83980084077061,
+ "memoryUsed": 7250247680,
+ "memoryFree": 60177297408,
+ "memoryUsagePercent": 10.752649633822006,
+ "memoryEfficiency": 89.247350366178,
"cpuCount": 16,
- "cpuLoad": 0.07625,
+ "cpuLoad": 0.069375,
"platform": "linux",
- "uptime": 15106.01
+ "uptime": 15146.35
},
{
- "timestamp": 1758231495271,
+ "timestamp": 1758231535590,
"memoryTotal": 67427545088,
- "memoryUsed": 7262171136,
- "memoryFree": 60165373952,
- "memoryUsagePercent": 10.77033299450856,
- "memoryEfficiency": 89.22966700549144,
+ "memoryUsed": 7321690112,
+ "memoryFree": 60105854976,
+ "memoryUsagePercent": 10.8586040058917,
+ "memoryEfficiency": 89.14139599410831,
"cpuCount": 16,
- "cpuLoad": 0.081875,
+ "cpuLoad": 0.041875,
"platform": "linux",
- "uptime": 15136.04
+ "uptime": 15176.36
},
{
- "timestamp": 1758231525301,
+ "timestamp": 1758231565604,
"memoryTotal": 67427545088,
- "memoryUsed": 7318720512,
- "memoryFree": 60108824576,
- "memoryUsagePercent": 10.85419987105908,
- "memoryEfficiency": 89.14580012894092,
+ "memoryUsed": 7335395328,
+ "memoryFree": 60092149760,
+ "memoryUsagePercent": 10.878929847477824,
+ "memoryEfficiency": 89.12107015252218,
"cpuCount": 16,
- "cpuLoad": 0.049375,
+ "cpuLoad": 0.043125,
"platform": "linux",
- "uptime": 15166.07
+ "uptime": 15206.38
},
{
- "timestamp": 1758231555332,
+ "timestamp": 1758231595635,
"memoryTotal": 67427545088,
- "memoryUsed": 7368572928,
- "memoryFree": 60058972160,
- "memoryUsagePercent": 10.928134664228455,
- "memoryEfficiency": 89.07186533577155,
+ "memoryUsed": 7688638464,
+ "memoryFree": 59738906624,
+ "memoryUsagePercent": 11.40281535382242,
+ "memoryEfficiency": 88.59718464617758,
"cpuCount": 16,
- "cpuLoad": 0.05125,
+ "cpuLoad": 0.075,
"platform": "linux",
- "uptime": 15196.1
+ "uptime": 15236.41
},
{
- "timestamp": 1758231585363,
+ "timestamp": 1758231625665,
"memoryTotal": 67427545088,
- "memoryUsed": 7617269760,
- "memoryFree": 59810275328,
- "memoryUsagePercent": 11.296970325789951,
- "memoryEfficiency": 88.70302967421004,
+ "memoryUsed": 7846752256,
+ "memoryFree": 59580792832,
+ "memoryUsagePercent": 11.637309716317223,
+ "memoryEfficiency": 88.36269028368278,
"cpuCount": 16,
"cpuLoad": 0.083125,
"platform": "linux",
- "uptime": 15226.14
+ "uptime": 15266.44
},
{
- "timestamp": 1758231615392,
+ "timestamp": 1758231655695,
"memoryTotal": 67427545088,
- "memoryUsed": 7682969600,
- "memoryFree": 59744575488,
- "memoryUsagePercent": 11.394408012293672,
- "memoryEfficiency": 88.60559198770633,
+ "memoryUsed": 7479361536,
+ "memoryFree": 59948183552,
+ "memoryUsagePercent": 11.092442304163159,
+ "memoryEfficiency": 88.90755769583684,
"cpuCount": 16,
- "cpuLoad": 0.08125,
+ "cpuLoad": 0.06125,
"platform": "linux",
- "uptime": 15256.17
+ "uptime": 15296.47
},
{
- "timestamp": 1758231645404,
+ "timestamp": 1758231685725,
"memoryTotal": 67427545088,
- "memoryUsed": 7948492800,
- "memoryFree": 59479052288,
- "memoryUsagePercent": 11.78819841301709,
- "memoryEfficiency": 88.21180158698292,
+ "memoryUsed": 7450365952,
+ "memoryFree": 59977179136,
+ "memoryUsagePercent": 11.0494397241906,
+ "memoryEfficiency": 88.9505602758094,
"cpuCount": 16,
- "cpuLoad": 0.0725,
+ "cpuLoad": 0.07,
"platform": "linux",
- "uptime": 15286.18
+ "uptime": 15326.5
},
{
- "timestamp": 1758231675434,
+ "timestamp": 1758231715754,
"memoryTotal": 67427545088,
- "memoryUsed": 7816921088,
- "memoryFree": 59610624000,
- "memoryUsagePercent": 11.593067903922796,
- "memoryEfficiency": 88.4069320960772,
+ "memoryUsed": 7587790848,
+ "memoryFree": 59839754240,
+ "memoryUsagePercent": 11.253250934906706,
+ "memoryEfficiency": 88.7467490650933,
"cpuCount": 16,
- "cpuLoad": 0.065,
+ "cpuLoad": 0.066875,
"platform": "linux",
- "uptime": 15316.21
+ "uptime": 15356.53
},
{
- "timestamp": 1758231705438,
+ "timestamp": 1758231745785,
"memoryTotal": 67427545088,
- "memoryUsed": 7466983424,
- "memoryFree": 59960561664,
- "memoryUsagePercent": 11.07408465524706,
- "memoryEfficiency": 88.92591534475294,
+ "memoryUsed": 7314382848,
+ "memoryFree": 60113162240,
+ "memoryUsagePercent": 10.847766796869092,
+ "memoryEfficiency": 89.1522332031309,
"cpuCount": 16,
- "cpuLoad": 0.07875,
+ "cpuLoad": 0.045,
"platform": "linux",
- "uptime": 15346.21
+ "uptime": 15386.56
},
{
- "timestamp": 1758231735468,
+ "timestamp": 1758231775791,
"memoryTotal": 67427545088,
- "memoryUsed": 7320268800,
- "memoryFree": 60107276288,
- "memoryUsagePercent": 10.856496095840777,
- "memoryEfficiency": 89.14350390415922,
+ "memoryUsed": 7623626752,
+ "memoryFree": 59803918336,
+ "memoryUsagePercent": 11.30639821166612,
+ "memoryEfficiency": 88.69360178833388,
"cpuCount": 16,
- "cpuLoad": 0.048125,
+ "cpuLoad": 0.070625,
"platform": "linux",
- "uptime": 15376.24
+ "uptime": 15416.56
},
{
- "timestamp": 1758231765499,
+ "timestamp": 1758231805822,
"memoryTotal": 67427545088,
- "memoryUsed": 7548817408,
- "memoryFree": 59878727680,
- "memoryUsagePercent": 11.195450461896549,
- "memoryEfficiency": 88.80454953810346,
+ "memoryUsed": 7721734144,
+ "memoryFree": 59705810944,
+ "memoryUsagePercent": 11.451898677198361,
+ "memoryEfficiency": 88.54810132280164,
"cpuCount": 16,
- "cpuLoad": 0.050625,
+ "cpuLoad": 0.076875,
"platform": "linux",
- "uptime": 15406.27
+ "uptime": 15446.59
},
{
- "timestamp": 1758231795529,
+ "timestamp": 1758231835853,
"memoryTotal": 67427545088,
- "memoryUsed": 7759798272,
- "memoryFree": 59667746816,
- "memoryUsagePercent": 11.508350573749425,
- "memoryEfficiency": 88.49164942625058,
+ "memoryUsed": 7490547712,
+ "memoryFree": 59936997376,
+ "memoryUsagePercent": 11.109032224477476,
+ "memoryEfficiency": 88.89096777552253,
"cpuCount": 16,
- "cpuLoad": 0.0675,
+ "cpuLoad": 0.069375,
"platform": "linux",
- "uptime": 15436.3
+ "uptime": 15476.63
},
{
- "timestamp": 1758231825559,
+ "timestamp": 1758231865883,
"memoryTotal": 67427545088,
- "memoryUsed": 7559208960,
- "memoryFree": 59868336128,
- "memoryUsagePercent": 11.210861896476345,
- "memoryEfficiency": 88.78913810352365,
+ "memoryUsed": 7325335552,
+ "memoryFree": 60102209536,
+ "memoryUsagePercent": 10.864010461065535,
+ "memoryEfficiency": 89.13598953893447,
"cpuCount": 16,
- "cpuLoad": 0.081875,
+ "cpuLoad": 0.055,
"platform": "linux",
- "uptime": 15466.33
+ "uptime": 15506.66
},
{
- "timestamp": 1758231855589,
+ "timestamp": 1758231895887,
"memoryTotal": 67427545088,
- "memoryUsed": 7331041280,
- "memoryFree": 60096503808,
- "memoryUsagePercent": 10.872472474612897,
- "memoryEfficiency": 89.12752752538711,
+ "memoryUsed": 7322374144,
+ "memoryFree": 60105170944,
+ "memoryUsagePercent": 10.859618475570386,
+ "memoryEfficiency": 89.14038152442961,
"cpuCount": 16,
- "cpuLoad": 0.065,
+ "cpuLoad": 0.036875,
"platform": "linux",
- "uptime": 15496.36
+ "uptime": 15536.66
},
{
- "timestamp": 1758231885618,
+ "timestamp": 1758231925917,
"memoryTotal": 67427545088,
- "memoryUsed": 7340331008,
- "memoryFree": 60087214080,
- "memoryUsagePercent": 10.886249823303073,
- "memoryEfficiency": 89.11375017669693,
+ "memoryUsed": 7503347712,
+ "memoryFree": 59924197376,
+ "memoryUsagePercent": 11.128015564273246,
+ "memoryEfficiency": 88.87198443572676,
"cpuCount": 16,
- "cpuLoad": 0.04375,
+ "cpuLoad": 0.03,
"platform": "linux",
- "uptime": 15526.39
+ "uptime": 15566.69
},
{
- "timestamp": 1758231915649,
+ "timestamp": 1758231955932,
"memoryTotal": 67427545088,
- "memoryUsed": 7400484864,
- "memoryFree": 60027060224,
- "memoryUsagePercent": 10.975462408340082,
- "memoryEfficiency": 89.02453759165992,
+ "memoryUsed": 7640272896,
+ "memoryFree": 59787272192,
+ "memoryUsagePercent": 11.331085665403723,
+ "memoryEfficiency": 88.66891433459628,
"cpuCount": 16,
- "cpuLoad": 0.035625,
+ "cpuLoad": 0.0775,
"platform": "linux",
- "uptime": 15556.42
+ "uptime": 15596.71
},
{
- "timestamp": 1758231945680,
+ "timestamp": 1758231985958,
"memoryTotal": 67427545088,
- "memoryUsed": 7538466816,
- "memoryFree": 59889078272,
- "memoryUsagePercent": 11.180099774004098,
- "memoryEfficiency": 88.8199002259959,
+ "memoryUsed": 7333965824,
+ "memoryFree": 60093579264,
+ "memoryUsagePercent": 10.876809788089433,
+ "memoryEfficiency": 89.12319021191057,
"cpuCount": 16,
- "cpuLoad": 0.04625,
+ "cpuLoad": 0.065,
"platform": "linux",
- "uptime": 15586.45
+ "uptime": 15626.73
},
{
- "timestamp": 1758231975710,
+ "timestamp": 1758232015962,
"memoryTotal": 67427545088,
- "memoryUsed": 7567093760,
- "memoryFree": 59860451328,
- "memoryUsagePercent": 11.222555633790538,
- "memoryEfficiency": 88.77744436620947,
+ "memoryUsed": 7451541504,
+ "memoryFree": 59976003584,
+ "memoryUsagePercent": 11.051183154117444,
+ "memoryEfficiency": 88.94881684588256,
"cpuCount": 16,
- "cpuLoad": 0.071875,
+ "cpuLoad": 0.05875,
"platform": "linux",
- "uptime": 15616.48
+ "uptime": 15656.73
},
{
- "timestamp": 1758232005741,
+ "timestamp": 1758232045970,
"memoryTotal": 67427545088,
- "memoryUsed": 7366602752,
- "memoryFree": 60060942336,
- "memoryUsagePercent": 10.925212748567093,
- "memoryEfficiency": 89.07478725143291,
+ "memoryUsed": 7614074880,
+ "memoryFree": 59813470208,
+ "memoryUsagePercent": 11.292232084176927,
+ "memoryEfficiency": 88.70776791582307,
"cpuCount": 16,
- "cpuLoad": 0.07,
+ "cpuLoad": 0.058125,
"platform": "linux",
- "uptime": 15646.51
+ "uptime": 15686.74
},
{
- "timestamp": 1758232035770,
+ "timestamp": 1758232075999,
"memoryTotal": 67427545088,
- "memoryUsed": 7543406592,
- "memoryFree": 59884138496,
- "memoryUsagePercent": 11.187425824498082,
- "memoryEfficiency": 88.81257417550192,
+ "memoryUsed": 7536328704,
+ "memoryFree": 59891216384,
+ "memoryUsagePercent": 11.176928796924614,
+ "memoryEfficiency": 88.82307120307539,
"cpuCount": 16,
- "cpuLoad": 0.04625,
+ "cpuLoad": 0.0575,
"platform": "linux",
- "uptime": 15676.54
+ "uptime": 15716.77
},
{
- "timestamp": 1758232065775,
+ "timestamp": 1758232106030,
"memoryTotal": 67427545088,
- "memoryUsed": 7900696576,
- "memoryFree": 59526848512,
- "memoryUsagePercent": 11.717313103552508,
- "memoryEfficiency": 88.28268689644749,
+ "memoryUsed": 7689445376,
+ "memoryFree": 59738099712,
+ "memoryUsagePercent": 11.404012063563147,
+ "memoryEfficiency": 88.59598793643686,
"cpuCount": 16,
- "cpuLoad": 0.068125,
+ "cpuLoad": 0.060625,
"platform": "linux",
- "uptime": 15706.55
+ "uptime": 15746.8
},
{
- "timestamp": 1758232095805,
+ "timestamp": 1758232136060,
"memoryTotal": 67427545088,
- "memoryUsed": 7614971904,
- "memoryFree": 59812573184,
- "memoryUsagePercent": 11.293562436629816,
- "memoryEfficiency": 88.70643756337019,
+ "memoryUsed": 7777042432,
+ "memoryFree": 59650502656,
+ "memoryUsagePercent": 11.533924929122284,
+ "memoryEfficiency": 88.46607507087772,
"cpuCount": 16,
- "cpuLoad": 0.06625,
+ "cpuLoad": 0.059375,
"platform": "linux",
- "uptime": 15736.58
+ "uptime": 15776.83
},
{
- "timestamp": 1758232125836,
+ "timestamp": 1758232166090,
"memoryTotal": 67427545088,
- "memoryUsed": 7504867328,
- "memoryFree": 59922677760,
- "memoryUsagePercent": 11.1302692663738,
- "memoryEfficiency": 88.8697307336262,
+ "memoryUsed": 7547248640,
+ "memoryFree": 59880296448,
+ "memoryUsagePercent": 11.19312386377118,
+ "memoryEfficiency": 88.80687613622882,
"cpuCount": 16,
- "cpuLoad": 0.048125,
+ "cpuLoad": 0.059375,
"platform": "linux",
- "uptime": 15766.61
+ "uptime": 15806.86
},
{
- "timestamp": 1758232155866,
+ "timestamp": 1758232196119,
"memoryTotal": 67427545088,
- "memoryUsed": 7554207744,
- "memoryFree": 59873337344,
- "memoryUsagePercent": 11.203444725951343,
- "memoryEfficiency": 88.79655527404866,
+ "memoryUsed": 7628898304,
+ "memoryFree": 59798646784,
+ "memoryUsagePercent": 11.31421631032761,
+ "memoryEfficiency": 88.68578368967239,
"cpuCount": 16,
- "cpuLoad": 0.065,
+ "cpuLoad": 0.06375,
"platform": "linux",
- "uptime": 15796.64
+ "uptime": 15836.89
},
{
- "timestamp": 1758232185868,
+ "timestamp": 1758232226135,
"memoryTotal": 67427545088,
- "memoryUsed": 7536300032,
- "memoryFree": 59891245056,
- "memoryUsagePercent": 11.17688627424347,
- "memoryEfficiency": 88.82311372575653,
+ "memoryUsed": 7673679872,
+ "memoryFree": 59753865216,
+ "memoryUsagePercent": 11.380630663603494,
+ "memoryEfficiency": 88.6193693363965,
"cpuCount": 16,
- "cpuLoad": 0.064375,
+ "cpuLoad": 0.0775,
"platform": "linux",
- "uptime": 15826.64
+ "uptime": 15866.91
},
{
- "timestamp": 1758232215897,
+ "timestamp": 1758232256146,
"memoryTotal": 67427545088,
- "memoryUsed": 7931576320,
- "memoryFree": 59495968768,
- "memoryUsagePercent": 11.763110031143004,
- "memoryEfficiency": 88.236889968857,
+ "memoryUsed": 7895048192,
+ "memoryFree": 59532496896,
+ "memoryUsagePercent": 11.70893613536743,
+ "memoryEfficiency": 88.29106386463258,
"cpuCount": 16,
"cpuLoad": 0.0675,
"platform": "linux",
- "uptime": 15856.67
+ "uptime": 15896.92
},
{
- "timestamp": 1758232245898,
+ "timestamp": 1758232286176,
"memoryTotal": 67427545088,
- "memoryUsed": 7716003840,
- "memoryFree": 59711541248,
- "memoryUsagePercent": 11.443400215638592,
- "memoryEfficiency": 88.55659978436141,
+ "memoryUsed": 7737446400,
+ "memoryFree": 59690098688,
+ "memoryUsagePercent": 11.475201106464462,
+ "memoryEfficiency": 88.52479889353553,
"cpuCount": 16,
- "cpuLoad": 0.07375,
+ "cpuLoad": 0.059375,
"platform": "linux",
- "uptime": 15886.67
+ "uptime": 15926.95
},
{
- "timestamp": 1758232275929,
+ "timestamp": 1758232316199,
"memoryTotal": 67427545088,
- "memoryUsed": 7652319232,
- "memoryFree": 59775225856,
- "memoryUsagePercent": 11.348951266152318,
- "memoryEfficiency": 88.65104873384769,
+ "memoryUsed": 7688511488,
+ "memoryFree": 59739033600,
+ "memoryUsagePercent": 11.402627039091648,
+ "memoryEfficiency": 88.59737296090836,
"cpuCount": 16,
- "cpuLoad": 0.070625,
+ "cpuLoad": 0.08375,
"platform": "linux",
- "uptime": 15916.7
+ "uptime": 15956.97
},
{
- "timestamp": 1758232305960,
+ "timestamp": 1758232346229,
"memoryTotal": 67427545088,
- "memoryUsed": 7464624128,
- "memoryFree": 59962920960,
- "memoryUsagePercent": 11.070585646055903,
- "memoryEfficiency": 88.9294143539441,
+ "memoryUsed": 7409164288,
+ "memoryFree": 60018380800,
+ "memoryUsagePercent": 10.988334631388797,
+ "memoryEfficiency": 89.0116653686112,
"cpuCount": 16,
- "cpuLoad": 0.060625,
+ "cpuLoad": 0.050625,
"platform": "linux",
- "uptime": 15946.73
+ "uptime": 15987
},
{
- "timestamp": 1758232335991,
+ "timestamp": 1758232376260,
"memoryTotal": 67427545088,
- "memoryUsed": 7458652160,
- "memoryFree": 59968892928,
- "memoryUsagePercent": 11.061728779040788,
- "memoryEfficiency": 88.93827122095921,
+ "memoryUsed": 7438336000,
+ "memoryFree": 59989209088,
+ "memoryUsagePercent": 11.031598422116945,
+ "memoryEfficiency": 88.96840157788306,
"cpuCount": 16,
- "cpuLoad": 0.06,
+ "cpuLoad": 0.035,
"platform": "linux",
- "uptime": 15976.76
+ "uptime": 16017.03
},
{
- "timestamp": 1758232366020,
+ "timestamp": 1758232406290,
"memoryTotal": 67427545088,
- "memoryUsed": 7415410688,
- "memoryFree": 60012134400,
- "memoryUsagePercent": 10.997598501209133,
- "memoryEfficiency": 89.00240149879087,
+ "memoryUsed": 7535718400,
+ "memoryFree": 59891826688,
+ "memoryUsagePercent": 11.17602367128315,
+ "memoryEfficiency": 88.82397632871685,
"cpuCount": 16,
- "cpuLoad": 0.03625,
+ "cpuLoad": 0.03375,
"platform": "linux",
- "uptime": 16006.79
+ "uptime": 16047.06
},
{
- "timestamp": 1758232396040,
+ "timestamp": 1758232436320,
"memoryTotal": 67427545088,
- "memoryUsed": 7614406656,
- "memoryFree": 59813138432,
- "memoryUsagePercent": 11.292724132344434,
- "memoryEfficiency": 88.70727586765557,
+ "memoryUsed": 7768055808,
+ "memoryFree": 59659489280,
+ "memoryUsagePercent": 11.52059710591847,
+ "memoryEfficiency": 88.47940289408153,
"cpuCount": 16,
- "cpuLoad": 0.034375,
+ "cpuLoad": 0.050625,
"platform": "linux",
- "uptime": 16036.81
+ "uptime": 16077.09
},
{
- "timestamp": 1758232426069,
+ "timestamp": 1758232466338,
"memoryTotal": 67427545088,
- "memoryUsed": 7520067584,
- "memoryFree": 59907477504,
- "memoryUsagePercent": 11.15281236204807,
- "memoryEfficiency": 88.84718763795193,
+ "memoryUsed": 7740424192,
+ "memoryFree": 59687120896,
+ "memoryUsagePercent": 11.47961739063455,
+ "memoryEfficiency": 88.52038260936546,
"cpuCount": 16,
- "cpuLoad": 0.048125,
+ "cpuLoad": 0.0575,
"platform": "linux",
- "uptime": 16066.84
+ "uptime": 16107.11
},
{
- "timestamp": 1758232456097,
+ "timestamp": 1758232496360,
"memoryTotal": 67427545088,
- "memoryUsed": 7755902976,
- "memoryFree": 59671642112,
- "memoryUsagePercent": 11.502573563782777,
- "memoryEfficiency": 88.49742643621722,
+ "memoryUsed": 7781138432,
+ "memoryFree": 59646406656,
+ "memoryUsagePercent": 11.53999959785693,
+ "memoryEfficiency": 88.46000040214307,
"cpuCount": 16,
- "cpuLoad": 0.045,
+ "cpuLoad": 0.059375,
"platform": "linux",
- "uptime": 16096.87
+ "uptime": 16137.13
},
{
- "timestamp": 1758232486118,
+ "timestamp": 1758232526361,
"memoryTotal": 67427545088,
- "memoryUsed": 7853498368,
- "memoryFree": 59574046720,
- "memoryUsagePercent": 11.647314695723184,
- "memoryEfficiency": 88.35268530427682,
+ "memoryUsed": 7973470208,
+ "memoryFree": 59454074880,
+ "memoryUsagePercent": 11.825241742960962,
+ "memoryEfficiency": 88.17475825703903,
"cpuCount": 16,
- "cpuLoad": 0.064375,
+ "cpuLoad": 0.061875,
"platform": "linux",
- "uptime": 16126.89
+ "uptime": 16167.13
},
{
- "timestamp": 1758232516119,
+ "timestamp": 1758232556390,
"memoryTotal": 67427545088,
- "memoryUsed": 7834550272,
- "memoryFree": 59592994816,
- "memoryUsagePercent": 11.619213278156712,
- "memoryEfficiency": 88.3807867218433,
+ "memoryUsed": 7842623488,
+ "memoryFree": 59584921600,
+ "memoryUsagePercent": 11.631186450232699,
+ "memoryEfficiency": 88.3688135497673,
"cpuCount": 16,
- "cpuLoad": 0.0725,
+ "cpuLoad": 0.0675,
"platform": "linux",
- "uptime": 16156.89
+ "uptime": 16197.16
},
{
- "timestamp": 1758232546150,
+ "timestamp": 1758232586421,
"memoryTotal": 67427545088,
- "memoryUsed": 8040235008,
- "memoryFree": 59387310080,
- "memoryUsagePercent": 11.924258843335691,
- "memoryEfficiency": 88.07574115666431,
+ "memoryUsed": 7858171904,
+ "memoryFree": 59569373184,
+ "memoryUsagePercent": 11.654245892749415,
+ "memoryEfficiency": 88.34575410725058,
"cpuCount": 16,
- "cpuLoad": 0.08,
+ "cpuLoad": 0.045,
"platform": "linux",
- "uptime": 16186.92
+ "uptime": 16227.19
},
{
- "timestamp": 1758232576181,
+ "timestamp": 1758232616452,
"memoryTotal": 67427545088,
- "memoryUsed": 7877771264,
- "memoryFree": 59549773824,
- "memoryUsagePercent": 11.683313182644696,
- "memoryEfficiency": 88.3166868173553,
+ "memoryUsed": 8173391872,
+ "memoryFree": 59254153216,
+ "memoryUsagePercent": 12.121740249230294,
+ "memoryEfficiency": 87.8782597507697,
"cpuCount": 16,
- "cpuLoad": 0.053125,
+ "cpuLoad": 0.064375,
"platform": "linux",
- "uptime": 16216.95
+ "uptime": 16257.22
},
{
- "timestamp": 1758232606212,
+ "timestamp": 1758232646454,
"memoryTotal": 67427545088,
- "memoryUsed": 7926243328,
- "memoryFree": 59501301760,
- "memoryUsagePercent": 11.755200812450495,
- "memoryEfficiency": 88.2447991875495,
+ "memoryUsed": 8235634688,
+ "memoryFree": 59191910400,
+ "memoryUsagePercent": 12.214050915321973,
+ "memoryEfficiency": 87.78594908467802,
"cpuCount": 16,
- "cpuLoad": 0.03625,
+ "cpuLoad": 0.0725,
"platform": "linux",
- "uptime": 16246.98
+ "uptime": 16287.23
},
{
- "timestamp": 1758232636241,
+ "timestamp": 1758232676484,
"memoryTotal": 67427545088,
- "memoryUsed": 8067973120,
- "memoryFree": 59359571968,
- "memoryUsagePercent": 11.965396500006714,
- "memoryEfficiency": 88.03460349999328,
+ "memoryUsed": 8018743296,
+ "memoryFree": 59408801792,
+ "memoryUsagePercent": 11.892385056485004,
+ "memoryEfficiency": 88.10761494351499,
"cpuCount": 16,
- "cpuLoad": 0.07375,
+ "cpuLoad": 0.0525,
"platform": "linux",
- "uptime": 16277.01
+ "uptime": 16317.26
},
{
- "timestamp": 1758232666243,
+ "timestamp": 1758232706514,
"memoryTotal": 67427545088,
- "memoryUsed": 7985397760,
- "memoryFree": 59442147328,
- "memoryUsagePercent": 11.842931178316253,
- "memoryEfficiency": 88.15706882168375,
+ "memoryUsed": 8655310848,
+ "memoryFree": 58772234240,
+ "memoryUsagePercent": 12.836461473873792,
+ "memoryEfficiency": 87.1635385261262,
"cpuCount": 16,
- "cpuLoad": 0.056875,
+ "cpuLoad": 0.083125,
"platform": "linux",
- "uptime": 16307.02
+ "uptime": 16347.29
},
{
- "timestamp": 1758232696255,
+ "timestamp": 1758232736544,
"memoryTotal": 67427545088,
- "memoryUsed": 8280104960,
- "memoryFree": 59147440128,
- "memoryUsagePercent": 12.280003593774023,
- "memoryEfficiency": 87.71999640622597,
+ "memoryUsed": 8068476928,
+ "memoryFree": 59359068160,
+ "memoryUsagePercent": 11.966143684261073,
+ "memoryEfficiency": 88.03385631573893,
"cpuCount": 16,
- "cpuLoad": 0.086875,
+ "cpuLoad": 0.070625,
"platform": "linux",
- "uptime": 16337.03
+ "uptime": 16377.32
},
{
- "timestamp": 1758232726285,
+ "timestamp": 1758232766576,
"memoryTotal": 67427545088,
- "memoryUsed": 8088604672,
- "memoryFree": 59338940416,
- "memoryUsagePercent": 11.995994606423125,
- "memoryEfficiency": 88.00400539357688,
+ "memoryUsed": 8208232448,
+ "memoryFree": 59219312640,
+ "memoryUsagePercent": 12.173411381487192,
+ "memoryEfficiency": 87.8265886185128,
"cpuCount": 16,
- "cpuLoad": 0.0725,
+ "cpuLoad": 0.0675,
"platform": "linux",
- "uptime": 16367.06
+ "uptime": 16407.35
},
{
- "timestamp": 1758232756299,
+ "timestamp": 1758232796590,
"memoryTotal": 67427545088,
- "memoryUsed": 8493424640,
- "memoryFree": 58934120448,
- "memoryUsagePercent": 12.596372341474382,
- "memoryEfficiency": 87.40362765852562,
+ "memoryUsed": 8040525824,
+ "memoryFree": 59387019264,
+ "memoryUsagePercent": 11.92469014481585,
+ "memoryEfficiency": 88.07530985518414,
"cpuCount": 16,
- "cpuLoad": 0.07375,
+ "cpuLoad": 0.07625,
"platform": "linux",
- "uptime": 16397.07
+ "uptime": 16437.36
},
{
- "timestamp": 1758232786318,
+ "timestamp": 1758232826621,
"memoryTotal": 67427545088,
- "memoryUsed": 8467062784,
- "memoryFree": 58960482304,
- "memoryUsagePercent": 12.5572757734982,
- "memoryEfficiency": 87.4427242265018,
+ "memoryUsed": 8240144384,
+ "memoryFree": 59187400704,
+ "memoryUsagePercent": 12.220739125598818,
+ "memoryEfficiency": 87.77926087440119,
"cpuCount": 16,
- "cpuLoad": 0.073125,
+ "cpuLoad": 0.088125,
"platform": "linux",
- "uptime": 16427.09
+ "uptime": 16467.39
},
{
- "timestamp": 1758232816349,
+ "timestamp": 1758232856651,
"memoryTotal": 67427545088,
- "memoryUsed": 8149405696,
- "memoryFree": 59278139392,
- "memoryUsagePercent": 12.086166989120208,
- "memoryEfficiency": 87.91383301087978,
+ "memoryUsed": 7775305728,
+ "memoryFree": 59652239360,
+ "memoryUsagePercent": 11.531349269578794,
+ "memoryEfficiency": 88.4686507304212,
"cpuCount": 16,
- "cpuLoad": 0.0925,
+ "cpuLoad": 0.053125,
"platform": "linux",
- "uptime": 16457.12
+ "uptime": 16497.42
},
{
- "timestamp": 1758232846379,
+ "timestamp": 1758232886681,
"memoryTotal": 67427545088,
- "memoryUsed": 7981182976,
- "memoryFree": 59446362112,
- "memoryUsagePercent": 11.8366803441883,
- "memoryEfficiency": 88.1633196558117,
+ "memoryUsed": 7799033856,
+ "memoryFree": 59628511232,
+ "memoryUsagePercent": 11.566539825558596,
+ "memoryEfficiency": 88.43346017444141,
"cpuCount": 16,
- "cpuLoad": 0.063125,
+ "cpuLoad": 0.0325,
"platform": "linux",
- "uptime": 16487.15
+ "uptime": 16527.45
},
{
- "timestamp": 1758232876410,
+ "timestamp": 1758232916710,
"memoryTotal": 67427545088,
- "memoryUsed": 7790395392,
- "memoryFree": 59637149696,
- "memoryUsagePercent": 11.55372834919723,
- "memoryEfficiency": 88.44627165080277,
+ "memoryUsed": 7846592512,
+ "memoryFree": 59580952576,
+ "memoryUsagePercent": 11.637072804236572,
+ "memoryEfficiency": 88.36292719576343,
"cpuCount": 16,
- "cpuLoad": 0.038125,
+ "cpuLoad": 0.024375,
+ "platform": "linux",
+ "uptime": 16557.48
+ },
+ {
+ "timestamp": 1758232946741,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7872827392,
+ "memoryFree": 59554717696,
+ "memoryUsagePercent": 11.675981057481978,
+ "memoryEfficiency": 88.32401894251802,
+ "cpuCount": 16,
+ "cpuLoad": 0.014375,
"platform": "linux",
- "uptime": 16517.18
+ "uptime": 16587.51
},
{
- "timestamp": 1758232906416,
+ "timestamp": 1758232976744,
"memoryTotal": 67427545088,
- "memoryUsed": 7838167040,
- "memoryFree": 59589378048,
- "memoryUsagePercent": 11.624577210649404,
- "memoryEfficiency": 88.3754227893506,
+ "memoryUsed": 8084140032,
+ "memoryFree": 59343405056,
+ "memoryUsagePercent": 11.98937321750236,
+ "memoryEfficiency": 88.01062678249764,
"cpuCount": 16,
"cpuLoad": 0.023125,
"platform": "linux",
- "uptime": 16547.19
+ "uptime": 16617.52
},
{
- "timestamp": 1758232936421,
+ "timestamp": 1758233006775,
"memoryTotal": 67427545088,
- "memoryUsed": 7882293248,
- "memoryFree": 59545251840,
- "memoryUsagePercent": 11.690019616927746,
- "memoryEfficiency": 88.30998038307226,
+ "memoryUsed": 8021618688,
+ "memoryFree": 59405926400,
+ "memoryUsagePercent": 11.896649473936725,
+ "memoryEfficiency": 88.10335052606328,
"cpuCount": 16,
- "cpuLoad": 0.016875,
+ "cpuLoad": 0.0725,
"platform": "linux",
- "uptime": 16577.19
+ "uptime": 16647.55
},
{
- "timestamp": 1758232966422,
+ "timestamp": 1758233036804,
"memoryTotal": 67427545088,
- "memoryUsed": 7918931968,
- "memoryFree": 59508613120,
- "memoryUsagePercent": 11.744357528759153,
- "memoryEfficiency": 88.25564247124085,
+ "memoryUsed": 8128712704,
+ "memoryFree": 59298832384,
+ "memoryUsagePercent": 12.055477762672776,
+ "memoryEfficiency": 87.94452223732722,
"cpuCount": 16,
- "cpuLoad": 0.015625,
+ "cpuLoad": 0.0775,
"platform": "linux",
- "uptime": 16607.19
+ "uptime": 16677.58
},
{
- "timestamp": 1758232996453,
+ "timestamp": 1758233066834,
"memoryTotal": 67427545088,
- "memoryUsed": 8120905728,
- "memoryFree": 59306639360,
- "memoryUsagePercent": 12.043899444064541,
- "memoryEfficiency": 87.95610055593546,
+ "memoryUsed": 7860219904,
+ "memoryFree": 59567325184,
+ "memoryUsagePercent": 11.657283227116737,
+ "memoryEfficiency": 88.34271677288326,
"cpuCount": 16,
- "cpuLoad": 0.063125,
+ "cpuLoad": 0.046875,
"platform": "linux",
- "uptime": 16637.23
+ "uptime": 16707.61
},
{
- "timestamp": 1758233026483,
+ "timestamp": 1758233096865,
"memoryTotal": 67427545088,
- "memoryUsed": 8099360768,
- "memoryFree": 59328184320,
- "memoryUsagePercent": 12.011946686520304,
- "memoryEfficiency": 87.9880533134797,
+ "memoryUsed": 7881637888,
+ "memoryFree": 59545907200,
+ "memoryUsagePercent": 11.6890476699302,
+ "memoryEfficiency": 88.3109523300698,
"cpuCount": 16,
- "cpuLoad": 0.08125,
+ "cpuLoad": 0.028125,
"platform": "linux",
- "uptime": 16667.26
+ "uptime": 16737.64
},
{
- "timestamp": 1758233056514,
+ "timestamp": 1758233126895,
"memoryTotal": 67427545088,
- "memoryUsed": 7887757312,
- "memoryFree": 59539787776,
- "memoryUsagePercent": 11.698123225019764,
- "memoryEfficiency": 88.30187677498023,
+ "memoryUsed": 7910359040,
+ "memoryFree": 59517186048,
+ "memoryUsagePercent": 11.731643247097539,
+ "memoryEfficiency": 88.26835675290246,
"cpuCount": 16,
- "cpuLoad": 0.055625,
+ "cpuLoad": 0.035625,
"platform": "linux",
- "uptime": 16697.29
+ "uptime": 16767.67
},
{
- "timestamp": 1758233086544,
+ "timestamp": 1758233156925,
"memoryTotal": 67427545088,
- "memoryUsed": 7893848064,
- "memoryFree": 59533697024,
- "memoryUsagePercent": 11.707156257428181,
- "memoryEfficiency": 88.29284374257182,
+ "memoryUsed": 7908876288,
+ "memoryFree": 59518668800,
+ "memoryUsagePercent": 11.729444217015597,
+ "memoryEfficiency": 88.2705557829844,
"cpuCount": 16,
- "cpuLoad": 0.03375,
+ "cpuLoad": 0.02625,
"platform": "linux",
- "uptime": 16727.32
+ "uptime": 16797.7
},
{
- "timestamp": 1758233116558,
+ "timestamp": 1758233186955,
"memoryTotal": 67427545088,
- "memoryUsed": 7893700608,
- "memoryFree": 59533844480,
- "memoryUsagePercent": 11.706937569353734,
- "memoryEfficiency": 88.29306243064627,
+ "memoryUsed": 7921995776,
+ "memoryFree": 59505549312,
+ "memoryUsagePercent": 11.748901380972669,
+ "memoryEfficiency": 88.25109861902733,
"cpuCount": 16,
- "cpuLoad": 0.030625,
+ "cpuLoad": 0.020625,
"platform": "linux",
- "uptime": 16757.33
+ "uptime": 16827.73
},
{
- "timestamp": 1758233146581,
+ "timestamp": 1758233216987,
"memoryTotal": 67427545088,
- "memoryUsed": 7927975936,
- "memoryFree": 59499569152,
- "memoryUsagePercent": 11.757770397325249,
- "memoryEfficiency": 88.24222960267475,
+ "memoryUsed": 7943860224,
+ "memoryFree": 59483684864,
+ "memoryUsagePercent": 11.781327962678208,
+ "memoryEfficiency": 88.2186720373218,
"cpuCount": 16,
- "cpuLoad": 0.025625,
+ "cpuLoad": 0.0625,
"platform": "linux",
- "uptime": 16787.35
+ "uptime": 16857.76
},
{
- "timestamp": 1758233176611,
+ "timestamp": 1758233247017,
"memoryTotal": 67427545088,
- "memoryUsed": 7915749376,
- "memoryFree": 59511795712,
- "memoryUsagePercent": 11.739637511152333,
- "memoryEfficiency": 88.26036248884766,
+ "memoryUsed": 7949058048,
+ "memoryFree": 59478487040,
+ "memoryUsagePercent": 11.789036717302473,
+ "memoryEfficiency": 88.21096328269752,
"cpuCount": 16,
- "cpuLoad": 0.01875,
+ "cpuLoad": 0.05625,
"platform": "linux",
- "uptime": 16817.38
+ "uptime": 16887.79
},
{
- "timestamp": 1758233206642,
+ "timestamp": 1758233277047,
"memoryTotal": 67427545088,
- "memoryUsed": 7910223872,
- "memoryFree": 59517321216,
- "memoryUsagePercent": 11.731442783029296,
- "memoryEfficiency": 88.2685572169707,
+ "memoryUsed": 8041099264,
+ "memoryFree": 59386445824,
+ "memoryUsagePercent": 11.925540598438701,
+ "memoryEfficiency": 88.0744594015613,
"cpuCount": 16,
- "cpuLoad": 0.014375,
+ "cpuLoad": 0.04875,
"platform": "linux",
- "uptime": 16847.41
+ "uptime": 16917.82
},
{
- "timestamp": 1758233236673,
+ "timestamp": 1758233307056,
"memoryTotal": 67427545088,
- "memoryUsed": 7916040192,
- "memoryFree": 59511504896,
- "memoryUsagePercent": 11.740068812632492,
- "memoryEfficiency": 88.25993118736751,
+ "memoryUsed": 8324014080,
+ "memoryFree": 59103531008,
+ "memoryUsagePercent": 12.345124042609427,
+ "memoryEfficiency": 87.65487595739057,
"cpuCount": 16,
- "cpuLoad": 0.06625,
+ "cpuLoad": 0.10125,
"platform": "linux",
- "uptime": 16877.45
+ "uptime": 16947.83
},
{
- "timestamp": 1758233266688,
+ "timestamp": 1758233337086,
"memoryTotal": 67427545088,
- "memoryUsed": 8006770688,
- "memoryFree": 59420774400,
- "memoryUsagePercent": 11.874628799773634,
- "memoryEfficiency": 88.12537120022637,
+ "memoryUsed": 8405757952,
+ "memoryFree": 59021787136,
+ "memoryUsagePercent": 12.466356206546756,
+ "memoryEfficiency": 87.53364379345325,
"cpuCount": 16,
- "cpuLoad": 0.04,
+ "cpuLoad": 0.09375,
"platform": "linux",
- "uptime": 16907.46
+ "uptime": 16977.86
},
{
- "timestamp": 1758233296719,
+ "timestamp": 1758233367096,
"memoryTotal": 67427545088,
- "memoryUsed": 8265867264,
- "memoryFree": 59161677824,
- "memoryUsagePercent": 12.258888045252395,
- "memoryEfficiency": 87.74111195474761,
+ "memoryUsed": 8105459712,
+ "memoryFree": 59322085376,
+ "memoryUsagePercent": 12.020991868266192,
+ "memoryEfficiency": 87.9790081317338,
"cpuCount": 16,
- "cpuLoad": 0.09125,
+ "cpuLoad": 0.074375,
"platform": "linux",
- "uptime": 16937.49
+ "uptime": 17007.87
},
{
- "timestamp": 1758233326749,
+ "timestamp": 1758233397100,
"memoryTotal": 67427545088,
- "memoryUsed": 8467554304,
- "memoryFree": 58959990784,
- "memoryUsagePercent": 12.558004733746358,
- "memoryEfficiency": 87.44199526625364,
+ "memoryUsed": 8385232896,
+ "memoryFree": 59042312192,
+ "memoryUsagePercent": 12.435916041517444,
+ "memoryEfficiency": 87.56408395848256,
"cpuCount": 16,
- "cpuLoad": 0.110625,
+ "cpuLoad": 0.06875,
"platform": "linux",
- "uptime": 16967.52
+ "uptime": 17037.87
},
{
- "timestamp": 1758233356778,
+ "timestamp": 1758233427131,
"memoryTotal": 67427545088,
- "memoryUsed": 8521666560,
- "memoryFree": 58905878528,
- "memoryUsagePercent": 12.638257182399764,
- "memoryEfficiency": 87.36174281760023,
+ "memoryUsed": 8806875136,
+ "memoryFree": 58620669952,
+ "memoryUsagePercent": 13.061242441061893,
+ "memoryEfficiency": 86.93875755893811,
"cpuCount": 16,
- "cpuLoad": 0.070625,
+ "cpuLoad": 0.0625,
"platform": "linux",
- "uptime": 16997.55
+ "uptime": 17067.9
},
{
- "timestamp": 1758233386809,
+ "timestamp": 1758233457160,
"memoryTotal": 67427545088,
- "memoryUsed": 8031432704,
- "memoryFree": 59396112384,
- "memoryUsagePercent": 11.911204380224936,
- "memoryEfficiency": 88.08879561977507,
+ "memoryUsed": 8271851520,
+ "memoryFree": 59155693568,
+ "memoryUsagePercent": 12.267763136273711,
+ "memoryEfficiency": 87.73223686372629,
"cpuCount": 16,
- "cpuLoad": 0.0575,
+ "cpuLoad": 0.08,
"platform": "linux",
- "uptime": 17027.58
+ "uptime": 17097.93
},
{
- "timestamp": 1758233416840,
+ "timestamp": 1758233487191,
"memoryTotal": 67427545088,
- "memoryUsed": 8671608832,
- "memoryFree": 58755936256,
- "memoryUsagePercent": 12.860632580768947,
- "memoryEfficiency": 87.13936741923105,
+ "memoryUsed": 8077778944,
+ "memoryFree": 59349766144,
+ "memoryUsagePercent": 11.979939256957454,
+ "memoryEfficiency": 88.02006074304255,
"cpuCount": 16,
- "cpuLoad": 0.056875,
+ "cpuLoad": 0.06875,
"platform": "linux",
- "uptime": 17057.61
+ "uptime": 17127.96
},
{
- "timestamp": 1758233446847,
+ "timestamp": 1758233517221,
"memoryTotal": 67427545088,
- "memoryUsed": 8227266560,
- "memoryFree": 59200278528,
- "memoryUsagePercent": 12.201640367097092,
- "memoryEfficiency": 87.7983596329029,
+ "memoryUsed": 8165769216,
+ "memoryFree": 59261775872,
+ "memoryUsagePercent": 12.110435290715117,
+ "memoryEfficiency": 87.88956470928488,
"cpuCount": 16,
- "cpuLoad": 0.0725,
+ "cpuLoad": 0.068125,
"platform": "linux",
- "uptime": 17087.62
+ "uptime": 17157.99
},
{
- "timestamp": 1758233476877,
+ "timestamp": 1758233547222,
"memoryTotal": 67427545088,
- "memoryUsed": 8227598336,
- "memoryFree": 59199946752,
- "memoryUsagePercent": 12.202132415264598,
- "memoryEfficiency": 87.7978675847354,
+ "memoryUsed": 8192532480,
+ "memoryFree": 59235012608,
+ "memoryUsagePercent": 12.150127176227295,
+ "memoryEfficiency": 87.8498728237727,
"cpuCount": 16,
- "cpuLoad": 0.075625,
+ "cpuLoad": 0.084375,
"platform": "linux",
- "uptime": 17117.65
+ "uptime": 17187.99
},
{
- "timestamp": 1758233506906,
+ "timestamp": 1758233577253,
"memoryTotal": 67427545088,
- "memoryUsed": 8371609600,
- "memoryFree": 59055935488,
- "memoryUsagePercent": 12.415711693306013,
- "memoryEfficiency": 87.58428830669399,
+ "memoryUsed": 8347840512,
+ "memoryFree": 59079704576,
+ "memoryUsagePercent": 12.380460390638863,
+ "memoryEfficiency": 87.61953960936114,
"cpuCount": 16,
- "cpuLoad": 0.063125,
+ "cpuLoad": 0.089375,
"platform": "linux",
- "uptime": 17147.68
+ "uptime": 17218.03
},
{
- "timestamp": 1758233536937,
+ "timestamp": 1758233607282,
"memoryTotal": 67427545088,
- "memoryUsed": 8170627072,
- "memoryFree": 59256918016,
- "memoryUsagePercent": 12.117639847834408,
- "memoryEfficiency": 87.88236015216559,
+ "memoryUsed": 8398303232,
+ "memoryFree": 59029241856,
+ "memoryUsagePercent": 12.4553003094497,
+ "memoryEfficiency": 87.5446996905503,
"cpuCount": 16,
- "cpuLoad": 0.088125,
+ "cpuLoad": 0.1,
"platform": "linux",
- "uptime": 17177.71
+ "uptime": 17248.06
},
{
- "timestamp": 1758233566967,
+ "timestamp": 1758233637313,
"memoryTotal": 67427545088,
- "memoryUsed": 8349077504,
- "memoryFree": 59078467584,
- "memoryUsagePercent": 12.382294940596726,
- "memoryEfficiency": 87.61770505940328,
+ "memoryUsed": 8302817280,
+ "memoryFree": 59124727808,
+ "memoryUsagePercent": 12.313687631907635,
+ "memoryEfficiency": 87.68631236809236,
"cpuCount": 16,
- "cpuLoad": 0.078125,
+ "cpuLoad": 0.131875,
"platform": "linux",
- "uptime": 17207.74
+ "uptime": 17278.09
},
{
- "timestamp": 1758233596997,
+ "timestamp": 1758233667326,
"memoryTotal": 67427545088,
- "memoryUsed": 8281710592,
- "memoryFree": 59145834496,
- "memoryUsagePercent": 12.282384863918004,
- "memoryEfficiency": 87.717615136082,
+ "memoryUsed": 8018161664,
+ "memoryFree": 59409383424,
+ "memoryUsagePercent": 11.891522453524683,
+ "memoryEfficiency": 88.10847754647531,
"cpuCount": 16,
- "cpuLoad": 0.095,
+ "cpuLoad": 0.084375,
"platform": "linux",
- "uptime": 17237.77
+ "uptime": 17308.1
},
{
- "timestamp": 1758233627026,
+ "timestamp": 1758233697357,
"memoryTotal": 67427545088,
- "memoryUsed": 8386920448,
- "memoryFree": 59040624640,
- "memoryUsagePercent": 12.43841880503612,
- "memoryEfficiency": 87.56158119496388,
+ "memoryUsed": 8187301888,
+ "memoryFree": 59240243200,
+ "memoryUsagePercent": 12.142369824253151,
+ "memoryEfficiency": 87.85763017574685,
"cpuCount": 16,
- "cpuLoad": 0.103125,
+ "cpuLoad": 0.05125,
"platform": "linux",
- "uptime": 17267.8
+ "uptime": 17338.13
},
{
- "timestamp": 1758233657057,
+ "timestamp": 1758233727361,
"memoryTotal": 67427545088,
- "memoryUsed": 8019759104,
- "memoryFree": 59407785984,
- "memoryUsagePercent": 11.893891574331196,
- "memoryEfficiency": 88.10610842566881,
+ "memoryUsed": 8133894144,
+ "memoryFree": 59293650944,
+ "memoryUsagePercent": 12.063162218622104,
+ "memoryEfficiency": 87.9368377813779,
"cpuCount": 16,
- "cpuLoad": 0.094375,
+ "cpuLoad": 0.045,
"platform": "linux",
- "uptime": 17297.83
+ "uptime": 17368.13
},
{
- "timestamp": 1758233687087,
+ "timestamp": 1758233757361,
"memoryTotal": 67427545088,
- "memoryUsed": 8070766592,
- "memoryFree": 59356778496,
- "memoryUsagePercent": 11.969539424083742,
- "memoryEfficiency": 88.03046057591627,
+ "memoryUsed": 8298524672,
+ "memoryFree": 59129020416,
+ "memoryUsagePercent": 12.307321379073725,
+ "memoryEfficiency": 87.69267862092627,
"cpuCount": 16,
- "cpuLoad": 0.060625,
+ "cpuLoad": 0.0675,
"platform": "linux",
- "uptime": 17327.86
+ "uptime": 17398.13
},
{
- "timestamp": 1758233717096,
+ "timestamp": 1758233787391,
"memoryTotal": 67427545088,
- "memoryUsed": 8135196672,
- "memoryFree": 59292348416,
- "memoryUsagePercent": 12.065093963279722,
- "memoryEfficiency": 87.93490603672028,
+ "memoryUsed": 7883137024,
+ "memoryFree": 59544408064,
+ "memoryUsagePercent": 11.691270998687083,
+ "memoryEfficiency": 88.30872900131291,
"cpuCount": 16,
- "cpuLoad": 0.053125,
+ "cpuLoad": 0.0625,
"platform": "linux",
- "uptime": 17357.87
+ "uptime": 17428.16
},
{
- "timestamp": 1758233747126,
+ "timestamp": 1758233817421,
"memoryTotal": 67427545088,
- "memoryUsed": 8141168640,
- "memoryFree": 59286376448,
- "memoryUsagePercent": 12.073950830294834,
- "memoryEfficiency": 87.92604916970517,
+ "memoryUsed": 8157728768,
+ "memoryFree": 59269816320,
+ "memoryUsagePercent": 12.098510715989008,
+ "memoryEfficiency": 87.90148928401099,
"cpuCount": 16,
- "cpuLoad": 0.05625,
+ "cpuLoad": 0.06125,
"platform": "linux",
- "uptime": 17387.9
+ "uptime": 17458.19
},
{
- "timestamp": 1758233777128,
+ "timestamp": 1758233847452,
"memoryTotal": 67427545088,
- "memoryUsed": 7919632384,
- "memoryFree": 59507912704,
- "memoryUsagePercent": 11.745396297112777,
- "memoryEfficiency": 88.25460370288722,
+ "memoryUsed": 8053886976,
+ "memoryFree": 59373658112,
+ "memoryUsagePercent": 11.944505714228265,
+ "memoryEfficiency": 88.05549428577173,
"cpuCount": 16,
- "cpuLoad": 0.074375,
+ "cpuLoad": 0.051875,
+ "platform": "linux",
+ "uptime": 17488.22
+ },
+ {
+ "timestamp": 1758233877457,
+ "memoryTotal": 67427545088,
+ "memoryUsed": 7968882688,
+ "memoryFree": 59458662400,
+ "memoryUsagePercent": 11.818438113978159,
+ "memoryEfficiency": 88.18156188602184,
+ "cpuCount": 16,
+ "cpuLoad": 0.038125,
"platform": "linux",
- "uptime": 17417.9
+ "uptime": 17518.23
}
]
\ No newline at end of file
diff --git a/.claude-flow/metrics/task-metrics.json b/.claude-flow/metrics/task-metrics.json
index 090301dde0..6aefaec389 100644
--- a/.claude-flow/metrics/task-metrics.json
+++ b/.claude-flow/metrics/task-metrics.json
@@ -1,10 +1,10 @@
[
{
- "id": "cmd-hooks-1758233775114",
+ "id": "cmd-hooks-1758233879878",
"type": "hooks",
"success": true,
- "duration": 23.15676000000002,
- "timestamp": 1758233775137,
+ "duration": 10.401032000000015,
+ "timestamp": 1758233879888,
"metadata": {}
}
]
\ No newline at end of file
diff --git a/.claude/checkpoints/task-1758233779.json b/.claude/checkpoints/task-1758233779.json
new file mode 100644
index 0000000000..78f3f32b94
--- /dev/null
+++ b/.claude/checkpoints/task-1758233779.json
@@ -0,0 +1 @@
+{"checkpoint": "task-20250918-221618", "task": "clean up the root folder ", "timestamp": "2025-09-18T22:16:19Z", "commit": "2b3c4a702bd8af309d24ad2af7a6bacb34cca2f4", "github_release": "true"}
diff --git a/agentic-flow/.claude-flow/metrics/agent-metrics.json b/agentic-flow/.claude-flow/metrics/agent-metrics.json
deleted file mode 100644
index 9e26dfeeb6..0000000000
--- a/agentic-flow/.claude-flow/metrics/agent-metrics.json
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/agentic-flow/.claude-flow/metrics/performance.json b/agentic-flow/.claude-flow/metrics/performance.json
deleted file mode 100644
index 91f162cd52..0000000000
--- a/agentic-flow/.claude-flow/metrics/performance.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-<<<<<<< Updated upstream
-<<<<<<< Updated upstream
-<<<<<<< Updated upstream
- "startTime": 1754321860612,
-=======
- "startTime": 1754320393327,
->>>>>>> Stashed changes
-=======
- "startTime": 1754320393327,
->>>>>>> Stashed changes
-=======
- "startTime": 1754320393327,
->>>>>>> Stashed changes
- "totalTasks": 1,
- "successfulTasks": 1,
- "failedTasks": 0,
- "totalAgents": 0,
- "activeAgents": 0,
- "neuralEvents": 0
-}
\ No newline at end of file
diff --git a/agentic-flow/.claude-flow/metrics/task-metrics.json b/agentic-flow/.claude-flow/metrics/task-metrics.json
deleted file mode 100644
index 9ff9ba5bc5..0000000000
--- a/agentic-flow/.claude-flow/metrics/task-metrics.json
+++ /dev/null
@@ -1,34 +0,0 @@
-[
- {
-<<<<<<< Updated upstream
-<<<<<<< Updated upstream
-<<<<<<< Updated upstream
- "id": "cmd-hooks-1754321860717",
- "type": "hooks",
- "success": true,
- "duration": 24.768541000000027,
- "timestamp": 1754321860742,
-=======
- "id": "cmd-hooks-1754320393431",
- "type": "hooks",
- "success": true,
- "duration": 11.025525000000016,
- "timestamp": 1754320393442,
->>>>>>> Stashed changes
-=======
- "id": "cmd-hooks-1754320393431",
- "type": "hooks",
- "success": true,
- "duration": 11.025525000000016,
- "timestamp": 1754320393442,
->>>>>>> Stashed changes
-=======
- "id": "cmd-hooks-1754320393431",
- "type": "hooks",
- "success": true,
- "duration": 11.025525000000016,
- "timestamp": 1754320393442,
->>>>>>> Stashed changes
- "metadata": {}
- }
-]
\ No newline at end of file
diff --git a/agentic-flow/.claude/checkpoints/1754320292.json b/agentic-flow/.claude/checkpoints/1754320292.json
deleted file mode 100644
index e6d00c0716..0000000000
--- a/agentic-flow/.claude/checkpoints/1754320292.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250804-151132", "file": "/workspaces/claude-code-flow/performance_optimizer.py", "timestamp": "2025-08-04T15:11:32Z", "type": "pre-edit", "original_branch": "alpha-85"}
diff --git a/agentic-flow/.claude/checkpoints/1754320293.json b/agentic-flow/.claude/checkpoints/1754320293.json
deleted file mode 100644
index c9fccfaf34..0000000000
--- a/agentic-flow/.claude/checkpoints/1754320293.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250804-151133", "file": "/workspaces/claude-code-flow/performance_optimizer.py", "timestamp": "2025-08-04T15:11:33Z", "type": "post-edit", "branch": "alpha-85", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/task-metrics.json | 6 +- .claude/checkpoints/1754320282.json | 1 + agentic-flow/package-lock.json | 693 +++++++++++++++++++++++++++++++++ agentic-flow/package.json | 6 + claude-flow-wiki | 0 performance_optimizer.py | 557 ++++++++++++++++++++++++++ 7 files changed, 1261 insertions(+), 4 deletions(-) "}
diff --git a/agentic-flow/.claude/checkpoints/1754320294.json b/agentic-flow/.claude/checkpoints/1754320294.json
deleted file mode 100644
index 279e3a5e5f..0000000000
--- a/agentic-flow/.claude/checkpoints/1754320294.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250804-151134", "file": "/workspaces/claude-code-flow/tuned_model_configs.json", "timestamp": "2025-08-04T15:11:34Z", "type": "pre-edit", "original_branch": "alpha-85"}
diff --git a/agentic-flow/.claude/checkpoints/1754320296.json b/agentic-flow/.claude/checkpoints/1754320296.json
deleted file mode 100644
index 016314bc7e..0000000000
--- a/agentic-flow/.claude/checkpoints/1754320296.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250804-151136", "file": "/workspaces/claude-code-flow/tuned_model_configs.json", "timestamp": "2025-08-04T15:11:36Z", "type": "post-edit", "branch": "alpha-85", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/task-metrics.json | 6 +- agentic-flow/.claude-flow/metrics/performance.json | 2 +- .../.claude-flow/metrics/task-metrics.json | 6 +- claude-flow-wiki | 0 tuned_model_configs.json | 462 +++++++++++++++++++++ 6 files changed, 470 insertions(+), 8 deletions(-) "}
diff --git a/agentic-flow/.claude/checkpoints/1754320318.json b/agentic-flow/.claude/checkpoints/1754320318.json
deleted file mode 100644
index 1b36a3f10a..0000000000
--- a/agentic-flow/.claude/checkpoints/1754320318.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250804-151158", "file": "/workspaces/claude-code-flow/ensemble_demo.py", "timestamp": "2025-08-04T15:11:58Z", "type": "pre-edit", "original_branch": "alpha-85"}
diff --git a/agentic-flow/.claude/checkpoints/1754320320.json b/agentic-flow/.claude/checkpoints/1754320320.json
deleted file mode 100644
index d11ba9b95f..0000000000
--- a/agentic-flow/.claude/checkpoints/1754320320.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250804-151200", "file": "/workspaces/claude-code-flow/ensemble_demo.py", "timestamp": "2025-08-04T15:12:00Z", "type": "post-edit", "branch": "alpha-85", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 1528 ++------------------ .claude-flow/metrics/task-metrics.json | 6 +- agentic-flow/.claude-flow/metrics/performance.json | 2 +- .../.claude-flow/metrics/task-metrics.json | 6 +- agentic-flow/.claude/checkpoints/1754320296.json | 1 + claude-flow-wiki | 0 ensemble_demo.py | 200 +++ memory/memory-store.json | 6 + 9 files changed, 319 insertions(+), 1432 deletions(-) "}
diff --git a/agentic-flow/.claude/checkpoints/1754320388.json b/agentic-flow/.claude/checkpoints/1754320388.json
deleted file mode 100644
index 2619a96981..0000000000
--- a/agentic-flow/.claude/checkpoints/1754320388.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250804-151307", "file": "/workspaces/claude-code-flow/mle-star-final-validation-summary.md", "timestamp": "2025-08-04T15:13:08Z", "type": "pre-edit", "original_branch": "alpha-85"}
diff --git a/agentic-flow/.claude/checkpoints/1754320389.json b/agentic-flow/.claude/checkpoints/1754320389.json
deleted file mode 100644
index 55b89f26c3..0000000000
--- a/agentic-flow/.claude/checkpoints/1754320389.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250804-151309", "file": "/workspaces/claude-code-flow/mle-star-final-validation-summary.md", "timestamp": "2025-08-04T15:13:09Z", "type": "post-edit", "branch": "alpha-85", "diff_summary": " agentic-flow/.claude-flow/metrics/performance.json | 2 +- .../.claude-flow/metrics/task-metrics.json | 6 +- claude-flow-wiki | 0 mle-star-final-validation-summary.md | 233 +++++++++++++++++++++ 4 files changed, 237 insertions(+), 4 deletions(-) "}
diff --git a/agentic-flow/.claude/checkpoints/1754321830.json b/agentic-flow/.claude/checkpoints/1754321830.json
deleted file mode 100644
index 866a7e97cf..0000000000
--- a/agentic-flow/.claude/checkpoints/1754321830.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250804-153710", "file": "/workspaces/claude-code-flow/mle-star-orchestration-report.md", "timestamp": "2025-08-04T15:37:10Z", "type": "pre-edit", "original_branch": "alpha-85"}
diff --git a/agentic-flow/.claude/checkpoints/1754321831.json b/agentic-flow/.claude/checkpoints/1754321831.json
deleted file mode 100644
index 34e8c942f0..0000000000
--- a/agentic-flow/.claude/checkpoints/1754321831.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250804-153711", "file": "/workspaces/claude-code-flow/mle-star-orchestration-report.md", "timestamp": "2025-08-04T15:37:11Z", "type": "post-edit", "branch": "alpha-85", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 576 +++++++++++++++++++++ .claude-flow/metrics/task-metrics.json | 6 +- .claude/checkpoints/1754320508.json | 1 + .claude/checkpoints/1754320512.json | 1 + agentic-flow/.claude-flow/metrics/performance.json | 2 +- .../.claude-flow/metrics/task-metrics.json | 6 +- claude-flow-wiki | 0 mle-star-orchestration-report.md | 211 ++++++++ 9 files changed, 797 insertions(+), 8 deletions(-) "}
diff --git a/agentic-flow/.claude/checkpoints/summary-session-20250804-153739.md b/agentic-flow/.claude/checkpoints/summary-session-20250804-153739.md
deleted file mode 100644
index 886f76abfb..0000000000
--- a/agentic-flow/.claude/checkpoints/summary-session-20250804-153739.md
+++ /dev/null
@@ -1,198 +0,0 @@
-# Session Summary - 2025-08-04 15:37:39
-
-## Checkpoints Created
-1754320292.json
-1754320293.json
-1754320294.json
-1754320296.json
-1754320318.json
-1754320320.json
-1754320388.json
-1754321830.json
-1754321831.json
-
-## Files Modified
-.claude-flow/metrics/performance.json
-.claude-flow/metrics/system-metrics.json
-.claude-flow/metrics/task-metrics.json
-.claude/checkpoints/1754318655.json
-.claude/checkpoints/1754318657.json
-.claude/checkpoints/1754318756.json
-.claude/checkpoints/1754318758.json
-.claude/checkpoints/1754318776.json
-.claude/checkpoints/1754318778.json
-.claude/checkpoints/1754318972.json
-.claude/checkpoints/1754318974.json
-.claude/checkpoints/1754318985.json
-.claude/checkpoints/1754318988.json
-.claude/checkpoints/1754319014.json
-.claude/checkpoints/1754319017.json
-.claude/checkpoints/1754319028.json
-.claude/checkpoints/1754319031.json
-.claude/checkpoints/1754319268.json
-.claude/checkpoints/1754319272.json
-.claude/checkpoints/1754319959.json
-.claude/checkpoints/1754319962.json
-.claude/checkpoints/1754319969.json
-.claude/checkpoints/1754319970.json
-.claude/checkpoints/1754319981.json
-.claude/checkpoints/1754319983.json
-.claude/checkpoints/1754319996.json
-.claude/checkpoints/1754319998.json
-.claude/checkpoints/1754320004.json
-.claude/checkpoints/1754320006.json
-.claude/checkpoints/1754320043.json
-.claude/checkpoints/1754320045.json
-.claude/checkpoints/1754320061.json
-.claude/checkpoints/1754320063.json
-.claude/checkpoints/1754320082.json
-.claude/checkpoints/1754320084.json
-.claude/checkpoints/1754320091.json
-.claude/checkpoints/1754320093.json
-.claude/checkpoints/1754320121.json
-.claude/checkpoints/1754320123.json
-.claude/checkpoints/1754320129.json
-.claude/checkpoints/1754320130.json
-.claude/checkpoints/1754320141.json
-.claude/checkpoints/1754320142.json
-.claude/checkpoints/1754320144.json
-.claude/checkpoints/1754320146.json
-.claude/checkpoints/1754320147.json
-.claude/checkpoints/1754320149.json
-.claude/checkpoints/1754320150.json
-.claude/checkpoints/1754320151.json
-.claude/checkpoints/1754320157.json
-.claude/checkpoints/1754320158.json
-.claude/checkpoints/1754320172.json
-.claude/checkpoints/1754320174.json
-.claude/checkpoints/1754320208.json
-.claude/checkpoints/1754320210.json
-.claude/checkpoints/1754320211.json
-.claude/checkpoints/1754320212.json
-.claude/checkpoints/1754320213.json
-.claude/checkpoints/1754320214.json
-.claude/checkpoints/1754320215.json
-.claude/checkpoints/1754320218.json
-.claude/checkpoints/1754320219.json
-.claude/checkpoints/1754320220.json
-.claude/checkpoints/1754320221.json
-.claude/checkpoints/1754320223.json
-.claude/checkpoints/1754320225.json
-.claude/checkpoints/1754320226.json
-.claude/checkpoints/1754320227.json
-.claude/checkpoints/1754320235.json
-.claude/checkpoints/1754320237.json
-.claude/checkpoints/1754320256.json
-.claude/checkpoints/1754320258.json
-.claude/checkpoints/1754320270.json
-.claude/checkpoints/1754320271.json
-.claude/checkpoints/1754320275.json
-.claude/checkpoints/1754320282.json
-.claude/checkpoints/1754320334.json
-.claude/checkpoints/1754320336.json
-.claude/checkpoints/1754320508.json
-.claude/checkpoints/1754320512.json
-.claude/checkpoints/summary-session-20250804-150637.md
-.claude/checkpoints/summary-session-20250804-151119.md
-.claude/checkpoints/summary-session-20250804-151134.md
-.claude/checkpoints/summary-session-20250804-151200.md
-.claude/checkpoints/summary-session-20250804-151308.md
-.claude/checkpoints/task-1754318307.json
-.claude/checkpoints/task-1754319468.json
-.claude/checkpoints/task-1754319469.json
-.claude/checkpoints/task-1754319849.json
-__pycache__/ensemble_implementation.cpython-312.pyc
-agentic-flow/.claude-flow/metrics/agent-metrics.json
-agentic-flow/.claude-flow/metrics/performance.json
-agentic-flow/.claude-flow/metrics/task-metrics.json
-agentic-flow/.claude/checkpoints/1754320292.json
-agentic-flow/.claude/checkpoints/1754320293.json
-agentic-flow/.claude/checkpoints/1754320294.json
-agentic-flow/.claude/checkpoints/1754320296.json
-agentic-flow/.claude/checkpoints/1754320318.json
-agentic-flow/.claude/checkpoints/1754320320.json
-agentic-flow/.claude/checkpoints/1754320388.json
-agentic-flow/memory/memory-store.json
-agentic-flow/package-lock.json
-agentic-flow/package.json
-agentic-flow/src/tests/validation/env.setup.js
-agentic-flow/src/tests/validation/jest.config.js
-agentic-flow/src/tests/validation/mle-star-validation-suite.test.ts
-agentic-flow/src/tests/validation/performance-benchmarks.test.ts
-agentic-flow/src/tests/validation/run-validation.ts
-agentic-flow/src/tests/validation/setup.ts
-claude-flow-wiki
-docs/automation-features.md
-ensemble_demo.py
-ensemble_implementation.py
-ensemble_optimization.py
-ensemble_strategy.md
-examples/automation-examples.md
-foundation_design.md
-hyperparameter_optimization.py
-memory/memory-store.json
-ml_foundation/__init__.py
-ml_foundation/evaluation/evaluator.py
-ml_foundation/models/base.py
-ml_foundation/pipelines/data_pipeline.py
-mle-star-final-validation-summary.md
-mle-star-orchestration-report.md
-model_architecture_optimizer.py
-performance_optimizer.py
-refinement_agent_workdir/REFINEMENT_AGENT_SUMMARY.md
-refinement_agent_workdir/ablation_analysis_plan.md
-refinement_agent_workdir/ablation_framework.py
-refinement_agent_workdir/refinement_demo.py
-refinement_agent_workdir/requirements.txt
-refinement_agent_workdir/targeted_optimizer.py
-refinement_report.md
-search_findings.md
-src/automation/agents/foundation_agent_README.md
-src/automation/agents/foundation_agent_core.py
-src/automation/agents/foundation_agent_features.py
-src/automation/agents/foundation_agent_integration.py
-src/automation/agents/test_foundation_agent.py
-src/cli/command-registry.js
-src/cli/simple-commands/automation-executor.js
-src/cli/simple-commands/automation.js
-src/cli/simple-commands/templates/mle-star-workflow.json
-src/mle-star/ensemble_agent_advanced.py
-src/mle-star/ensemble_agent_implementation.py
-src/mle-star/ensemble_agent_tests.py
-src/workflows/examples/mle-star-workflow.json
-test_ensemble_system.py
-tuned_model_configs.json
-validation_agent_example.py
-validation_agent_main.py
-validation_agent_monitoring.py
-validation_agent_summary.md
-validation_agent_tests.py
-validation_report.md
-
-## Recent Commits
-b4d73b0 🔖 Checkpoint: Edit /workspaces/claude-code-flow/mle-star-orchestration-report.md
-05a4cb8 🔖 Checkpoint: Edit /workspaces/claude-code-flow/src/workflows/examples/mle-star-workflow.json
-61aa22a 🔖 Checkpoint: Edit /workspaces/claude-code-flow/mle-star-final-validation-summary.md
-7c3f7f8 🔖 Checkpoint: Edit /workspaces/claude-code-flow/src/automation/agents/foundation_agent_README.md
-96b4989 🔖 Checkpoint: Edit /workspaces/claude-code-flow/ensemble_demo.py
-d7e2711 🔖 Checkpoint: Edit /workspaces/claude-code-flow/tuned_model_configs.json
-2afe66a 🔖 Checkpoint: Edit /workspaces/claude-code-flow/performance_optimizer.py
-bf95555 🔖 Checkpoint: Edit /workspaces/claude-code-flow/agentic-flow/src/tests/validation/run-validation.ts
-ba5dc09 🔖 Checkpoint: Edit /workspaces/claude-code-flow/validation_agent_summary.md
-c8923c9 🔖 Checkpoint: Edit /workspaces/claude-code-flow/agentic-flow/src/tests/validation/setup.ts
-
-## GitHub Releases Created
-No GitHub releases
-
-## Rollback Instructions
-To rollback to a specific checkpoint:
-```bash
-# List all checkpoints
-git tag -l checkpoint-* | sort -r
-
-# List GitHub releases
-gh release list
-
-# Rollback to a checkpoint
-git checkout checkpoint-YYYYMMDD-HHMMSS
-```
diff --git a/agentic-flow/memory/memory-store.json b/agentic-flow/memory/memory-store.json
deleted file mode 100644
index adbd68034d..0000000000
--- a/agentic-flow/memory/memory-store.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "default": [
- {
- "key": "agent/validation/test_suite_creation",
- "value": "{\"status\":\"completed\",\"agent\":\"validation\",\"testFiles\":[\"mle-star-validation-suite.test.ts\",\"performance-benchmarks.test.ts\"],\"coverage\":\"comprehensive\",\"timestamp\":\"2025-08-04T15:11:59.000Z\"}",
- "namespace": "default",
- "timestamp": 1754320319360
- },
- {
- "key": "agent/validation/report_generation",
- "value": "{\"status\":\"completed\",\"agent\":\"validation\",\"reportFile\":\"validation_report.md\",\"metrics\":{\"testCoverage\":\"100%\",\"productionReadiness\":\"approved\",\"performanceTargets\":\"exceeded\"},\"timestamp\":\"2025-08-04T15:12:00.000Z\"}",
- "namespace": "default",
- "timestamp": 1754320324189
- }
- ]
-}
\ No newline at end of file
diff --git a/agentic-flow/package-lock.json b/agentic-flow/package-lock.json
deleted file mode 100644
index 5c24d620a1..0000000000
--- a/agentic-flow/package-lock.json
+++ /dev/null
@@ -1,693 +0,0 @@
-{
- "name": "agentic-flow",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "devDependencies": {
- "@types/jest": "^30.0.0",
- "jest-html-reporters": "^3.1.7"
- }
- },
- "node_modules/@babel/code-frame": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz",
- "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-validator-identifier": "^7.27.1",
- "js-tokens": "^4.0.0",
- "picocolors": "^1.1.1"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-validator-identifier": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz",
- "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@jest/diff-sequences": {
- "version": "30.0.1",
- "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.0.1.tgz",
- "integrity": "sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/@jest/get-type": {
- "version": "30.0.1",
- "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.0.1.tgz",
- "integrity": "sha512-AyYdemXCptSRFirI5EPazNxyPwAL0jXt3zceFjaj8NFiKP9pOi0bfXonf6qkf82z2t3QWPeLCWWw4stPBzctLw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/@jest/pattern": {
- "version": "30.0.1",
- "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.0.1.tgz",
- "integrity": "sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/node": "*",
- "jest-regex-util": "30.0.1"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/@jest/pattern/node_modules/jest-regex-util": {
- "version": "30.0.1",
- "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.0.1.tgz",
- "integrity": "sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/@types/istanbul-lib-coverage": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",
- "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/istanbul-lib-report": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz",
- "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/istanbul-lib-coverage": "*"
- }
- },
- "node_modules/@types/istanbul-reports": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz",
- "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "node_modules/@types/jest": {
- "version": "30.0.0",
- "resolved": "https://registry.npmjs.org/@types/jest/-/jest-30.0.0.tgz",
- "integrity": "sha512-XTYugzhuwqWjws0CVz8QpM36+T+Dz5mTEBKhNs/esGLnCIlGdRy+Dq78NRjd7ls7r8BC8ZRMOrKlkO1hU0JOwA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "expect": "^30.0.0",
- "pretty-format": "^30.0.0"
- }
- },
- "node_modules/@types/jest/node_modules/@jest/expect-utils": {
- "version": "30.0.5",
- "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.0.5.tgz",
- "integrity": "sha512-F3lmTT7CXWYywoVUGTCmom0vXq3HTTkaZyTAzIy+bXSBizB7o5qzlC9VCtq0arOa8GqmNsbg/cE9C6HLn7Szew==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/get-type": "30.0.1"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/@types/jest/node_modules/@jest/schemas": {
- "version": "30.0.5",
- "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz",
- "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@sinclair/typebox": "^0.34.0"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/@types/jest/node_modules/@jest/types": {
- "version": "30.0.5",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.0.5.tgz",
- "integrity": "sha512-aREYa3aku9SSnea4aX6bhKn4bgv3AXkgijoQgbYV3yvbiGt6z+MQ85+6mIhx9DsKW2BuB/cLR/A+tcMThx+KLQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/pattern": "30.0.1",
- "@jest/schemas": "30.0.5",
- "@types/istanbul-lib-coverage": "^2.0.6",
- "@types/istanbul-reports": "^3.0.4",
- "@types/node": "*",
- "@types/yargs": "^17.0.33",
- "chalk": "^4.1.2"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/@types/jest/node_modules/@sinclair/typebox": {
- "version": "0.34.38",
- "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.38.tgz",
- "integrity": "sha512-HpkxMmc2XmZKhvaKIZZThlHmx1L0I/V1hWK1NubtlFnr6ZqdiOpV72TKudZUNQjZNsyDBay72qFEhEvb+bcwcA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/jest/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/@types/jest/node_modules/ci-info": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.0.tgz",
- "integrity": "sha512-l+2bNRMiQgcfILUi33labAZYIWlH1kWDp+ecNo5iisRKrbm0xcRyCww71/YU0Fkw0mAFpz9bJayXPjey6vkmaQ==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/sibiraj-s"
- }
- ],
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@types/jest/node_modules/expect": {
- "version": "30.0.5",
- "resolved": "https://registry.npmjs.org/expect/-/expect-30.0.5.tgz",
- "integrity": "sha512-P0te2pt+hHI5qLJkIR+iMvS+lYUZml8rKKsohVHAGY+uClp9XVbdyYNJOIjSRpHVp8s8YqxJCiHUkSYZGr8rtQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/expect-utils": "30.0.5",
- "@jest/get-type": "30.0.1",
- "jest-matcher-utils": "30.0.5",
- "jest-message-util": "30.0.5",
- "jest-mock": "30.0.5",
- "jest-util": "30.0.5"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/@types/jest/node_modules/jest-diff": {
- "version": "30.0.5",
- "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.0.5.tgz",
- "integrity": "sha512-1UIqE9PoEKaHcIKvq2vbibrCog4Y8G0zmOxgQUVEiTqwR5hJVMCoDsN1vFvI5JvwD37hjueZ1C4l2FyGnfpE0A==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/diff-sequences": "30.0.1",
- "@jest/get-type": "30.0.1",
- "chalk": "^4.1.2",
- "pretty-format": "30.0.5"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/@types/jest/node_modules/jest-matcher-utils": {
- "version": "30.0.5",
- "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.0.5.tgz",
- "integrity": "sha512-uQgGWt7GOrRLP1P7IwNWwK1WAQbq+m//ZY0yXygyfWp0rJlksMSLQAA4wYQC3b6wl3zfnchyTx+k3HZ5aPtCbQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/get-type": "30.0.1",
- "chalk": "^4.1.2",
- "jest-diff": "30.0.5",
- "pretty-format": "30.0.5"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/@types/jest/node_modules/jest-message-util": {
- "version": "30.0.5",
- "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.0.5.tgz",
- "integrity": "sha512-NAiDOhsK3V7RU0Aa/HnrQo+E4JlbarbmI3q6Pi4KcxicdtjV82gcIUrejOtczChtVQR4kddu1E1EJlW6EN9IyA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/code-frame": "^7.27.1",
- "@jest/types": "30.0.5",
- "@types/stack-utils": "^2.0.3",
- "chalk": "^4.1.2",
- "graceful-fs": "^4.2.11",
- "micromatch": "^4.0.8",
- "pretty-format": "30.0.5",
- "slash": "^3.0.0",
- "stack-utils": "^2.0.6"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/@types/jest/node_modules/jest-mock": {
- "version": "30.0.5",
- "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.0.5.tgz",
- "integrity": "sha512-Od7TyasAAQX/6S+QCbN6vZoWOMwlTtzzGuxJku1GhGanAjz9y+QsQkpScDmETvdc9aSXyJ/Op4rhpMYBWW91wQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/types": "30.0.5",
- "@types/node": "*",
- "jest-util": "30.0.5"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/@types/jest/node_modules/jest-util": {
- "version": "30.0.5",
- "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.5.tgz",
- "integrity": "sha512-pvyPWssDZR0FlfMxCBoc0tvM8iUEskaRFALUtGQYzVEAqisAztmy+R8LnU14KT4XA0H/a5HMVTXat1jLne010g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/types": "30.0.5",
- "@types/node": "*",
- "chalk": "^4.1.2",
- "ci-info": "^4.2.0",
- "graceful-fs": "^4.2.11",
- "picomatch": "^4.0.2"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/@types/jest/node_modules/picomatch": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
- "node_modules/@types/jest/node_modules/pretty-format": {
- "version": "30.0.5",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.5.tgz",
- "integrity": "sha512-D1tKtYvByrBkFLe2wHJl2bwMJIiT8rW+XA+TiataH79/FszLQMrpGEvzUVkzPau7OCO0Qnrhpe87PqtOAIB8Yw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/schemas": "30.0.5",
- "ansi-styles": "^5.2.0",
- "react-is": "^18.3.1"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/@types/jest/node_modules/pretty-format/node_modules/ansi-styles": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
- "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/@types/node": {
- "version": "20.19.9",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.9.tgz",
- "integrity": "sha512-cuVNgarYWZqxRJDQHEB58GEONhOK79QVR/qYx4S7kcUObQvUwvFnYxJuuHUKm2aieN9X3yZB4LZsuYNU1Qphsw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "undici-types": "~6.21.0"
- }
- },
- "node_modules/@types/stack-utils": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz",
- "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/yargs": {
- "version": "17.0.33",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz",
- "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/yargs-parser": "*"
- }
- },
- "node_modules/@types/yargs-parser": {
- "version": "21.0.3",
- "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz",
- "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/braces": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
- "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "fill-range": "^7.1.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/define-lazy-prop": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
- "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/fill-range": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
- "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "to-regex-range": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/fs-extra": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
- "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/graceful-fs": {
- "version": "4.2.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
- "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/is-docker": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
- "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
- "dev": true,
- "license": "MIT",
- "bin": {
- "is-docker": "cli.js"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.12.0"
- }
- },
- "node_modules/is-wsl": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
- "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "is-docker": "^2.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-html-reporters": {
- "version": "3.1.7",
- "resolved": "https://registry.npmjs.org/jest-html-reporters/-/jest-html-reporters-3.1.7.tgz",
- "integrity": "sha512-GTmjqK6muQ0S0Mnksf9QkL9X9z2FGIpNSxC52E0PHDzjPQ1XDu2+XTI3B3FS43ZiUzD1f354/5FfwbNIBzT7ew==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "fs-extra": "^10.0.0",
- "open": "^8.0.3"
- }
- },
- "node_modules/js-tokens": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/jsonfile": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
- "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "universalify": "^2.0.0"
- },
- "optionalDependencies": {
- "graceful-fs": "^4.1.6"
- }
- },
- "node_modules/micromatch": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
- "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "braces": "^3.0.3",
- "picomatch": "^2.3.1"
- },
- "engines": {
- "node": ">=8.6"
- }
- },
- "node_modules/open": {
- "version": "8.4.2",
- "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz",
- "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "define-lazy-prop": "^2.0.0",
- "is-docker": "^2.1.1",
- "is-wsl": "^2.2.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/picocolors": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
- "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
- "node_modules/react-is": {
- "version": "18.3.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
- "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/slash": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/stack-utils": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
- "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "escape-string-regexp": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/stack-utils/node_modules/escape-string-regexp": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
- "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "is-number": "^7.0.0"
- },
- "engines": {
- "node": ">=8.0"
- }
- },
- "node_modules/undici-types": {
- "version": "6.21.0",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
- "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/universalify": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
- "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 10.0.0"
- }
- }
- }
-}
diff --git a/agentic-flow/package.json b/agentic-flow/package.json
deleted file mode 100644
index 0e6b6694eb..0000000000
--- a/agentic-flow/package.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "devDependencies": {
- "@types/jest": "^30.0.0",
- "jest-html-reporters": "^3.1.7"
- }
-}
diff --git a/agentic-flow/src/tests/validation/env.setup.js b/agentic-flow/src/tests/validation/env.setup.js
deleted file mode 100644
index a7601ea514..0000000000
--- a/agentic-flow/src/tests/validation/env.setup.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Environment setup for validation tests
- */
-
-// Set TensorFlow.js backend to CPU for consistent testing
-process.env.TF_CPP_MIN_LOG_LEVEL = '3'; // Suppress TensorFlow warnings
-process.env.CUDA_VISIBLE_DEVICES = ''; // Force CPU-only execution
-
-// Jest global configuration
-global.console = {
- ...console,
- // Suppress verbose logging during tests
- debug: jest.fn(),
- info: process.env.NODE_ENV === 'test' ? jest.fn() : console.info,
- warn: console.warn,
- error: console.error,
-};
\ No newline at end of file
diff --git a/agentic-flow/src/tests/validation/jest.config.js b/agentic-flow/src/tests/validation/jest.config.js
deleted file mode 100644
index 9d51f5a163..0000000000
--- a/agentic-flow/src/tests/validation/jest.config.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Jest Configuration for MLE-STAR Validation Suite
- */
-
-module.exports = {
- preset: 'ts-jest',
- testEnvironment: 'node',
- setupFilesAfterEnv: ['<rootDir>/src/tests/validation/setup.ts'],
- testMatch: [
- '<rootDir>/src/tests/validation/**/*.test.ts'
- ],
- collectCoverageFrom: [
- 'src/**/*.ts',
- '!src/**/*.test.ts',
- '!src/**/*.d.ts',
- '!src/tests/**/*'
- ],
- coverageReporters: ['text', 'lcov', 'html'],
- coverageDirectory: 'coverage/validation',
- testTimeout: 30000,
- maxWorkers: 1, // Sequential execution for resource-intensive ML tests
- setupFiles: ['<rootDir>/src/tests/validation/env.setup.js'],
- moduleNameMapping: {
- '^@/(.*)$': '<rootDir>/src/$1'
- },
- transform: {
- '^.+\\.ts$': 'ts-jest'
- },
- testResultsProcessor: 'jest-html-reporters',
- reporters: [
- 'default',
- ['jest-html-reporters', {
- publicPath: './test-reports/validation',
- filename: 'validation-report.html',
- expand: true,
- hideIcon: false,
- pageTitle: 'MLE-STAR Validation Report'
- }]
- ]
-};
\ No newline at end of file
diff --git a/agentic-flow/src/tests/validation/mle-star-validation-suite.test.ts b/agentic-flow/src/tests/validation/mle-star-validation-suite.test.ts
deleted file mode 100644
index a8b151ed40..0000000000
--- a/agentic-flow/src/tests/validation/mle-star-validation-suite.test.ts
+++ /dev/null
@@ -1,495 +0,0 @@
-/**
- * MLE-STAR Validation Suite - Comprehensive Testing Framework
- *
- * This test suite provides comprehensive validation for the MLE-STAR workflow
- * including model ensemble testing, performance validation, and production readiness assessment.
- */
-
-import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, jest } from '@jest/globals';
-import * as tf from '@tensorflow/tfjs-node';
-import { ModelEnsemble } from '../../neural/optimization/ModelEnsemble';
-import { logger } from '../../utils/logger';
-
-// Test configuration
-const TEST_CONFIG = {
- timeout: 30000,
- ensemble: {
- maxModels: 5,
- strategy: 'weighted_average',
- diversityThreshold: 0.1,
- performanceWeight: 0.7,
- diversityWeight: 0.3
- },
- validation: {
- minAccuracy: 0.8,
- maxLoss: 0.5,
- minConfidence: 0.7,
- maxUncertainty: 0.3
- }
-};
-
-// Mock data generators
-const generateTestData = (samples: number, features: number): tf.Tensor => {
- return tf.randomNormal([samples, features]);
-};
-
-const generateTestLabels = (samples: number, classes: number): tf.Tensor => {
- return tf.oneHot(tf.randomUniform([samples], 0, classes, 'int32'), classes);
-};
-
-const createMockModel = (name: string, accuracy: number = 0.8): tf.LayersModel => {
- const model = tf.sequential({
- layers: [
- tf.layers.dense({ inputShape: [10], units: 64, activation: 'relu' }),
- tf.layers.dropout({ rate: 0.2 }),
- tf.layers.dense({ units: 32, activation: 'relu' }),
- tf.layers.dense({ units: 3, activation: 'softmax' })
- ]
- });
-
- model.compile({
- optimizer: 'adam',
- loss: 'categoricalCrossentropy',
- metrics: ['accuracy']
- });
-
- // Mock predict method to return consistent results for testing
- const originalPredict = model.predict.bind(model);
- model.predict = jest.fn().mockImplementation((input: tf.Tensor) => {
- const batchSize = input.shape[0] || 1;
- // Generate predictions with controlled accuracy
- const baseProbs = tf.randomUniform([batchSize, 3]);
- const adjustedProbs = tf.mul(baseProbs, tf.scalar(accuracy));
- return tf.softmax(adjustedProbs);
- });
-
- return model;
-};
-
-describe('MLE-STAR Validation Suite', () => {
- let ensemble: ModelEnsemble;
- let testData: tf.Tensor;
- let testLabels: tf.Tensor;
-
- beforeAll(async () => {
- // Initialize TensorFlow backend
- await tf.ready();
- logger.info('TensorFlow backend initialized for testing');
- }, TEST_CONFIG.timeout);
-
- beforeEach(async () => {
- // Create fresh ensemble for each test
- ensemble = new ModelEnsemble(TEST_CONFIG.ensemble);
-
- // Generate test data
- testData = generateTestData(100, 10);
- testLabels = generateTestLabels(100, 3);
-
- // Populate ensemble with mock models
- for (let i = 0; i < 3; i++) {
- const model = createMockModel(`test_model_${i}`, 0.7 + i * 0.1);
- await ensemble.addModel(model, `test_model_${i}`, {
- architecture: {
- layers: 4,
- hiddenUnits: 64 + i * 16
- },
- trainingConfig: {
- optimizer: 'adam',
- learningRate: 0.001
- }
- });
- }
- });
-
- afterEach(() => {
- // Cleanup tensors and models
- if (testData) testData.dispose();
- if (testLabels) testLabels.dispose();
- if (ensemble) ensemble.dispose();
- });
-
- afterAll(() => {
- // Final cleanup
- tf.disposeVariables();
- });
-
- describe('Model Ensemble Validation', () => {
- it('should create ensemble with correct configuration', () => {
- expect(ensemble.getStatistics().modelCount).toBe(3);
- expect(ensemble.getStatistics().strategy).toBe('weighted_average');
- });
-
- it('should make predictions with all ensemble strategies', async () => {
- const strategies = ['simple_average', 'weighted_average', 'voting', 'stacking', 'dynamic_selection'];
-
- for (const strategy of strategies) {
- const testEnsemble = new ModelEnsemble({ ...TEST_CONFIG.ensemble, strategy });
-
- // Add models to test ensemble
- for (let i = 0; i < 3; i++) {
- const model = createMockModel(`${strategy}_model_${i}`, 0.8);
- await testEnsemble.addModel(model, `${strategy}_model_${i}`);
- }
-
- const sampleInput = testData.slice([0, 0], [1, -1]);
- const prediction = await testEnsemble.predict(sampleInput);
-
- expect(prediction).toBeDefined();
- expect(prediction.prediction).toBeDefined();
- expect(prediction.confidence).toBeGreaterThan(0);
- expect(prediction.strategy).toBe(strategy);
- expect(prediction.modelContributions).toHaveLength(3);
-
- // Cleanup
- prediction.prediction.dispose();
- sampleInput.dispose();
- testEnsemble.dispose();
- }
- }, TEST_CONFIG.timeout);
-
- it('should calculate ensemble metrics correctly', async () => {
- const sampleInput = testData.slice([0, 0], [5, -1]);
- const prediction = await ensemble.predict(sampleInput);
-
- expect(prediction.confidence).toBeGreaterThan(0);
- expect(prediction.confidence).toBeLessThanOrEqual(1);
- expect(prediction.uncertainty).toBeGreaterThanOrEqual(0);
- expect(prediction.agreement).toBeGreaterThanOrEqual(0);
- expect(prediction.agreement).toBeLessThanOrEqual(1);
- expect(prediction.predictionTime).toBeGreaterThan(0);
-
- // Cleanup
- prediction.prediction.dispose();
- sampleInput.dispose();
- });
-
- it('should handle model failures gracefully', async () => {
- // Create a failing model
- const failingModel = createMockModel('failing_model', 0.8);
- (failingModel.predict as jest.Mock).mockImplementation(() => {
- throw new Error('Model prediction failed');
- });
-
- await ensemble.addModel(failingModel, 'failing_model');
-
- const sampleInput = testData.slice([0, 0], [1, -1]);
- const prediction = await ensemble.predict(sampleInput);
-
- // Should still make predictions with remaining models
- expect(prediction).toBeDefined();
- expect(prediction.modelContributions.length).toBeLessThan(4); // One less due to failure
-
- // Cleanup
- prediction.prediction.dispose();
- sampleInput.dispose();
- });
-
- it('should update weights based on performance', async () => {
- const initialStats = ensemble.getStatistics();
- const initialWeights = [...initialStats.ensembleWeights];
-
- // Simulate training with feedback
- const sampleInput = testData.slice([0, 0], [10, -1]);
- const sampleLabels = testLabels.slice([0, 0], [10, -1]);
-
- await ensemble.trainWithFeedback(sampleInput, sampleLabels);
-
- const updatedStats = ensemble.getStatistics();
- const updatedWeights = updatedStats.ensembleWeights;
-
- // Weights should have been updated
- expect(updatedWeights).not.toEqual(initialWeights);
- expect(updatedStats.performanceHistory.length).toBeGreaterThan(0);
-
- // Cleanup
- sampleInput.dispose();
- sampleLabels.dispose();
- });
- });
-
- describe('Performance Validation', () => {
- it('should meet minimum accuracy requirements', async () => {
- const batchSize = 50;
- const sampleInput = testData.slice([0, 0], [batchSize, -1]);
- const sampleLabels = testLabels.slice([0, 0], [batchSize, -1]);
-
- // Train ensemble briefly
- await ensemble.trainWithFeedback(sampleInput, sampleLabels);
-
- const stats = ensemble.getStatistics();
-
- // Check if ensemble meets performance criteria
- expect(stats.averageAccuracy).toBeGreaterThan(0.5); // Relaxed for mock models
- expect(stats.performanceHistory.length).toBeGreaterThan(0);
-
- // Cleanup
- sampleInput.dispose();
- sampleLabels.dispose();
- });
-
- it('should calculate performance metrics accurately', async () => {
- const metrics = calculatePerformanceMetrics(ensemble);
-
- expect(metrics).toHaveProperty('accuracy');
- expect(metrics).toHaveProperty('precision');
- expect(metrics).toHaveProperty('recall');
- expect(metrics).toHaveProperty('f1Score');
- expect(metrics).toHaveProperty('auc');
-
- expect(metrics.accuracy).toBeGreaterThanOrEqual(0);
- expect(metrics.accuracy).toBeLessThanOrEqual(1);
- });
-
- it('should validate model consistency', async () => {
- const consistencyResults = await validateModelConsistency(ensemble, testData.slice([0, 0], [10, -1]));
-
- expect(consistencyResults.averageAgreement).toBeGreaterThan(0);
- expect(consistencyResults.maxDeviation).toBeGreaterThanOrEqual(0);
- expect(consistencyResults.consistencyScore).toBeGreaterThanOrEqual(0);
- expect(consistencyResults.consistencyScore).toBeLessThanOrEqual(1);
- });
- });
-
- describe('Robustness and Edge Cases', () => {
- it('should handle empty ensemble gracefully', async () => {
- const emptyEnsemble = new ModelEnsemble(TEST_CONFIG.ensemble);
- const sampleInput = testData.slice([0, 0], [1, -1]);
-
- await expect(emptyEnsemble.predict(sampleInput)).rejects.toThrow('No models in ensemble');
-
- // Cleanup
- sampleInput.dispose();
- emptyEnsemble.dispose();
- });
-
- it('should handle invalid input dimensions', async () => {
- const invalidInput = tf.randomNormal([1, 5]); // Wrong feature count
-
- // Should handle gracefully or throw descriptive error
- try {
- const prediction = await ensemble.predict(invalidInput);
- prediction.prediction.dispose();
- } catch (error) {
- expect(error).toBeDefined();
- }
-
- invalidInput.dispose();
- });
-
- it('should handle memory constraints', async () => {
- // Test with large batch sizes
- const largeBatch = generateTestData(1000, 10);
-
- try {
- const prediction = await ensemble.predict(largeBatch);
- expect(prediction).toBeDefined();
- prediction.prediction.dispose();
- } catch (error) {
- // Memory errors are acceptable for large batches in test environment
- expect(error).toBeDefined();
- }
-
- largeBatch.dispose();
- });
-
- it('should validate numerical stability', async () => {
- // Test with extreme values
- const extremeInput = tf.mul(testData.slice([0, 0], [10, -1]), tf.scalar(1000));
-
- try {
- const prediction = await ensemble.predict(extremeInput);
-
- // Check for NaN or Infinity values
- const predData = await prediction.prediction.data();
- const hasInvalidValues = Array.from(predData).some(val => !isFinite(val));
-
- expect(hasInvalidValues).toBe(false);
-
- prediction.prediction.dispose();
- } catch (error) {
- // Numerical instability errors are acceptable with extreme inputs
- expect(error).toBeDefined();
- }
-
- extremeInput.dispose();
- });
- });
-
- describe('Production Readiness Assessment', () => {
- it('should meet latency requirements', async () => {
- const sampleInput = testData.slice([0, 0], [1, -1]);
-
- const startTime = Date.now();
- const prediction = await ensemble.predict(sampleInput);
- const latency = Date.now() - startTime;
-
- expect(latency).toBeLessThan(1000); // Should complete within 1 second
- expect(prediction.predictionTime).toBeGreaterThan(0);
-
- // Cleanup
- prediction.prediction.dispose();
- sampleInput.dispose();
- });
-
- it('should handle concurrent requests', async () => {
- const concurrentRequests = 10;
- const requests = [];
-
- for (let i = 0; i < concurrentRequests; i++) {
- const sampleInput = testData.slice([i, 0], [1, -1]);
- requests.push(ensemble.predict(sampleInput));
- }
-
- const results = await Promise.all(requests);
- expect(results).toHaveLength(concurrentRequests);
-
- // All predictions should be valid
- results.forEach((result, index) => {
- expect(result).toBeDefined();
- expect(result.confidence).toBeGreaterThan(0);
- result.prediction.dispose();
- });
- });
-
- it('should validate memory usage', () => {
- const initialMemory = tf.memory();
- const stats = ensemble.getStatistics();
-
- expect(stats.modelCount).toBeGreaterThan(0);
- expect(initialMemory.numTensors).toBeGreaterThan(0);
-
- // Memory should be within reasonable bounds
- expect(initialMemory.numBytes / (1024 * 1024)).toBeLessThan(1000); // Less than 1GB
- });
-
- it('should support model serialization', async () => {
- const tempPath = '/tmp/test-ensemble';
-
- try {
- await ensemble.save(tempPath);
-
- const newEnsemble = new ModelEnsemble(TEST_CONFIG.ensemble);
- await newEnsemble.load(tempPath);
-
- const originalStats = ensemble.getStatistics();
- const loadedStats = newEnsemble.getStatistics();
-
- expect(loadedStats.modelCount).toBe(originalStats.modelCount);
- expect(loadedStats.strategy).toBe(originalStats.strategy);
-
- newEnsemble.dispose();
- } catch (error) {
- // File system errors are acceptable in test environment
- console.warn('Serialization test skipped due to file system constraints');
- }
- });
- });
-
- describe('Stress Testing', () => {
- it('should handle rapid successive predictions', async () => {
- const iterations = 100;
- const results = [];
-
- for (let i = 0; i < iterations; i++) {
- const sampleInput = testData.slice([i % testData.shape[0], 0], [1, -1]);
- const prediction = await ensemble.predict(sampleInput);
- results.push(prediction);
- sampleInput.dispose();
- }
-
- expect(results).toHaveLength(iterations);
-
- // Cleanup all predictions
- results.forEach(result => result.prediction.dispose());
- });
-
- it('should maintain performance under load', async () => {
- const loadTests = [];
- const startTime = Date.now();
-
- // Run multiple concurrent prediction batches
- for (let batch = 0; batch < 5; batch++) {
- const batchInput = testData.slice([batch * 10, 0], [10, -1]);
- loadTests.push(ensemble.predict(batchInput));
- }
-
- const results = await Promise.all(loadTests);
- const totalTime = Date.now() - startTime;
-
- expect(results).toHaveLength(5);
- expect(totalTime).toBeLessThan(5000); // Should complete within 5 seconds
-
- // Cleanup
- results.forEach(result => result.prediction.dispose());
- });
- });
-});
-
-// Helper functions for performance metrics calculation
-function calculatePerformanceMetrics(ensemble: ModelEnsemble) {
- const stats = ensemble.getStatistics();
-
- return {
- accuracy: stats.averageAccuracy,
- precision: calculatePrecision(stats),
- recall: calculateRecall(stats),
- f1Score: calculateF1Score(stats),
- auc: calculateAUC(stats)
- };
-}
-
-function calculatePrecision(stats: any): number {
- // Simplified precision calculation for testing
- return Math.min(1.0, stats.averageAccuracy * 1.1);
-}
-
-function calculateRecall(stats: any): number {
- // Simplified recall calculation for testing
- return Math.min(1.0, stats.averageAccuracy * 0.95);
-}
-
-function calculateF1Score(stats: any): number {
- const precision = calculatePrecision(stats);
- const recall = calculateRecall(stats);
- return 2 * (precision * recall) / (precision + recall) || 0;
-}
-
-function calculateAUC(stats: any): number {
- // Simplified AUC calculation for testing
- return Math.min(1.0, stats.averageAccuracy * 1.05);
-}
-
-async function validateModelConsistency(ensemble: ModelEnsemble, testInput: tf.Tensor) {
- const predictions = [];
- const stats = ensemble.getStatistics();
-
- // Get multiple predictions from ensemble
- for (let i = 0; i < 5; i++) {
- const prediction = await ensemble.predict(testInput);
- predictions.push(prediction);
- }
-
- // Calculate agreement metrics
- const confidences = predictions.map(p => p.confidence);
- const agreements = predictions.map(p => p.agreement);
-
- const averageAgreement = agreements.reduce((sum, a) => sum + a, 0) / agreements.length;
- const confidenceVariance = calculateVariance(confidences);
- const maxDeviation = Math.max(...confidences) - Math.min(...confidences);
-
- // Cleanup
- predictions.forEach(p => p.prediction.dispose());
-
- return {
- averageAgreement,
- confidenceVariance,
- maxDeviation,
- consistencyScore: Math.max(0, 1 - maxDeviation) // Higher is better
- };
-}
-
-function calculateVariance(values: number[]): number {
- const mean = values.reduce((sum, val) => sum + val, 0) / values.length;
- const squaredDiffs = values.map(val => Math.pow(val - mean, 2));
- return squaredDiffs.reduce((sum, diff) => sum + diff, 0) / values.length;
-}
\ No newline at end of file
diff --git a/agentic-flow/src/tests/validation/performance-benchmarks.test.ts b/agentic-flow/src/tests/validation/performance-benchmarks.test.ts
deleted file mode 100644
index 56dcfcd0cc..0000000000
--- a/agentic-flow/src/tests/validation/performance-benchmarks.test.ts
+++ /dev/null
@@ -1,605 +0,0 @@
-/**
- * Performance Benchmarks Test Suite
- *
- * Comprehensive performance validation and benchmarking for MLE-STAR models
- * including accuracy metrics, latency measurements, and throughput analysis.
- */
-
-import { describe, beforeAll, afterAll, it, expect } from '@jest/globals';
-import * as tf from '@tensorflow/tfjs-node';
-import { ModelEnsemble } from '../../neural/optimization/ModelEnsemble';
-import { logger } from '../../utils/logger';
-
-interface PerformanceMetrics {
- accuracy: number;
- precision: number;
- recall: number;
- f1Score: number;
- auc: number;
- latency: number;
- throughput: number;
- memoryUsage: number;
-}
-
-interface BenchmarkResult {
- testName: string;
- metrics: PerformanceMetrics;
- passed: boolean;
- details: Record<string, any>;
-}
-
-describe('Performance Benchmarks', () => {
- let ensemble: ModelEnsemble;
- let benchmarkResults: BenchmarkResult[] = [];
-
- beforeAll(async () => {
- await tf.ready();
- ensemble = new ModelEnsemble({
- strategy: 'weighted_average',
- maxModels: 5,
- diversityThreshold: 0.1
- });
-
- // Create and add high-quality models for benchmarking
- for (let i = 0; i < 3; i++) {
- const model = await createOptimizedModel(`benchmark_model_${i}`);
- await ensemble.addModel(model, `benchmark_model_${i}`, {
- architecture: {
- layers: 6,
- hiddenUnits: 128,
- dropout: 0.2,
- activation: 'relu'
- },
- trainingConfig: {
- optimizer: 'adam',
- learningRate: 0.001,
- batchSize: 32
- }
- });
- }
-
- logger.info('Performance benchmark suite initialized');
- });
-
- afterAll(() => {
- if (ensemble) ensemble.dispose();
- tf.disposeVariables();
-
- // Generate performance report
- generatePerformanceReport(benchmarkResults);
- });
-
- describe('Accuracy Benchmarks', () => {
- it('should achieve target accuracy on classification tasks', async () => {
- const testData = generateClassificationData(1000, 20, 5);
- const predictions: tf.Tensor[] = [];
- const targets: tf.Tensor[] = [];
-
- // Generate predictions in batches
- const batchSize = 100;
- for (let i = 0; i < testData.inputs.shape[0]; i += batchSize) {
- const batchInput = testData.inputs.slice([i, 0], [Math.min(batchSize, testData.inputs.shape[0] - i), -1]);
- const batchTarget = testData.labels.slice([i, 0], [Math.min(batchSize, testData.labels.shape[0] - i), -1]);
-
- const prediction = await ensemble.predict(batchInput);
- predictions.push(prediction.prediction);
- targets.push(batchTarget);
-
- batchInput.dispose();
- }
-
- // Calculate accuracy metrics
- const metrics = await calculateClassificationMetrics(predictions, targets);
-
- const benchmarkResult: BenchmarkResult = {
- testName: 'Classification Accuracy',
- metrics: {
- ...metrics,
- latency: 0,
- throughput: 0,
- memoryUsage: tf.memory().numBytes
- },
- passed: metrics.accuracy >= 0.85 && metrics.f1Score >= 0.80,
- details: {
- targetAccuracy: 0.85,
- targetF1Score: 0.80,
- samplesProcessed: testData.inputs.shape[0]
- }
- };
-
- benchmarkResults.push(benchmarkResult);
-
- expect(metrics.accuracy).toBeGreaterThanOrEqual(0.75); // Minimum acceptable
- expect(metrics.f1Score).toBeGreaterThanOrEqual(0.70);
- expect(metrics.precision).toBeGreaterThanOrEqual(0.70);
- expect(metrics.recall).toBeGreaterThanOrEqual(0.70);
-
- // Cleanup
- predictions.forEach(p => p.dispose());
- targets.forEach(t => t.dispose());
- testData.inputs.dispose();
- testData.labels.dispose();
- });
-
- it('should maintain accuracy across different data distributions', async () => {
- const distributions = ['normal', 'uniform', 'skewed'];
- const accuracyResults = [];
-
- for (const distribution of distributions) {
- const testData = generateDataWithDistribution(500, 15, 3, distribution);
-
- const batchInput = testData.inputs.slice([0, 0], [100, -1]);
- const batchTarget = testData.labels.slice([0, 0], [100, -1]);
-
- const startTime = Date.now();
- const prediction = await ensemble.predict(batchInput);
- const predictionTime = Date.now() - startTime;
-
- const accuracy = await calculateAccuracy(prediction.prediction, batchTarget);
- accuracyResults.push({ distribution, accuracy, predictionTime });
-
- prediction.prediction.dispose();
- batchInput.dispose();
- batchTarget.dispose();
- testData.inputs.dispose();
- testData.labels.dispose();
- }
-
- const avgAccuracy = accuracyResults.reduce((sum, r) => sum + r.accuracy, 0) / accuracyResults.length;
- const maxVariation = Math.max(...accuracyResults.map(r => r.accuracy)) - Math.min(...accuracyResults.map(r => r.accuracy));
-
- expect(avgAccuracy).toBeGreaterThanOrEqual(0.70);
- expect(maxVariation).toBeLessThanOrEqual(0.20); // Consistent across distributions
-
- benchmarkResults.push({
- testName: 'Distribution Robustness',
- metrics: {
- accuracy: avgAccuracy,
- precision: 0,
- recall: 0,
- f1Score: 0,
- auc: 0,
- latency: accuracyResults.reduce((sum, r) => sum + r.predictionTime, 0) / accuracyResults.length,
- throughput: 0,
- memoryUsage: tf.memory().numBytes
- },
- passed: avgAccuracy >= 0.70 && maxVariation <= 0.20,
- details: { accuracyResults, maxVariation }
- });
- });
- });
-
- describe('Latency Benchmarks', () => {
- it('should meet single prediction latency targets', async () => {
- const testInput = tf.randomNormal([1, 20]);
- const iterations = 100;
- const latencies = [];
-
- for (let i = 0; i < iterations; i++) {
- const startTime = performance.now();
- const prediction = await ensemble.predict(testInput);
- const latency = performance.now() - startTime;
-
- latencies.push(latency);
- prediction.prediction.dispose();
- }
-
- const avgLatency = latencies.reduce((sum, l) => sum + l, 0) / latencies.length;
- const p95Latency = latencies.sort((a, b) => a - b)[Math.floor(0.95 * latencies.length)];
- const p99Latency = latencies.sort((a, b) => a - b)[Math.floor(0.99 * latencies.length)];
-
- benchmarkResults.push({
- testName: 'Single Prediction Latency',
- metrics: {
- accuracy: 0,
- precision: 0,
- recall: 0,
- f1Score: 0,
- auc: 0,
- latency: avgLatency,
- throughput: 1000 / avgLatency, // predictions per second
- memoryUsage: tf.memory().numBytes
- },
- passed: avgLatency <= 100 && p95Latency <= 200,
- details: { avgLatency, p95Latency, p99Latency, iterations }
- });
-
- expect(avgLatency).toBeLessThanOrEqual(150); // 150ms average
- expect(p95Latency).toBeLessThanOrEqual(250); // 250ms p95
-
- testInput.dispose();
- });
-
- it('should handle batch predictions efficiently', async () => {
- const batchSizes = [1, 10, 50, 100, 500];
- const batchResults = [];
-
- for (const batchSize of batchSizes) {
- const testInput = tf.randomNormal([batchSize, 20]);
-
- const startTime = performance.now();
- const prediction = await ensemble.predict(testInput);
- const totalTime = performance.now() - startTime;
-
- const timePerSample = totalTime / batchSize;
- const samplesPerSecond = 1000 / timePerSample;
-
- batchResults.push({
- batchSize,
- totalTime,
- timePerSample,
- samplesPerSecond
- });
-
- prediction.prediction.dispose();
- testInput.dispose();
- }
-
- // Batch processing should be more efficient than single predictions
- const singleSampleTime = batchResults.find(r => r.batchSize === 1)?.timePerSample || 100;
- const largeBatchTime = batchResults.find(r => r.batchSize === 500)?.timePerSample || 100;
-
- expect(largeBatchTime).toBeLessThan(singleSampleTime * 0.5); // At least 50% improvement
-
- benchmarkResults.push({
- testName: 'Batch Processing Efficiency',
- metrics: {
- accuracy: 0,
- precision: 0,
- recall: 0,
- f1Score: 0,
- auc: 0,
- latency: largeBatchTime,
- throughput: batchResults.find(r => r.batchSize === 500)?.samplesPerSecond || 0,
- memoryUsage: tf.memory().numBytes
- },
- passed: largeBatchTime < singleSampleTime * 0.5,
- details: { batchResults, efficiencyGain: singleSampleTime / largeBatchTime }
- });
- });
- });
-
- describe('Throughput Benchmarks', () => {
- it('should achieve target throughput under sustained load', async () => {
- const duration = 10000; // 10 seconds
- const batchSize = 50;
- let totalPredictions = 0;
- const startTime = Date.now();
-
- while (Date.now() - startTime < duration) {
- const testInput = tf.randomNormal([batchSize, 20]);
- const prediction = await ensemble.predict(testInput);
-
- totalPredictions += batchSize;
-
- prediction.prediction.dispose();
- testInput.dispose();
- }
-
- const actualDuration = Date.now() - startTime;
- const predictionsPerSecond = (totalPredictions * 1000) / actualDuration;
-
- benchmarkResults.push({
- testName: 'Sustained Throughput',
- metrics: {
- accuracy: 0,
- precision: 0,
- recall: 0,
- f1Score: 0,
- auc: 0,
- latency: 0,
- throughput: predictionsPerSecond,
- memoryUsage: tf.memory().numBytes
- },
- passed: predictionsPerSecond >= 100, // Target: 100 predictions/second
- details: {
- totalPredictions,
- actualDuration,
- targetThroughput: 100
- }
- });
-
- expect(predictionsPerSecond).toBeGreaterThanOrEqual(50); // Minimum acceptable
- logger.info(`Achieved throughput: ${predictionsPerSecond.toFixed(2)} predictions/second`);
- });
-
- it('should maintain throughput with concurrent requests', async () => {
- const concurrentRequests = 20;
- const predictionsPerRequest = 25;
-
- const startTime = Date.now();
-
- const promises = Array.from({ length: concurrentRequests }, async () => {
- const testInput = tf.randomNormal([predictionsPerRequest, 20]);
- const prediction = await ensemble.predict(testInput);
-
- testInput.dispose();
- const result = prediction.prediction;
- prediction.prediction = null; // Prevent disposal in cleanup
- return result;
- });
-
- const results = await Promise.all(promises);
- const totalTime = Date.now() - startTime;
-
- const totalPredictions = concurrentRequests * predictionsPerRequest;
- const concurrentThroughput = (totalPredictions * 1000) / totalTime;
-
- benchmarkResults.push({
- testName: 'Concurrent Throughput',
- metrics: {
- accuracy: 0,
- precision: 0,
- recall: 0,
- f1Score: 0,
- auc: 0,
- latency: totalTime / concurrentRequests,
- throughput: concurrentThroughput,
- memoryUsage: tf.memory().numBytes
- },
- passed: concurrentThroughput >= 80,
- details: {
- concurrentRequests,
- predictionsPerRequest,
- totalTime,
- targetThroughput: 80
- }
- });
-
- expect(concurrentThroughput).toBeGreaterThanOrEqual(40); // Minimum with concurrency
-
- // Cleanup
- results.forEach(result => result?.dispose());
- });
- });
-
- describe('Memory Usage Benchmarks', () => {
- it('should maintain reasonable memory usage', async () => {
- const initialMemory = tf.memory();
- const testInput = tf.randomNormal([100, 20]);
-
- // Make multiple predictions to check for memory leaks
- for (let i = 0; i < 50; i++) {
- const prediction = await ensemble.predict(testInput);
- prediction.prediction.dispose();
- }
-
- const finalMemory = tf.memory();
- const memoryIncrease = finalMemory.numBytes - initialMemory.numBytes;
- const memoryLeakRate = memoryIncrease / 50; // Per prediction
-
- benchmarkResults.push({
- testName: 'Memory Usage',
- metrics: {
- accuracy: 0,
- precision: 0,
- recall: 0,
- f1Score: 0,
- auc: 0,
- latency: 0,
- throughput: 0,
- memoryUsage: finalMemory.numBytes
- },
- passed: memoryLeakRate < 1024 * 1024, // Less than 1MB per prediction
- details: {
- initialMemory: initialMemory.numBytes,
- finalMemory: finalMemory.numBytes,
- memoryIncrease,
- memoryLeakRate
- }
- });
-
- expect(memoryLeakRate).toBeLessThan(2 * 1024 * 1024); // Less than 2MB per prediction
-
- testInput.dispose();
- });
- });
-});
-
-// Helper Functions
-
-async function createOptimizedModel(name: string): Promise<tf.LayersModel> {
- const model = tf.sequential({
- layers: [
- tf.layers.dense({ inputShape: [20], units: 128, activation: 'relu' }),
- tf.layers.batchNormalization(),
- tf.layers.dropout({ rate: 0.2 }),
- tf.layers.dense({ units: 64, activation: 'relu' }),
- tf.layers.batchNormalization(),
- tf.layers.dropout({ rate: 0.2 }),
- tf.layers.dense({ units: 32, activation: 'relu' }),
- tf.layers.dense({ units: 5, activation: 'softmax' })
- ]
- });
-
- model.compile({
- optimizer: tf.train.adam(0.001),
- loss: 'categoricalCrossentropy',
- metrics: ['accuracy']
- });
-
- // Pre-train with synthetic data for better benchmarking
- const syntheticData = generateClassificationData(1000, 20, 5);
- await model.fit(syntheticData.inputs, syntheticData.labels, {
- epochs: 5,
- batchSize: 32,
- verbose: 0
- });
-
- syntheticData.inputs.dispose();
- syntheticData.labels.dispose();
-
- return model;
-}
-
-function generateClassificationData(samples: number, features: number, classes: number) {
- const inputs = tf.randomNormal([samples, features]);
- const labels = tf.oneHot(tf.randomUniform([samples], 0, classes, 'int32'), classes);
- return { inputs, labels };
-}
-
-function generateDataWithDistribution(samples: number, features: number, classes: number, distribution: string) {
- let inputs: tf.Tensor;
-
- switch (distribution) {
- case 'uniform':
- inputs = tf.randomUniform([samples, features], -2, 2);
- break;
- case 'skewed':
- inputs = tf.pow(tf.randomNormal([samples, features]), tf.scalar(3));
- break;
- default:
- inputs = tf.randomNormal([samples, features]);
- }
-
- const labels = tf.oneHot(tf.randomUniform([samples], 0, classes, 'int32'), classes);
- return { inputs, labels };
-}
-
-async function calculateClassificationMetrics(predictions: tf.Tensor[], targets: tf.Tensor[]): Promise<Omit<PerformanceMetrics, 'latency' | 'throughput' | 'memoryUsage'>> {
- // Concatenate all predictions and targets
- const allPredictions = tf.concat(predictions);
- const allTargets = tf.concat(targets);
-
- // Calculate accuracy
- const accuracy = await calculateAccuracy(allPredictions, allTargets);
-
- // Calculate precision, recall, and F1 (simplified for multi-class)
- const precision = await calculatePrecision(allPredictions, allTargets);
- const recall = await calculateRecall(allPredictions, allTargets);
- const f1Score = 2 * (precision * recall) / (precision + recall) || 0;
-
- // Calculate AUC (simplified)
- const auc = await calculateAUC(allPredictions, allTargets);
-
- allPredictions.dispose();
- allTargets.dispose();
-
- return { accuracy, precision, recall, f1Score, auc };
-}
-
-async function calculateAccuracy(predictions: tf.Tensor, targets: tf.Tensor): Promise<number> {
- const predClasses = tf.argMax(predictions, -1);
- const targetClasses = tf.argMax(targets, -1);
- const correct = tf.equal(predClasses, targetClasses);
- const accuracy = tf.mean(tf.cast(correct, 'float32'));
-
- const accuracyValue = await accuracy.data();
-
- predClasses.dispose();
- targetClasses.dispose();
- correct.dispose();
- accuracy.dispose();
-
- return accuracyValue[0];
-}
-
-async function calculatePrecision(predictions: tf.Tensor, targets: tf.Tensor): Promise<number> {
- // Simplified precision calculation for multi-class
- const predClasses = tf.argMax(predictions, -1);
- const targetClasses = tf.argMax(targets, -1);
-
- // For simplicity, calculate macro-averaged precision
- const numClasses = targets.shape[targets.shape.length - 1];
- let totalPrecision = 0;
-
- for (let classIdx = 0; classIdx < numClasses; classIdx++) {
- const predPositive = tf.equal(predClasses, tf.scalar(classIdx));
- const targetPositive = tf.equal(targetClasses, tf.scalar(classIdx));
- const truePositive = tf.logicalAnd(predPositive, targetPositive);
-
- const tp = tf.sum(tf.cast(truePositive, 'float32'));
- const pp = tf.sum(tf.cast(predPositive, 'float32'));
-
- const precision = tf.div(tp, tf.maximum(pp, tf.scalar(1e-7)));
- const precisionValue = await precision.data();
-
- totalPrecision += precisionValue[0];
-
- predPositive.dispose();
- targetPositive.dispose();
- truePositive.dispose();
- tp.dispose();
- pp.dispose();
- precision.dispose();
- }
-
- predClasses.dispose();
- targetClasses.dispose();
-
- return totalPrecision / numClasses;
-}
-
-async function calculateRecall(predictions: tf.Tensor, targets: tf.Tensor): Promise<number> {
- // Simplified recall calculation for multi-class
- const predClasses = tf.argMax(predictions, -1);
- const targetClasses = tf.argMax(targets, -1);
-
- const numClasses = targets.shape[targets.shape.length - 1];
- let totalRecall = 0;
-
- for (let classIdx = 0; classIdx < numClasses; classIdx++) {
- const predPositive = tf.equal(predClasses, tf.scalar(classIdx));
- const targetPositive = tf.equal(targetClasses, tf.scalar(classIdx));
- const truePositive = tf.logicalAnd(predPositive, targetPositive);
-
- const tp = tf.sum(tf.cast(truePositive, 'float32'));
- const ap = tf.sum(tf.cast(targetPositive, 'float32'));
-
- const recall = tf.div(tp, tf.maximum(ap, tf.scalar(1e-7)));
- const recallValue = await recall.data();
-
- totalRecall += recallValue[0];
-
- predPositive.dispose();
- targetPositive.dispose();
- truePositive.dispose();
- tp.dispose();
- ap.dispose();
- recall.dispose();
- }
-
- predClasses.dispose();
- targetClasses.dispose();
-
- return totalRecall / numClasses;
-}
-
-async function calculateAUC(predictions: tf.Tensor, targets: tf.Tensor): Promise<number> {
- // Simplified AUC calculation - in production, would use proper ROC calculation
- const accuracy = await calculateAccuracy(predictions, targets);
- return Math.min(1.0, accuracy * 1.1); // Approximation for testing
-}
-
-function generatePerformanceReport(results: BenchmarkResult[]): void {
- const report = {
- timestamp: new Date().toISOString(),
- summary: {
- totalTests: results.length,
- passedTests: results.filter(r => r.passed).length,
- failedTests: results.filter(r => r.passed === false).length
- },
- results: results.map(result => ({
- testName: result.testName,
- passed: result.passed,
- metrics: result.metrics,
- details: result.details
- }))
- };
-
- logger.info('Performance Benchmark Report Generated:', report);
-
- // In a real implementation, this would write to a file
- console.log('\n=== PERFORMANCE BENCHMARK REPORT ===');
- console.log(`Total Tests: ${report.summary.totalTests}`);
- console.log(`Passed: ${report.summary.passedTests}`);
- console.log(`Failed: ${report.summary.failedTests}`);
- console.log('\nDetailed Results:');
-
- results.forEach(result => {
- console.log(`\n${result.testName}: ${result.passed ? 'PASS' : 'FAIL'}`);
- if (result.metrics.accuracy > 0) console.log(` Accuracy: ${result.metrics.accuracy.toFixed(4)}`);
- if (result.metrics.latency > 0) console.log(` Latency: ${result.metrics.latency.toFixed(2)}ms`);
- if (result.metrics.throughput > 0) console.log(` Throughput: ${result.metrics.throughput.toFixed(2)} pred/sec`);
- });
-}
\ No newline at end of file
diff --git a/agentic-flow/src/tests/validation/run-validation.ts b/agentic-flow/src/tests/validation/run-validation.ts
deleted file mode 100644
index c541fee332..0000000000
--- a/agentic-flow/src/tests/validation/run-validation.ts
+++ /dev/null
@@ -1,190 +0,0 @@
-#!/usr/bin/env node
-/**
- * Validation Test Runner
- *
- * Executes the complete MLE-STAR validation suite and generates reports
- */
-
-import { execSync } from 'child_process';
-import * as fs from 'fs';
-import * as path from 'path';
-
-interface ValidationResult {
- timestamp: string;
- testSuite: string;
- totalTests: number;
- passedTests: number;
- failedTests: number;
- coverage: number;
- executionTime: number;
- memoryUsage: {
- peak: number;
- average: number;
- };
-}
-
-class ValidationRunner {
- private results: ValidationResult[] = [];
- private startTime: number = 0;
-
- constructor() {
- this.startTime = Date.now();
- }
-
- async runValidationSuite(): Promise<void> {
- console.log('🚀 Starting MLE-STAR Validation Suite');
- console.log('=====================================\n');
-
- try {
- // Run the test suites
- await this.runTestSuite('mle-star-validation-suite.test.ts', 'Model Ensemble Validation');
- await this.runTestSuite('performance-benchmarks.test.ts', 'Performance Benchmarks');
-
- // Generate final report
- await this.generateFinalReport();
-
- console.log('\n✅ Validation suite completed successfully!');
-
- } catch (error) {
- console.error('\n❌ Validation suite failed:', error);
- process.exit(1);
- }
- }
-
- private async runTestSuite(testFile: string, suiteName: string): Promise<void> {
- console.log(`\n📋 Running ${suiteName}...`);
-
- const startTime = Date.now();
- const initialMemory = process.memoryUsage();
-
- try {
- // Run jest with specific test file
- const command = `npx jest --config=src/tests/validation/jest.config.js --testPathPattern=${testFile} --verbose --coverage`;
-
- const output = execSync(command, {
- cwd: process.cwd(),
- encoding: 'utf8',
- stdio: 'pipe'
- });
-
- const executionTime = Date.now() - startTime;
- const finalMemory = process.memoryUsage();
-
- // Parse test results from output
- const testResults = this.parseTestOutput(output);
-
- const result: ValidationResult = {
- timestamp: new Date().toISOString(),
- testSuite: suiteName,
- totalTests: testResults.total,
- passedTests: testResults.passed,
- failedTests: testResults.failed,
- coverage: testResults.coverage,
- executionTime,
- memoryUsage: {
- peak: Math.max(initialMemory.heapUsed, finalMemory.heapUsed),
- average: (initialMemory.heapUsed + finalMemory.heapUsed) / 2
- }
- };
-
- this.results.push(result);
-
- console.log(`✅ ${suiteName} completed:`);
- console.log(` Tests: ${testResults.passed}/${testResults.total} passed`);
- console.log(` Coverage: ${testResults.coverage}%`);
- console.log(` Time: ${executionTime}ms`);
-
- } catch (error) {
- console.error(`❌ ${suiteName} failed:`, error);
- throw error;
- }
- }
-
- private parseTestOutput(output: string): { total: number; passed: number; failed: number; coverage: number } {
- // Parse Jest output for test results
- const testMatch = output.match(/Tests:\s+(\d+)\s+passed,\s+(\d+)\s+total/);
- const coverageMatch = output.match(/All files[^|]*\|\s*(\d+(?:\.\d+)?)/);
-
- const passed = testMatch ? parseInt(testMatch[1]) : 0;
- const total = testMatch ? parseInt(testMatch[2]) : 0;
- const failed = total - passed;
- const coverage = coverageMatch ? parseFloat(coverageMatch[1]) : 0;
-
- return { total, passed, failed, coverage };
- }
-
- private async generateFinalReport(): Promise<void> {
- console.log('\n📊 Generating validation report...');
-
- const totalTests = this.results.reduce((sum, r) => sum + r.totalTests, 0);
- const totalPassed = this.results.reduce((sum, r) => sum + r.passedTests, 0);
- const totalFailed = this.results.reduce((sum, r) => sum + r.failedTests, 0);
- const avgCoverage = this.results.reduce((sum, r) => sum + r.coverage, 0) / this.results.length;
- const totalTime = Date.now() - this.startTime;
-
- const report = {
- summary: {
- timestamp: new Date().toISOString(),
- totalTests,
- passedTests: totalPassed,
- failedTests: totalFailed,
- successRate: (totalPassed / totalTests) * 100,
- averageCoverage: avgCoverage,
- totalExecutionTime: totalTime,
- status: totalFailed === 0 ? 'PASSED' : 'FAILED'
- },
- testSuites: this.results,
- recommendations: this.generateRecommendations()
- };
-
- // Write detailed JSON report
- const reportPath = path.join(process.cwd(), 'validation-results.json');
- fs.writeFileSync(reportPath, JSON.stringify(report, null, 2));
-
- // Write summary to console
- console.log('\n🎯 VALIDATION SUMMARY');
- console.log('=====================');
- console.log(`Status: ${report.summary.status}`);
- console.log(`Tests: ${report.summary.passedTests}/${report.summary.totalTests} passed`);
- console.log(`Success Rate: ${report.summary.successRate.toFixed(1)}%`);
- console.log(`Coverage: ${report.summary.averageCoverage.toFixed(1)}%`);
- console.log(`Total Time: ${report.summary.totalExecutionTime}ms`);
- console.log(`\nDetailed report saved to: ${reportPath}`);
- }
-
- private generateRecommendations(): string[] {
- const recommendations: string[] = [];
-
- // Analyze results and generate recommendations
- const failedSuites = this.results.filter(r => r.failedTests > 0);
- if (failedSuites.length > 0) {
- recommendations.push('Address failing tests before production deployment');
- }
-
- const lowCoverage = this.results.filter(r => r.coverage < 80);
- if (lowCoverage.length > 0) {
- recommendations.push('Improve test coverage for critical components');
- }
-
- const slowSuites = this.results.filter(r => r.executionTime > 30000);
- if (slowSuites.length > 0) {
- recommendations.push('Optimize performance of slow test suites');
- }
-
- if (recommendations.length === 0) {
- recommendations.push('System is ready for production deployment');
- recommendations.push('Consider implementing continuous validation pipeline');
- recommendations.push('Set up monitoring and alerting for production environment');
- }
-
- return recommendations;
- }
-}
-
-// Run validation if called directly
-if (require.main === module) {
- const runner = new ValidationRunner();
- runner.runValidationSuite().catch(console.error);
-}
-
-export { ValidationRunner };
\ No newline at end of file
diff --git a/agentic-flow/src/tests/validation/setup.ts b/agentic-flow/src/tests/validation/setup.ts
deleted file mode 100644
index cdbd68843f..0000000000
--- a/agentic-flow/src/tests/validation/setup.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Test setup for MLE-STAR validation suite
- */
-
-import '@tensorflow/tfjs-node';
-import { logger } from '../../utils/logger';
-
-// Global test configuration
-beforeAll(async () => {
- // Configure logger for testing
- logger.level = 'error'; // Suppress info/debug logs during tests
-
- // Global timeout for ML operations
- jest.setTimeout(60000);
-
- // Suppress TensorFlow warnings
- console.warn = jest.fn();
-});
-
-afterAll(async () => {
- // Global cleanup
- const tf = require('@tensorflow/tfjs-node');
- tf.disposeVariables();
-
- // Restore console
- jest.restoreAllMocks();
-});
\ No newline at end of file
diff --git a/archive/CLEANUP_SUMMARY.md b/archive/CLEANUP_SUMMARY.md
deleted file mode 100644
index d4b939cc2a..0000000000
--- a/archive/CLEANUP_SUMMARY.md
+++ /dev/null
@@ -1,78 +0,0 @@
-# Claude-Flow Root Directory Cleanup Summary
-
-Date: 2025-07-04
-
-## 🧹 Cleanup Actions Performed
-
-### 📁 Files Moved to Archive
-
-#### Test Reports (moved to `archive/reports/`)
-- CONFIGURATION_SUMMARY.md
-- DEPENDENCY_RESOLUTION_GUIDE.md
-- DOCKER_TEST_REPORT.md
-- ERROR_HANDLING_IMPLEMENTATION_REPORT.md
-- QA_TEST_REPORT.md
-- ROLLBACK_PLAN.md
-- WEB_UI_IMPLEMENTATION.md
-- mcp-validation-report.md
-- ruv-swarm-performance-analysis.md
-- deployment-audit.log
-
-#### Test Files (moved to `archive/test-files/`)
-- test_comprehensive_ui.js
-- test_concurrent_ops.js
-- test_error_handling.js
-- test_output_streaming.js
-- test_performance.js
-- test_websocket.js
-- test-web-console.cjs
-- terminal-test.cjs
-- ui_pid.txt
-
-#### Debug Documentation (moved to `archive/debug-docs/`)
-- debug-findings.md
-- debug-hooks-system-SOLUTION.md
-
-#### Old Releases (moved to `archive/releases/`)
-- claude-flow-1.0.70.tgz (58MB)
-
-### 🗑️ Files Removed
-- bin/*.tmp* (temporary files)
-- bin/*backup* (backup files)
-
-## ✅ Essential Files Kept in Root
-
-### Documentation
-- **README.md** - Main project documentation (v2.0.0)
-- **CHANGELOG.md** - Version history and release notes
-- **CLAUDE.md** - Claude Code integration guide (785 lines)
-- **LICENSE** - MIT license
-
-### Configuration
-- package.json & package-lock.json
-- .gitignore, .npmignore
-- .releaserc.json, .swcrc
-- tsconfig.json, jest.config.js
-- deno.json, codecov.yml
-
-### Entry Points
-- cli.js - Node.js entry point
-- claude-flow - Local wrapper script
-- bin/claude-flow - Main executable
-
-## 📊 Space Saved
-
-- Removed 58MB old release file
-- Cleaned up 11 test report files
-- Moved 8 test JavaScript files
-- Removed temporary bin files
-
-## 🎯 Result
-
-The root directory is now clean and organized with only essential files for:
-- Project documentation
-- Configuration
-- Main entry points
-- Package management
-
-All test files, reports, and debug documentation are preserved in the `archive/` directory for reference.
\ No newline at end of file
diff --git a/archive/debug-docs/debug-findings.md b/archive/debug-docs/debug-findings.md
deleted file mode 100644
index 9ccd108409..0000000000
--- a/archive/debug-docs/debug-findings.md
+++ /dev/null
@@ -1 +0,0 @@
-DEBUG FINDING: Found the root cause of require is not defined error
diff --git a/archive/debug-docs/debug-hooks-system-SOLUTION.md b/archive/debug-docs/debug-hooks-system-SOLUTION.md
deleted file mode 100644
index 718e012d01..0000000000
--- a/archive/debug-docs/debug-hooks-system-SOLUTION.md
+++ /dev/null
@@ -1,139 +0,0 @@
-# Hooks System "require is not defined" Error - SOLUTION
-
-## Problem
-The ruv-swarm hooks system was failing with `require is not defined` error when running commands like:
-```bash
-npx ruv-swarm hook pre-task --description "task"
-```
-
-## Root Cause Analysis
-The issue was a **CommonJS vs ES Modules compatibility conflict**:
-
-1. **Package Configuration**: The `ruv-swarm` npm package is configured as ES modules with `"type": "module"` in `package.json`
-2. **Legacy Code**: The hooks system was still using CommonJS syntax (`require()` and `module.exports`)
-3. **Import Conflicts**: ES modules projects cannot use `require()` directly without dynamic imports
-
-## Files Affected
-- `/workspaces/ruv-FANN/ruv-swarm/npm/bin/ruv-swarm-clean.js` (lines 756, 765, 800, 828)
-- `/workspaces/ruv-FANN/ruv-swarm/npm/src/hooks/cli.js` (lines 8, 22, 76-80)
-- `/workspaces/ruv-FANN/ruv-swarm/npm/src/hooks/index.js` (lines 6-12, 1705-1709)
-
-## Solution Implementation
-
-### 1. Fixed Main CLI Binary
-**File**: `bin/ruv-swarm-clean.js`
-
-**Before** (CommonJS):
-```javascript
-async function handleHook(args) {
- const hooksCLI = require('../src/hooks/cli');
- return hooksCLI.main();
-}
-```
-
-**After** (ES Modules):
-```javascript
-async function handleHook(args) {
- const { main: hooksCLIMain } = await import('../src/hooks/cli.js');
- return hooksCLIMain();
-}
-```
-
-### 2. Converted Hooks CLI Module
-**File**: `src/hooks/cli.js`
-
-**Before** (CommonJS):
-```javascript
-const hooks = require('./index');
-// ...
-module.exports = { main };
-```
-
-**After** (ES Modules):
-```javascript
-import { handleHook } from './index.js';
-// ...
-export { main };
-```
-
-### 3. Converted Hooks Implementation
-**File**: `src/hooks/index.js`
-
-**Before** (CommonJS):
-```javascript
-const fs = require('fs').promises;
-const path = require('path');
-const { execSync } = require('child_process');
-// ...
-module.exports = new RuvSwarmHooks();
-```
-
-**After** (ES Modules):
-```javascript
-import { promises as fs } from 'fs';
-import path from 'path';
-import { execSync } from 'child_process';
-import { fileURLToPath } from 'url';
-
-const __filename = fileURLToPath(import.meta.url);
-const __dirname = path.dirname(__filename);
-// ...
-const hooksInstance = new RuvSwarmHooks();
-export const handleHook = (hookType, options) => hooksInstance.handleHook(hookType, options);
-export default hooksInstance;
-```
-
-## Key Changes Made
-
-1. **Dynamic Imports**: Replaced `require()` with `await import()` for ES module compatibility
-2. **Import Statements**: Converted all `require()` statements to ES6 `import` statements
-3. **Export Statements**: Converted `module.exports` to ES6 `export` statements
-4. **Path Handling**: Added proper `__filename` and `__dirname` handling for ES modules
-5. **File Extensions**: Added `.js` extensions to relative imports
-
-## Testing & Validation
-
-All hooks now work correctly:
-
-```bash
-# Notification hook
-npx ruv-swarm hook notification --message "Test hook fix"
-✅ Returns: {"continue": true, "notification": {...}, "handled": true}
-
-# Pre-task hook
-npx ruv-swarm hook pre-task --description "Debug test" --auto-spawn-agents false
-✅ Returns: {"continue": true, "reason": "Task prepared", "metadata": {...}}
-
-# Post-edit hook
-npx ruv-swarm hook post-edit --file "test.js" --auto-format true --train-patterns true
-✅ Returns: {"continue": true, "formatted": false, "training": {...}}
-
-# Post-task completion
-npx ruv-swarm hook post-task --task-id "debug-hooks-system" --analyze-performance true
-✅ Returns: {"continue": true, "performance": {...}, "metadata": {...}}
-```
-
-## Impact
-- ✅ **Fixed**: All hook commands now function correctly
-- ✅ **Compatible**: ES modules compliance maintained throughout
-- ✅ **Robust**: Error handling preserved in ES module conversion
-- ✅ **Performance**: No performance degradation detected
-
-## Future Prevention
-To prevent similar issues:
-
-1. **Consistency**: Ensure all new modules use ES syntax when `"type": "module"` is set
-2. **Linting**: Add ESLint rules to catch CommonJS syntax in ES module projects
-3. **Testing**: Include hook system tests in CI/CD pipeline
-4. **Documentation**: Update development guides with ES module requirements
-
-## Technical Notes
-- ES modules require explicit file extensions (`.js`) in imports
-- `__dirname` and `__filename` are not available by default in ES modules
-- Dynamic imports return promises and must be awaited
-- Export syntax changes from `module.exports = x` to `export { x }` or `export default x`
-
----
-**Resolution Status**: ✅ COMPLETE
-**Testing Status**: ✅ VERIFIED
-**Documentation**: ✅ UPDATED
\ No newline at end of file
diff --git a/archive/infrastructure/README.md b/archive/infrastructure/README.md
deleted file mode 100644
index a773a8cb87..0000000000
--- a/archive/infrastructure/README.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# Infrastructure
-
-This directory contains all infrastructure-related configurations and tools for Claude Flow.
-
-## Structure
-
-- **docker/**: Docker-related configurations and testing infrastructure
- - `Dockerfile`: Main Docker image for Claude Flow
- - `docker-compose.yml`: Docker Compose configuration for the entire stack
- - **testing/**: Docker-based testing environment
- - Test-specific Docker configurations
- - Scripts for running tests in containerized environments
- - Performance monitoring tools
- - Test results and logs
-
-## Usage
-
-### Running with Docker Compose
-
-```bash
-cd infrastructure/docker
-docker-compose up -d
-```
-
-### Running Tests
-
-```bash
-cd infrastructure/docker/testing
-./scripts/run-all-tests.sh
-```
-
-For more detailed information, see the README files in each subdirectory.
\ No newline at end of file
diff --git a/archive/infrastructure/docker/Dockerfile b/archive/infrastructure/docker/Dockerfile
deleted file mode 100644
index e0796985d2..0000000000
--- a/archive/infrastructure/docker/Dockerfile
+++ /dev/null
@@ -1,76 +0,0 @@
-# Claude Flow Docker Image
-# Multi-stage build for optimal size and security
-
-# Stage 1: Build environment
-FROM node:20-alpine AS builder
-
-# Install build dependencies
-RUN apk add --no-cache \
- git \
- python3 \
- make \
- g++ \
- bash
-
-# Set working directory
-WORKDIR /app
-
-# Copy package files
-COPY package*.json ./
-
-# Install dependencies
-RUN npm ci --only=production && \
- npm cache clean --force
-
-# Copy source code
-COPY . .
-
-# Build the project
-RUN npm run build || echo "No build step"
-
-# Stage 2: Runtime environment
-FROM node:20-alpine
-
-# Install runtime dependencies
-RUN apk add --no-cache \
- git \
- bash \
- curl \
- jq
-
-# Create non-root user
-RUN addgroup -g 1001 -S claude && \
- adduser -S claude -u 1001
-
-# Set working directory
-WORKDIR /app
-
-# Copy from builder
-COPY --from=builder --chown=claude:claude /app/node_modules ./node_modules
-COPY --from=builder --chown=claude:claude /app/package*.json ./
-COPY --from=builder --chown=claude:claude /app/bin ./bin
-COPY --from=builder --chown=claude:claude /app/src ./src
-COPY --from=builder --chown=claude:claude /app/cli.js ./cli.js
-
-# Create directories for user
-RUN mkdir -p /home/claude/.claude-flow && \
- chown -R claude:claude /home/claude
-
-# Switch to non-root user
-USER claude
-
-# Set environment variables
-ENV NODE_ENV=production \
- CLAUDE_FLOW_HOME=/home/claude/.claude-flow \
- PATH="/app/bin:${PATH}"
-
-# Expose port for MCP server
-EXPOSE 3000
-
-# Health check
-HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
- CMD node -e "console.log('healthy')" || exit 1
-
-# Default command
-ENTRYPOINT ["claude-flow"]
-CMD ["--help"]
\ No newline at end of file
diff --git a/archive/infrastructure/docker/README.md b/archive/infrastructure/docker/README.md
deleted file mode 100644
index d8097f9a02..0000000000
--- a/archive/infrastructure/docker/README.md
+++ /dev/null
@@ -1,80 +0,0 @@
-# Docker Infrastructure
-
-This directory contains Docker configurations for Claude Flow.
-
-## Files
-
-- `Dockerfile`: Main Docker image definition for Claude Flow
-- `docker-compose.yml`: Complete stack configuration including:
- - Claude Flow main service
- - MCP Server
- - ruv-swarm integration
- - Development environment
- - Test runner
-
-## Directory Structure
-
-- **testing/**: Docker-based testing infrastructure
- - Contains test-specific Docker configurations
- - Automated testing scripts
- - Performance monitoring tools
-
-## Quick Start
-
-### Build and Run
-
-```bash
-# Build all services
-docker-compose build
-
-# Start all services
-docker-compose up -d
-
-# View logs
-docker-compose logs -f
-
-# Stop all services
-docker-compose down
-```
-
-### Development
-
-```bash
-# Start development environment
-docker-compose run --rm dev bash
-
-# Run tests
-docker-compose run --rm test
-```
-
-### Environment Variables
-
-Required environment variables:
-- `GITHUB_TOKEN`: GitHub access token
-- `NODE_ENV`: Environment (production/development/test)
-- `MCP_SERVER_URL`: MCP server URL (default: http://mcp-server:3001)
-
-## Services
-
-### claude-flow
-- Main Claude Flow service
-- Port: 3000
-- Volume: claude-flow-data
-
-### mcp-server
-- MCP Server for Claude Flow
-- Port: 3001
-- Volume: mcp-data
-
-### ruv-swarm
-- ruv-swarm integration service
-- Depends on: claude-flow, mcp-server
-- Volume: swarm-data
-
-### dev
-- Development environment with hot reload
-- Interactive shell access
-
-### test
-- Automated test runner
-- CI-friendly configuration
\ No newline at end of file
diff --git a/archive/infrastructure/docker/docker-compose.yml b/archive/infrastructure/docker/docker-compose.yml
deleted file mode 100644
index 0198fb8fed..0000000000
--- a/archive/infrastructure/docker/docker-compose.yml
+++ /dev/null
@@ -1,115 +0,0 @@
-version: '3.8'
-
-services:
- # Claude Flow main service
- claude-flow:
- build:
- context: ../..
- dockerfile: infrastructure/docker/Dockerfile
- image: claude-flow:latest
- container_name: claude-flow
- restart: unless-stopped
- environment:
- - NODE_ENV=production
- - GITHUB_TOKEN=${GITHUB_TOKEN}
- - CLAUDE_FLOW_HOME=/home/claude/.claude-flow
- - MCP_SERVER_URL=http://mcp-server:3001
- volumes:
- - claude-flow-data:/home/claude/.claude-flow
- - ../../workspace:/workspace
- networks:
- - claude-flow-network
- command: ["start", "--mode", "server"]
- ports:
- - "3000:3000"
-
- # MCP Server for Claude Flow
- mcp-server:
- build:
- context: ../..
- dockerfile: infrastructure/docker/Dockerfile
- image: claude-flow:latest
- container_name: claude-flow-mcp
- restart: unless-stopped
- environment:
- - NODE_ENV=production
- - MCP_MODE=server
- - MCP_PORT=3001
- volumes:
- - mcp-data:/home/claude/.mcp
- networks:
- - claude-flow-network
- command: ["mcp", "start", "--port", "3001"]
- ports:
- - "3001:3001"
-
- # ruv-swarm integration
- ruv-swarm:
- image: node:20-alpine
- container_name: ruv-swarm
- working_dir: /app
- environment:
- - NODE_ENV=production
- - SWARM_MODE=distributed
- - CLAUDE_FLOW_URL=http://claude-flow:3000
- volumes:
- - ../../ruv-swarm:/app
- - swarm-data:/data
- networks:
- - claude-flow-network
- command: ["npx", "ruv-swarm", "mcp", "start"]
- depends_on:
- - claude-flow
- - mcp-server
-
- # Development environment
- dev:
- build:
- context: ../..
- dockerfile: infrastructure/docker/Dockerfile
- target: builder
- image: claude-flow:dev
- container_name: claude-flow-dev
- environment:
- - NODE_ENV=development
- volumes:
- - ../..:/app
- - /app/node_modules
- networks:
- - claude-flow-network
- command: ["bash"]
- stdin_open: true
- tty: true
-
- # Test runner
- test:
- build:
- context: ../..
- dockerfile: infrastructure/docker/Dockerfile
- target: builder
- image: claude-flow:test
- container_name: claude-flow-test
- environment:
- - NODE_ENV=test
- - CI=true
- volumes:
- - ../..:/app
- - /app/node_modules
- networks:
- - claude-flow-network
- command: ["npm", "test"]
-
-volumes:
- claude-flow-data:
- driver: local
- mcp-data:
- driver: local
- swarm-data:
- driver: local
-
-networks:
- claude-flow-network:
- driver: bridge
- ipam:
- config:
- - subnet: 172.20.0.0/16
\ No newline at end of file
diff --git a/archive/infrastructure/docker/testing/Dockerfile b/archive/infrastructure/docker/testing/Dockerfile
deleted file mode 100644
index 2de5463ef8..0000000000
--- a/archive/infrastructure/docker/testing/Dockerfile
+++ /dev/null
@@ -1,165 +0,0 @@
-# Multi-stage Dockerfile for claude-code-flow testing
-# Optimized for both development and production environments
-
-# =================== BASE STAGE ===================
-FROM node:20-alpine AS base
-
-# Install system dependencies
-RUN apk add --no-cache \
- git \
- python3 \
- py3-pip \
- make \
- g++ \
- sqlite \
- bash \
- curl \
- deno \
- npm \
- && rm -rf /var/cache/apk/*
-
-# Set working directory
-WORKDIR /app
-
-# Copy package files for dependency installation
-COPY package*.json ./
-
-# =================== DEPENDENCIES STAGE ===================
-FROM base AS dependencies
-
-# Install production dependencies
-RUN npm ci --only=production && npm cache clean --force
-
-# Install development dependencies in separate layer
-RUN npm ci --include=dev
-
-# =================== DEVELOPMENT STAGE ===================
-FROM base AS development
-
-# Copy dependencies from dependencies stage
-COPY --from=dependencies /app/node_modules ./node_modules
-
-# Copy source code
-COPY . .
-
-# Create necessary directories
-RUN mkdir -p \
- /app/dist \
- /app/bin \
- /app/logs \
- /app/test-results \
- /app/coverage \
- /app/docker-test/volumes/claude-flow \
- /app/docker-test/volumes/ruv-swarm \
- /app/docker-test/volumes/shared
-
-# Build the application
-RUN npm run build
-
-# Set environment variables
-ENV NODE_ENV=development
-ENV DEBUG=claude-flow:*
-
-# Expose ports for development
-EXPOSE 3000 3001 8080
-
-# Health check
-HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
- CMD curl -f http://localhost:3000/health || exit 1
-
-# Default command for development
-CMD ["npm", "run", "dev"]
-
-# =================== TESTING STAGE ===================
-FROM development AS testing
-
-# Copy test configuration
-COPY jest.config.js ./
-COPY jest.setup.js ./
-COPY tsconfig.json ./
-COPY tests/ ./tests/
-
-# Install test-specific dependencies
-RUN npm install --save-dev @types/jest jest ts-jest
-
-# Create test output directories
-RUN mkdir -p \
- /app/test-results/unit \
- /app/test-results/integration \
- /app/test-results/e2e \
- /app/coverage
-
-# Set test environment
-ENV NODE_ENV=test
-ENV CI=true
-
-# Run tests by default
-CMD ["npm", "test"]
-
-# =================== PRODUCTION STAGE ===================
-FROM node:20-alpine AS production
-
-# Install only runtime dependencies
-RUN apk add --no-cache \
- bash \
- curl \
- sqlite \
- && rm -rf /var/cache/apk/*
-
-WORKDIR /app
-
-# Copy production dependencies
-COPY --from=dependencies /app/node_modules ./node_modules
-
-# Copy built application
-COPY --from=development /app/dist ./dist
-COPY --from=development /app/bin ./bin
-COPY --from=development /app/cli.js ./cli.js
-
-# Copy configuration files
-COPY package*.json ./
-COPY .claude/ ./.claude/
-
-# Create runtime user
-RUN addgroup -g 1001 -S nodejs && \
- adduser -S claude -u 1001 -G nodejs
-
-# Set ownership
-RUN chown -R claude:nodejs /app
-
-# Switch to runtime user
-USER claude
-
-# Set production environment
-ENV NODE_ENV=production
-ENV PORT=3000
-
-# Expose port
-EXPOSE 3000
-
-# Health check
-HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
- CMD curl -f http://localhost:3000/health || exit 1
-
-# Production command
-CMD ["node", "cli.js", "start"]
-
-# =================== SWARM INTEGRATION STAGE ===================
-FROM development AS swarm-integration
-
-# Copy ruv-swarm from local directory
-COPY --from=base /app/ruv-swarm ./ruv-swarm
-
-# Install ruv-swarm globally for MCP integration
-RUN cd ruv-swarm && npm install -g .
-
-# Set up MCP configuration
-RUN mkdir -p ~/.config/claude-code && \
- echo '{"mcpServers": {"ruv-swarm": {"command": "ruv-swarm", "args": ["mcp", "start"]}}}' > ~/.config/claude-code/mcp.json
-
-# Environment for swarm testing
-ENV SWARM_MODE=true
-ENV MCP_ENABLED=true
-
-# Command for swarm testing
-CMD ["npm", "run", "test:swarm"]
\ No newline at end of file
diff --git a/archive/infrastructure/docker/testing/Dockerfile.npm b/archive/infrastructure/docker/testing/Dockerfile.npm
deleted file mode 100644
index cd3cd31310..0000000000
--- a/archive/infrastructure/docker/testing/Dockerfile.npm
+++ /dev/null
@@ -1,22 +0,0 @@
-# Docker environment for testing npm install [email protected]
-FROM node:20-alpine
-
-# Install dependencies
-RUN apk add --no-cache git bash curl jq
-
-# Create test directory
-WORKDIR /test
-
-# Install claude-flow locally via npm
-RUN npm init -y
-RUN npm install [email protected]
-
-# Create test scripts directory
-RUN mkdir -p /test/scripts /test/results /test/logs
-
-# Copy test script
-COPY test-mcp-tools.sh /test/scripts/
-RUN chmod +x /test/scripts/test-mcp-tools.sh
-
-# Default command
-CMD ["/test/scripts/test-mcp-tools.sh", "npm"]
\ No newline at end of file
diff --git a/archive/infrastructure/docker/testing/Dockerfile.npx b/archive/infrastructure/docker/testing/Dockerfile.npx
deleted file mode 100644
index 84a9f73942..0000000000
--- a/archive/infrastructure/docker/testing/Dockerfile.npx
+++ /dev/null
@@ -1,21 +0,0 @@
-# Docker environment for testing npx [email protected]
-FROM node:20-alpine
-
-# Install dependencies
-RUN apk add --no-cache git bash curl jq
-
-# Create test directory
-WORKDIR /test
-
-# Install claude-flow globally via npx (cache it)
-RUN npx [email protected] --version || true
-
-# Create test scripts directory
-RUN mkdir -p /test/scripts /test/results /test/logs
-
-# Copy test script
-COPY test-mcp-tools.sh /test/scripts/
-RUN chmod +x /test/scripts/test-mcp-tools.sh
-
-# Default command
-CMD ["/test/scripts/test-mcp-tools.sh", "npx"]
\ No newline at end of file
diff --git a/archive/infrastructure/docker/testing/IMPLEMENTATION_SUMMARY.md b/archive/infrastructure/docker/testing/IMPLEMENTATION_SUMMARY.md
deleted file mode 100644
index dec21da07e..0000000000
--- a/archive/infrastructure/docker/testing/IMPLEMENTATION_SUMMARY.md
+++ /dev/null
@@ -1,240 +0,0 @@
-# Docker Infrastructure Implementation Summary
-
-## 🎯 Mission Accomplished
-
-I have successfully created a comprehensive Docker testing environment for claude-code-flow and ruv-swarm integration as the Docker Infrastructure Agent in the 3-agent task force.
-
-## 📁 Created Files and Structure
-
-### Core Docker Configuration
-- **`Dockerfile`** - Multi-stage build (base, dependencies, development, testing, production, swarm-integration)
-- **`docker-compose.yml`** - Main orchestration with 7+ services and networking
-- **`docker-compose.override.yml`** - Local development overrides
-- **`docker-compose.test.yml`** - CI/CD optimized testing configuration
-- **`.dockerignore`** - Build context optimization
-
-### Automation Scripts
-- **`scripts/build-and-test.sh`** - Complete build and test pipeline (executable)
-- **`scripts/run-all-tests.sh`** - Comprehensive test runner (executable)
-- **`scripts/performance-monitor.js`** - Real-time performance monitoring (executable)
-- **`scripts/aggregate-test-results.js`** - Test result aggregation (executable)
-
-### Configuration & Documentation
-- **`nginx.conf`** - Load balancer configuration for production
-- **`README.md`** - Comprehensive documentation with usage examples
-- **`IMPLEMENTATION_SUMMARY.md`** - This summary document
-
-### Volume Structure
-```
-volumes/
-├── claude-flow/ # claude-code-flow specific data
-├── ruv-swarm/ # ruv-swarm specific data
-└── shared/ # Cross-container shared data
-```
-
-## 🏗️ Architecture Highlights
-
-### Multi-Stage Docker Build Strategy
-1. **Base Stage** - Common system dependencies and Node.js 20
-2. **Dependencies Stage** - Optimized npm install with layer caching
-3. **Development Stage** - Full dev environment with source mounting
-4. **Testing Stage** - Test-specific tools and configurations
-5. **Production Stage** - Minimal runtime with security hardening
-6. **Swarm Integration Stage** - ruv-swarm MCP integration testing
-
-### Docker Compose Orchestration
-- **7 Main Services**: Development, Testing, Production, Swarm Integration, Databases, Monitoring, Load Balancer
-- **3 Network Profiles**: Default, Testing, Production, Swarm, Monitoring
-- **Custom Bridge Network**: `claude-swarm-network` (172.20.0.0/16)
-- **Volume Management**: Persistent data, cached dependencies, shared resources
-
-### Testing Infrastructure
-- **Unit Tests**: Component-level testing with Jest
-- **Integration Tests**: Service integration with databases
-- **E2E Tests**: End-to-end workflow validation
-- **Swarm Tests**: Multi-agent coordination testing
-- **Performance Tests**: Load testing and metrics collection
-- **MCP Tests**: Protocol integration validation
-
-## 🚀 Key Features Implemented
-
-### 1. Multi-Stage Builds for Efficiency
-- **Layer Caching** for faster builds
-- **Size Optimization** with minimal production images
-- **Security Hardening** with non-root users in production
-- **Development Efficiency** with hot reloading
-
-### 2. Volume Mounting Strategy
-- **Source Code**: Real-time development with live reloading
-- **Node Modules**: Cached volumes for performance
-- **Shared Data**: Cross-container communication
-- **Database**: Persistent storage for SQLite
-
-### 3. Network Configuration for MCP Testing
-- **Custom Bridge Network** with subnet isolation
-- **Service Discovery** via container names
-- **Port Mapping** for external access
-- **Health Checks** for service reliability
-
-### 4. Automated Test Execution Environment
-- **Parallel Test Execution** across multiple containers
-- **Test Result Aggregation** with JSON and HTML reports
-- **Coverage Collection** with detailed metrics
-- **Performance Monitoring** with real-time dashboards
-
-### 5. Production-Ready Deployment
-- **Load Balancing** with Nginx
-- **Health Monitoring** for all services
-- **Security Configuration** with non-root containers
-- **Resource Limits** and optimization
-
-## 📊 Monitoring and Metrics
-
-### Performance Monitoring Features
-- **System Metrics**: CPU, Memory, Load Average
-- **Docker Metrics**: Container stats, image sizes, volume usage
-- **Application Metrics**: Response times, health checks, endpoint availability
-- **Network Metrics**: Interface statistics, Docker networks
-
-### Test Result Aggregation
-- **Comprehensive Reporting**: JSON and HTML formats
-- **Coverage Analysis**: Statements, functions, branches, lines
-- **Performance Tracking**: Benchmark results and response times
-- **Error Tracking**: Detailed error logging and analysis
-
-## 🔧 Usage Examples
-
-### Quick Start
-```bash
-# Complete build and test pipeline
-./scripts/build-and-test.sh
-
-# Development environment
-docker-compose up -d claude-flow-dev
-
-# Testing environment
-docker-compose --profile testing up test-runner
-
-# Swarm integration
-docker-compose --profile swarm up -d
-
-# Production deployment
-docker-compose --profile production up -d
-```
-
-### Individual Test Suites
-```bash
-# Unit tests
-docker-compose run --rm claude-flow-test npm run test:unit
-
-# Integration tests with databases
-docker-compose run --rm claude-flow-test npm run test:integration
-
-# Swarm coordination tests
-docker-compose run --rm ruv-swarm-integration npm run test:swarm
-
-# Performance benchmarks
-docker-compose run --rm claude-flow-test npm run test:performance
-```
-
-## 🔄 CI/CD Integration Ready
-
-The Docker infrastructure is designed for seamless CI/CD integration:
-
-### GitHub Actions Ready
-- **Multi-stage builds** for different environments
-- **Parallel execution** for faster pipelines
-- **Comprehensive reporting** with artifacts
-- **Automated cleanup** to prevent resource leaks
-
-### Jenkins/GitLab CI Compatible
-- **Docker Compose** orchestration
-- **Test result outputs** in standard formats
-- **Performance metrics** collection
-- **Security scanning** integration points
-
-## 🛡️ Security Considerations
-
-### Production Security
-- **Non-root containers** for runtime security
-- **Minimal base images** to reduce attack surface
-- **Health checks** for availability monitoring
-- **Network isolation** with custom bridge networks
-
-### Development Security
-- **Source code mounting** with appropriate permissions
-- **Environment isolation** between containers
-- **Secrets management** via environment variables
-- **Volume permission** handling
-
-## 📈 Performance Optimizations
-
-### Build Performance
-- **Multi-stage builds** with layer caching
-- **`.dockerignore`** to reduce build context
-- **Parallel builds** for multiple targets
-- **Dependency caching** for faster rebuilds
-
-### Runtime Performance
-- **Volume caching** for better I/O performance
-- **Resource limits** to prevent container overuse
-- **Health checks** with optimized intervals
-- **Network optimization** with custom subnets
-
-## 🎯 Swarm Coordination Integration
-
-The Docker environment fully supports ruv-swarm coordination:
-
-### MCP Protocol Integration
-- **Swarm Integration Stage** specifically for MCP testing
-- **ruv-swarm Installation** as global package
-- **MCP Configuration** for claude-code communication
-- **Environment Variables** for swarm coordination
-
-### Agent Coordination
-- **Shared Memory** via volume mounts
-- **Cross-container Communication** via networks
-- **Coordination Hooks** integration ready
-- **Performance Monitoring** for swarm operations
-
-## 🚀 Next Steps for Team
-
-1. **CI/CD Integration**: Add to GitHub Actions workflow
-2. **Kubernetes Deployment**: Create K8s manifests for scalability
-3. **Multi-Architecture**: Support ARM64 for Apple Silicon
-4. **Security Scanning**: Integrate vulnerability scanning tools
-5. **Documentation Updates**: Update main project documentation
-
-## ✅ Task Completion Status
-
-### ✅ Completed Objectives
-- [x] Created comprehensive Docker testing environment
-- [x] Implemented multi-stage Dockerfile for claude-code-flow testing
-- [x] Created Docker Compose orchestration file with full service mesh
-- [x] Set up volume mounts for both packages with optimal performance
-- [x] Created automated build and test scripts with error handling
-- [x] Implemented proper network configuration for MCP testing
-- [x] Added monitoring and performance tracking capabilities
-- [x] Created production-ready deployment configuration
-
-### 🎯 Key Achievements
-- **84% Coverage** of Docker best practices implemented
-- **Multi-Environment Support** (dev, test, prod, swarm)
-- **Automated Pipeline** with comprehensive testing
-- **Performance Monitoring** with real-time metrics
-- **Security Hardening** for production deployments
-- **Documentation** with practical examples
-
-## 📞 Coordination Results
-
-As the Docker Infrastructure Agent, I have successfully coordinated with the swarm to:
-- **Share Progress** via ruv-swarm hooks and memory
-- **Document Decisions** in swarm coordination system
-- **Report Completion** to other agents in task force
-- **Prepare for Integration** with other agents' work
-
-The Docker infrastructure is now ready for the 3-agent task force to use for comprehensive testing of claude-code-flow and ruv-swarm integration.
-
----
-
-**Docker Infrastructure Agent - Task Completed Successfully** ✅
\ No newline at end of file
diff --git a/archive/infrastructure/docker/testing/README.md b/archive/infrastructure/docker/testing/README.md
deleted file mode 100644
index f95f7d0936..0000000000
--- a/archive/infrastructure/docker/testing/README.md
+++ /dev/null
@@ -1,294 +0,0 @@
-# Docker Testing Environment for claude-code-flow
-
-This directory contains a comprehensive Docker testing environment for claude-code-flow and ruv-swarm integration.
-
-## 🏗️ Architecture
-
-### Multi-Stage Docker Build
-
-The `Dockerfile` implements a multi-stage build process:
-
-1. **Base Stage**: Common system dependencies and Node.js setup
-2. **Dependencies Stage**: Optimized dependency installation
-3. **Development Stage**: Full development environment with source code
-4. **Testing Stage**: Test-specific configuration and tools
-5. **Production Stage**: Minimal production runtime
-6. **Swarm Integration Stage**: ruv-swarm MCP integration testing
-
-### Docker Compose Orchestration
-
-The `docker-compose.yml` provides:
-
-- **claude-flow-dev**: Development environment with hot reloading
-- **claude-flow-test**: Automated testing environment
-- **claude-flow-prod**: Production-ready deployment
-- **ruv-swarm-integration**: Swarm coordination testing
-- **Database Services**: SQLite databases for both services
-- **Monitoring**: Performance monitoring and metrics collection
-- **Load Balancer**: Nginx for production load balancing
-
-## 🚀 Quick Start
-
-### 1. Build and Test Everything
-
-```bash
-# Run complete build and test pipeline
-./scripts/build-and-test.sh
-```
-
-### 2. Development Environment
-
-```bash
-# Start development environment
-docker-compose up -d claude-flow-dev
-
-# View logs
-docker-compose logs -f claude-flow-dev
-
-# Access the application
-open http://localhost:3000
-```
-
-### 3. Testing Environment
-
-```bash
-# Run all tests
-docker-compose --profile testing up test-runner
-
-# Run specific test suites
-docker-compose run --rm claude-flow-test npm run test:unit
-docker-compose run --rm claude-flow-test npm run test:integration
-```
-
-### 4. Swarm Integration Testing
-
-```bash
-# Start swarm integration environment
-docker-compose --profile swarm up -d
-
-# Run swarm tests
-docker-compose run --rm ruv-swarm-integration npm run test:swarm
-
-# Monitor swarm coordination
-docker-compose logs -f ruv-swarm-integration
-```
-
-### 5. Production Deployment
-
-```bash
-# Start production environment
-docker-compose --profile production up -d
-
-# Access production instance
-open http://localhost:3002
-
-# Check health
-curl http://localhost:3002/health
-```
-
-## 📊 Monitoring and Metrics
-
-### Performance Monitoring
-
-The environment includes comprehensive monitoring:
-
-```bash
-# Start performance monitoring
-docker-compose --profile monitoring up -d performance-monitor
-
-# View metrics
-curl http://localhost/metrics
-
-# Check performance reports
-cat infrastructure/docker/testing/volumes/shared/performance-report.json
-```
-
-### Health Checks
-
-All services include health checks:
-
-```bash
-# Check all service health
-docker-compose ps
-
-# Manual health check
-curl http://localhost:3000/health
-```
-
-## 🔧 Configuration
-
-### Environment Variables
-
-Key environment variables:
-
-```bash
-# Development
-NODE_ENV=development
-DEBUG=claude-flow:*
-SWARM_MODE=true
-MCP_ENABLED=true
-
-# Testing
-NODE_ENV=test
-CI=true
-PARALLEL_TESTS=true
-
-# Production
-NODE_ENV=production
-PORT=3000
-```
-
-### Volume Mounts
-
-The environment uses strategic volume mounting:
-
-- **Source Code**: Live mounting for development
-- **Node Modules**: Cached for performance
-- **Shared Data**: Cross-container communication
-- **Test Results**: Persistent test artifacts
-- **Database**: Persistent data storage
-
-## 🧪 Testing Strategy
-
-### Test Suites
-
-1. **Unit Tests**: Component-level testing
-2. **Integration Tests**: Service integration testing
-3. **E2E Tests**: End-to-end workflow testing
-4. **Performance Tests**: Load and stress testing
-5. **Swarm Tests**: Multi-agent coordination testing
-6. **MCP Tests**: Protocol integration testing
-
-### Test Execution
-
-```bash
-# Run all tests
-./scripts/run-all-tests.sh
-
-# Run specific test categories
-docker-compose run --rm claude-flow-test npm run test:unit
-docker-compose run --rm claude-flow-test npm run test:integration
-docker-compose run --rm claude-flow-test npm run test:performance
-```
-
-## 📂 Directory Structure
-
-```
-infrastructure/docker/testing/
-├── Dockerfile # Multi-stage build definition
-├── docker-compose.yml # Service orchestration
-├── docker-compose.test.yml # Test-specific orchestration
-├── docker-compose.override.yml # Local overrides
-├── .dockerignore # Build context exclusions
-├── nginx.conf # Load balancer configuration
-├── README.md # This file
-├── scripts/
-│ ├── build-and-test.sh # Main build and test pipeline
-│ ├── run-all-tests.sh # Comprehensive test runner
-│ └── performance-monitor.js # Performance monitoring
-└── volumes/
- ├── claude-flow/ # claude-code-flow specific data
- ├── ruv-swarm/ # ruv-swarm specific data
- └── shared/ # Cross-container shared data
-```
-
-## 🔄 CI/CD Integration
-
-### GitHub Actions Integration
-
-The Docker environment is designed for CI/CD:
-
-```yaml
-# Example GitHub Actions workflow
-name: Docker Test Pipeline
-on: [push, pull_request]
-jobs:
- test:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Run Docker Tests
- run: |
- cd infrastructure/docker/testing
- ./scripts/build-and-test.sh
-```
-
-### Automated Testing
-
-The pipeline includes:
-
-- **Multi-stage builds** for different environments
-- **Parallel test execution** for faster feedback
-- **Comprehensive reporting** with detailed metrics
-- **Automated cleanup** to prevent resource leaks
-- **Health monitoring** for service reliability
-
-## 🛠️ Troubleshooting
-
-### Common Issues
-
-1. **Port Conflicts**: Ensure ports 3000-3002, 8080 are available
-2. **Docker Memory**: Increase Docker memory allocation if needed
-3. **Volume Permissions**: Check volume mount permissions
-4. **Network Issues**: Verify Docker network configuration
-
-### Debug Commands
-
-```bash
-# View container logs
-docker-compose logs -f [service-name]
-
-# Execute interactive shell
-docker-compose exec claude-flow-dev /bin/bash
-
-# Check container resource usage
-docker stats
-
-# Inspect container configuration
-docker-compose config
-```
-
-### Performance Optimization
-
-For optimal performance:
-
-1. **Use `.dockerignore`** to reduce build context
-2. **Layer caching** for faster builds
-3. **Multi-stage builds** for smaller images
-4. **Volume mounting** for development efficiency
-5. **Health checks** for reliability
-
-## 📋 Testing Checklist
-
-Before deployment, verify:
-
-- [ ] All Docker images build successfully
-- [ ] Unit tests pass
-- [ ] Integration tests pass
-- [ ] E2E tests pass
-- [ ] Performance tests meet requirements
-- [ ] Swarm integration works correctly
-- [ ] MCP protocol integration functions
-- [ ] Health checks are responsive
-- [ ] Monitoring captures metrics
-- [ ] Production deployment is secure
-
-## 🚀 Next Steps
-
-1. **CI/CD Integration**: Add to GitHub Actions
-2. **Kubernetes Deployment**: Create K8s manifests
-3. **Multi-Architecture**: Support ARM64 builds
-4. **Security Scanning**: Add vulnerability scanning
-5. **Documentation**: Update deployment guides
-
-## 📞 Support
-
-For issues or questions:
-
-- **GitHub Issues**: https://github.com/ruvnet/claude-code-flow/issues
-- **Documentation**: https://github.com/ruvnet/claude-code-flow/docs
-- **Discord**: Community support channel
-
----
-
-**Note**: This Docker environment is optimized for testing claude-code-flow and ruv-swarm integration. For production deployments, review security configurations and resource limits.
\ No newline at end of file
diff --git a/archive/infrastructure/docker/testing/docker-compose.override.yml b/archive/infrastructure/docker/testing/docker-compose.override.yml
deleted file mode 100644
index c4b26fc657..0000000000
--- a/archive/infrastructure/docker/testing/docker-compose.override.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-# Docker Compose override for local development
-# This file allows developers to customize the environment without modifying the main compose file
-
-version: '3.8'
-
-services:
- claude-flow-dev:
- # Override for local development
- volumes:
- - ../:/app:cached # Use cached mounting for better performance on macOS
- environment:
- - DEBUG=claude-flow:*,ruv-swarm:*
- - LOG_LEVEL=debug
- - DEVELOPMENT_MODE=true
- ports:
- - "3000:3000"
- - "3001:3001"
- - "8080:8080"
- - "9229:9229" # Node.js debugging port
-
- ruv-swarm-integration:
- # Override for swarm development
- environment:
- - SWARM_DEBUG=true
- - SWARM_LOG_LEVEL=debug
- - MCP_DEBUG=true
- volumes:
- - ../../ruv-swarm:/app/ruv-swarm:cached
-
- # Additional development services
- redis:
- image: redis:alpine
- container_name: claude-flow-redis
- ports:
- - "6379:6379"
- volumes:
- - redis-data:/data
- networks:
- - claude-swarm-network
-
- # Database admin interface
- db-admin:
- image: sqlitebrowser/sqlitebrowser:latest
- container_name: claude-flow-db-admin
- ports:
- - "8081:8080"
- volumes:
- - claude-flow-db-data:/data
- networks:
- - claude-swarm-network
-
-volumes:
- redis-data:
- driver: local
\ No newline at end of file
diff --git a/archive/infrastructure/docker/testing/docker-compose.test.yml b/archive/infrastructure/docker/testing/docker-compose.test.yml
deleted file mode 100644
index fd5866eca3..0000000000
--- a/archive/infrastructure/docker/testing/docker-compose.test.yml
+++ /dev/null
@@ -1,131 +0,0 @@
-# Docker Compose configuration for testing
-# Optimized for CI/CD and automated testing environments
-
-version: '3.8'
-
-services:
- claude-flow-test:
- build:
- context: ../../..
- dockerfile: infrastructure/docker/testing/Dockerfile
- target: testing
- container_name: claude-flow-test
- environment:
- - NODE_ENV=test
- - CI=true
- - FORCE_COLOR=1
- - JEST_JUNIT_OUTPUT_DIR=/app/test-results
- - JEST_JUNIT_OUTPUT_NAME=junit.xml
- volumes:
- - claude-flow-test-results:/app/test-results
- - claude-flow-coverage:/app/coverage
- depends_on:
- - test-db
- networks:
- - claude-test-network
-
- test-db:
- image: sqlite:latest
- container_name: claude-flow-test-db
- environment:
- - SQLITE_DATABASE=test.db
- volumes:
- - test-db-data:/var/lib/sqlite
- networks:
- - claude-test-network
-
- # Integration test runner
- integration-test:
- build:
- context: ../../..
- dockerfile: infrastructure/docker/testing/Dockerfile
- target: testing
- container_name: claude-flow-integration-test
- environment:
- - NODE_ENV=test
- - TEST_TYPE=integration
- - CI=true
- volumes:
- - claude-flow-test-results:/app/test-results
- depends_on:
- - claude-flow-test
- - test-db
- networks:
- - claude-test-network
- command: ["npm", "run", "test:integration"]
-
- # E2E test runner
- e2e-test:
- build:
- context: ../../..
- dockerfile: infrastructure/docker/testing/Dockerfile
- target: testing
- container_name: claude-flow-e2e-test
- environment:
- - NODE_ENV=test
- - TEST_TYPE=e2e
- - CI=true
- - HEADLESS=true
- volumes:
- - claude-flow-test-results:/app/test-results
- - claude-flow-coverage:/app/coverage
- depends_on:
- - claude-flow-test
- - test-db
- networks:
- - claude-test-network
- command: ["npm", "run", "test:e2e"]
-
- # Performance test runner
- performance-test:
- build:
- context: ../../..
- dockerfile: infrastructure/docker/testing/Dockerfile
- target: testing
- container_name: claude-flow-performance-test
- environment:
- - NODE_ENV=test
- - TEST_TYPE=performance
- - CI=true
- volumes:
- - claude-flow-test-results:/app/test-results
- depends_on:
- - claude-flow-test
- - test-db
- networks:
- - claude-test-network
- command: ["npm", "run", "test:performance"]
-
- # Test result aggregator
- test-aggregator:
- image: node:20-alpine
- container_name: claude-flow-test-aggregator
- working_dir: /app
- environment:
- - NODE_ENV=test
- volumes:
- - claude-flow-test-results:/app/test-results
- - ./scripts:/app/scripts
- networks:
- - claude-test-network
- command: ["node", "/app/scripts/aggregate-test-results.js"]
- depends_on:
- - claude-flow-test
- - integration-test
- - e2e-test
- - performance-test
-
-networks:
- claude-test-network:
- driver: bridge
- ipam:
- config:
- - subnet: 172.21.0.0/16
-
-volumes:
- claude-flow-test-results:
- driver: local
- claude-flow-coverage:
- driver: local
- test-db-data:
- driver: local
\ No newline at end of file
diff --git a/archive/infrastructure/docker/testing/docker-compose.yml b/archive/infrastructure/docker/testing/docker-compose.yml
deleted file mode 100644
index a1f457b359..0000000000
--- a/archive/infrastructure/docker/testing/docker-compose.yml
+++ /dev/null
@@ -1,104 +0,0 @@
-version: '3.8'
-
-services:
- # NPX installation testing
- test-npx-swarm:
- build:
- context: .
- dockerfile: Dockerfile.npx
- container_name: claude-flow-test-npx-swarm
- volumes:
- - ./results:/test/results
- - ./logs:/test/logs
- command: ["/test/scripts/test-mcp-tools.sh", "npx", "swarm"]
- networks:
- - claude-flow-test
-
- test-npx-neural:
- build:
- context: .
- dockerfile: Dockerfile.npx
- container_name: claude-flow-test-npx-neural
- volumes:
- - ./results:/test/results
- - ./logs:/test/logs
- command: ["/test/scripts/test-mcp-tools.sh", "npx", "neural"]
- networks:
- - claude-flow-test
-
- test-npx-memory:
- build:
- context: .
- dockerfile: Dockerfile.npx
- container_name: claude-flow-test-npx-memory
- volumes:
- - ./results:/test/results
- - ./logs:/test/logs
- command: ["/test/scripts/test-mcp-tools.sh", "npx", "memory"]
- networks:
- - claude-flow-test
-
- test-npx-analysis:
- build:
- context: .
- dockerfile: Dockerfile.npx
- container_name: claude-flow-test-npx-analysis
- volumes:
- - ./results:/test/results
- - ./logs:/test/logs
- command: ["/test/scripts/test-mcp-tools.sh", "npx", "analysis"]
- networks:
- - claude-flow-test
-
- # NPM installation testing
- test-npm-workflow:
- build:
- context: .
- dockerfile: Dockerfile.npm
- container_name: claude-flow-test-npm-workflow
- volumes:
- - ./results:/test/results
- - ./logs:/test/logs
- command: ["/test/scripts/test-mcp-tools.sh", "npm", "workflow"]
- networks:
- - claude-flow-test
-
- test-npm-github:
- build:
- context: .
- dockerfile: Dockerfile.npm
- container_name: claude-flow-test-npm-github
- volumes:
- - ./results:/test/results
- - ./logs:/test/logs
- command: ["/test/scripts/test-mcp-tools.sh", "npm", "github"]
- networks:
- - claude-flow-test
-
- test-npm-daa:
- build:
- context: .
- dockerfile: Dockerfile.npm
- container_name: claude-flow-test-npm-daa
- volumes:
- - ./results:/test/results
- - ./logs:/test/logs
- command: ["/test/scripts/test-mcp-tools.sh", "npm", "daa"]
- networks:
- - claude-flow-test
-
- test-npm-system:
- build:
- context: .
- dockerfile: Dockerfile.npm
- container_name: claude-flow-test-npm-system
- volumes:
- - ./results:/test/results
- - ./logs:/test/logs
- command: ["/test/scripts/test-mcp-tools.sh", "npm", "system"]
- networks:
- - claude-flow-test
-
-networks:
- claude-flow-test:
- driver: bridge
\ No newline at end of file
diff --git a/archive/infrastructure/docker/testing/nginx.conf b/archive/infrastructure/docker/testing/nginx.conf
deleted file mode 100644
index 306ee83d8c..0000000000
--- a/archive/infrastructure/docker/testing/nginx.conf
+++ /dev/null
@@ -1,72 +0,0 @@
-# Nginx configuration for claude-code-flow load balancing
-events {
- worker_connections 1024;
-}
-
-http {
- upstream claude_flow_backend {
- server claude-flow-dev:3000;
- server claude-flow-prod:3000 backup;
- }
-
- upstream claude_flow_api {
- server claude-flow-dev:3001;
- }
-
- server {
- listen 80;
- server_name localhost;
-
- # Health check endpoint
- location /health {
- access_log off;
- return 200 "healthy\n";
- add_header Content-Type text/plain;
- }
-
- # Main application
- location / {
- proxy_pass http://claude_flow_backend;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
-
- # WebSocket support
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
-
- # Timeouts
- proxy_connect_timeout 60s;
- proxy_send_timeout 60s;
- proxy_read_timeout 60s;
- }
-
- # API endpoints
- location /api/ {
- proxy_pass http://claude_flow_api;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
-
- # API-specific headers
- proxy_set_header Accept application/json;
- proxy_set_header Content-Type application/json;
- }
-
- # Static files
- location /static/ {
- alias /shared/static/;
- expires 1y;
- add_header Cache-Control "public, immutable";
- }
-
- # Metrics endpoint
- location /metrics {
- alias /shared/metrics.json;
- add_header Content-Type application/json;
- }
- }
-}
\ No newline at end of file
diff --git a/archive/infrastructure/docker/testing/scripts/aggregate-test-results.js b/archive/infrastructure/docker/testing/scripts/aggregate-test-results.js
deleted file mode 100755
index f8b1352c6e..0000000000
--- a/archive/infrastructure/docker/testing/scripts/aggregate-test-results.js
+++ /dev/null
@@ -1,387 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * Test result aggregator for Docker testing environment
- * Combines test results from multiple test suites into comprehensive reports
- */
-
-const fs = require('fs');
-const path = require('path');
-
-const TEST_RESULTS_DIR = '/app/tests/results';
-const OUTPUT_DIR = '/app/tests/results/aggregated';
-const TIMESTAMP = new Date().toISOString().replace(/[:.]/g, '-');
-
-// Ensure output directory exists
-if (!fs.existsSync(OUTPUT_DIR)) {
- fs.mkdirSync(OUTPUT_DIR, { recursive: true });
-}
-
-class TestResultAggregator {
- constructor() {
- this.results = {
- timestamp: new Date().toISOString(),
- summary: {
- total_suites: 0,
- passed_suites: 0,
- failed_suites: 0,
- total_tests: 0,
- passed_tests: 0,
- failed_tests: 0,
- skipped_tests: 0,
- success_rate: 0,
- duration: 0
- },
- suites: {},
- coverage: {},
- performance: {},
- errors: []
- };
- }
-
- log(message) {
- console.log(`[${new Date().toISOString()}] ${message}`);
- }
-
- // Aggregate Jest test results
- aggregateJestResults() {
- const jestResultsPath = path.join(TEST_RESULTS_DIR, 'junit.xml');
- const jestJsonPath = path.join(TEST_RESULTS_DIR, 'jest-results.json');
-
- if (fs.existsSync(jestJsonPath)) {
- try {
- const jestResults = JSON.parse(fs.readFileSync(jestJsonPath, 'utf8'));
-
- this.results.suites.jest = {
- type: 'jest',
- numTotalTests: jestResults.numTotalTests || 0,
- numPassedTests: jestResults.numPassedTests || 0,
- numFailedTests: jestResults.numFailedTests || 0,
- numPendingTests: jestResults.numPendingTests || 0,
- testResults: jestResults.testResults || []
- };
-
- this.results.summary.total_tests += jestResults.numTotalTests || 0;
- this.results.summary.passed_tests += jestResults.numPassedTests || 0;
- this.results.summary.failed_tests += jestResults.numFailedTests || 0;
- this.results.summary.skipped_tests += jestResults.numPendingTests || 0;
-
- this.log(`✅ Aggregated Jest results: ${jestResults.numTotalTests} tests`);
- } catch (error) {
- this.log(`❌ Error aggregating Jest results: ${error.message}`);
- this.results.errors.push({
- type: 'jest_aggregation',
- message: error.message,
- timestamp: new Date().toISOString()
- });
- }
- }
- }
-
- // Aggregate coverage results
- aggregateCoverageResults() {
- const coverageDir = path.join(TEST_RESULTS_DIR, '../coverage');
- const coverageJsonPath = path.join(coverageDir, 'coverage-final.json');
-
- if (fs.existsSync(coverageJsonPath)) {
- try {
- const coverageData = JSON.parse(fs.readFileSync(coverageJsonPath, 'utf8'));
-
- // Calculate overall coverage metrics
- let totalStatements = 0;
- let coveredStatements = 0;
- let totalFunctions = 0;
- let coveredFunctions = 0;
- let totalBranches = 0;
- let coveredBranches = 0;
- let totalLines = 0;
- let coveredLines = 0;
-
- Object.values(coverageData).forEach(fileCoverage => {
- if (fileCoverage.s) {
- totalStatements += Object.keys(fileCoverage.s).length;
- coveredStatements += Object.values(fileCoverage.s).filter(count => count > 0).length;
- }
- if (fileCoverage.f) {
- totalFunctions += Object.keys(fileCoverage.f).length;
- coveredFunctions += Object.values(fileCoverage.f).filter(count => count > 0).length;
- }
- if (fileCoverage.b) {
- totalBranches += Object.keys(fileCoverage.b).length;
- coveredBranches += Object.values(fileCoverage.b).filter(branches =>
- branches.some(count => count > 0)
- ).length;
- }
- if (fileCoverage.l) {
- totalLines += Object.keys(fileCoverage.l).length;
- coveredLines += Object.values(fileCoverage.l).filter(count => count > 0).length;
- }
- });
-
- this.results.coverage = {
- statements: {
- total: totalStatements,
- covered: coveredStatements,
- percentage: totalStatements > 0 ? (coveredStatements / totalStatements * 100).toFixed(2) : 0
- },
- functions: {
- total: totalFunctions,
- covered: coveredFunctions,
- percentage: totalFunctions > 0 ? (coveredFunctions / totalFunctions * 100).toFixed(2) : 0
- },
- branches: {
- total: totalBranches,
- covered: coveredBranches,
- percentage: totalBranches > 0 ? (coveredBranches / totalBranches * 100).toFixed(2) : 0
- },
- lines: {
- total: totalLines,
- covered: coveredLines,
- percentage: totalLines > 0 ? (coveredLines / totalLines * 100).toFixed(2) : 0
- }
- };
-
- this.log(`✅ Aggregated coverage results: ${this.results.coverage.statements.percentage}% statements`);
- } catch (error) {
- this.log(`❌ Error aggregating coverage results: ${error.message}`);
- this.results.errors.push({
- type: 'coverage_aggregation',
- message: error.message,
- timestamp: new Date().toISOString()
- });
- }
- }
- }
-
- // Aggregate performance test results
- aggregatePerformanceResults() {
- const performanceFiles = [
- 'performance-tests.log',
- 'performance-results.json',
- 'benchmark-results.json'
- ];
-
- performanceFiles.forEach(filename => {
- const filePath = path.join(TEST_RESULTS_DIR, filename);
- if (fs.existsSync(filePath)) {
- try {
- const content = fs.readFileSync(filePath, 'utf8');
-
- if (filename.endsWith('.json')) {
- const data = JSON.parse(content);
- this.results.performance[filename.replace('.json', '')] = data;
- } else {
- this.results.performance[filename.replace('.log', '')] = {
- type: 'log',
- content: content.split('\n').slice(-100) // Last 100 lines
- };
- }
-
- this.log(`✅ Aggregated performance results from ${filename}`);
- } catch (error) {
- this.log(`❌ Error aggregating performance results from ${filename}: ${error.message}`);
- this.results.errors.push({
- type: 'performance_aggregation',
- file: filename,
- message: error.message,
- timestamp: new Date().toISOString()
- });
- }
- }
- });
- }
-
- // Aggregate individual test suite results
- aggregateTestSuiteResults() {
- const suiteFiles = [
- 'unit-tests.log',
- 'integration-tests.log',
- 'e2e-tests.log',
- 'swarm-tests.log'
- ];
-
- suiteFiles.forEach(filename => {
- const filePath = path.join(TEST_RESULTS_DIR, filename);
- if (fs.existsSync(filePath)) {
- try {
- const content = fs.readFileSync(filePath, 'utf8');
- const suiteName = filename.replace('-tests.log', '');
-
- // Parse test results from logs
- const passed = (content.match(/✅|PASS/g) || []).length;
- const failed = (content.match(/❌|FAIL/g) || []).length;
- const skipped = (content.match(/⏭️|SKIP/g) || []).length;
-
- this.results.suites[suiteName] = {
- type: 'log_based',
- passed,
- failed,
- skipped,
- total: passed + failed + skipped,
- log_summary: content.split('\n').slice(-50) // Last 50 lines
- };
-
- this.results.summary.total_suites++;
- if (failed === 0) {
- this.results.summary.passed_suites++;
- } else {
- this.results.summary.failed_suites++;
- }
-
- this.log(`✅ Aggregated ${suiteName} results: ${passed} passed, ${failed} failed`);
- } catch (error) {
- this.log(`❌ Error aggregating ${filename}: ${error.message}`);
- this.results.errors.push({
- type: 'suite_aggregation',
- file: filename,
- message: error.message,
- timestamp: new Date().toISOString()
- });
- }
- }
- });
- }
-
- // Calculate final metrics
- calculateMetrics() {
- // Calculate success rate
- if (this.results.summary.total_tests > 0) {
- this.results.summary.success_rate = (
- (this.results.summary.passed_tests / this.results.summary.total_tests) * 100
- ).toFixed(2);
- }
-
- // Add environment information
- this.results.environment = {
- node_version: process.version,
- platform: process.platform,
- arch: process.arch,
- docker: true,
- timestamp: new Date().toISOString()
- };
-
- this.log(`📊 Final metrics: ${this.results.summary.success_rate}% success rate`);
- }
-
- // Generate comprehensive report
- generateReport() {
- const reportPath = path.join(OUTPUT_DIR, `test-report-${TIMESTAMP}.json`);
-
- try {
- fs.writeFileSync(reportPath, JSON.stringify(this.results, null, 2));
- this.log(`📝 Generated comprehensive report: ${reportPath}`);
- } catch (error) {
- this.log(`❌ Error generating report: ${error.message}`);
- }
- }
-
- // Generate HTML report
- generateHtmlReport() {
- const htmlPath = path.join(OUTPUT_DIR, `test-report-${TIMESTAMP}.html`);
-
- const html = `
-<!DOCTYPE html>
-<html>
-<head>
- <title>Test Results - ${this.results.timestamp}</title>
- <style>
- body { font-family: Arial, sans-serif; margin: 20px; }
- .header { background: #f0f0f0; padding: 20px; border-radius: 5px; }
- .success { color: #28a745; }
- .failed { color: #dc3545; }
- .warning { color: #ffc107; }
- .suite { margin: 20px 0; padding: 15px; border: 1px solid #ddd; border-radius: 5px; }
- .metrics { display: flex; gap: 20px; margin: 20px 0; }
- .metric { padding: 10px; background: #f8f9fa; border-radius: 5px; }
- pre { background: #f8f9fa; padding: 10px; border-radius: 5px; overflow-x: auto; }
- </style>
-</head>
-<body>
- <div class="header">
- <h1>Test Results Summary</h1>
- <p><strong>Generated:</strong> ${this.results.timestamp}</p>
- <p><strong>Environment:</strong> Docker (${this.results.environment?.node_version})</p>
- </div>
-
- <div class="metrics">
- <div class="metric">
- <h3>Overall Success Rate</h3>
- <p class="${this.results.summary.success_rate >= 80 ? 'success' : 'failed'}">${this.results.summary.success_rate}%</p>
- </div>
- <div class="metric">
- <h3>Total Tests</h3>
- <p>${this.results.summary.total_tests}</p>
- </div>
- <div class="metric">
- <h3>Test Suites</h3>
- <p>${this.results.summary.total_suites}</p>
- </div>
- <div class="metric">
- <h3>Coverage</h3>
- <p>${this.results.coverage.statements?.percentage || 'N/A'}%</p>
- </div>
- </div>
-
- <h2>Test Suites</h2>
- ${Object.entries(this.results.suites).map(([name, suite]) => `
- <div class="suite">
- <h3>${name}</h3>
- <p><span class="success">✅ ${suite.passed || 0} passed</span> |
- <span class="failed">❌ ${suite.failed || 0} failed</span> |
- <span class="warning">⏭️ ${suite.skipped || 0} skipped</span></p>
- </div>
- `).join('')}
-
- ${this.results.errors.length > 0 ? `
- <h2>Errors</h2>
- <div class="suite">
- <pre>${JSON.stringify(this.results.errors, null, 2)}</pre>
- </div>
- ` : ''}
-
- <h2>Raw Results</h2>
- <div class="suite">
- <pre>${JSON.stringify(this.results, null, 2)}</pre>
- </div>
-</body>
-</html>`;
-
- try {
- fs.writeFileSync(htmlPath, html);
- this.log(`📝 Generated HTML report: ${htmlPath}`);
- } catch (error) {
- this.log(`❌ Error generating HTML report: ${error.message}`);
- }
- }
-
- // Run complete aggregation
- async aggregate() {
- this.log('🚀 Starting test result aggregation...');
-
- this.aggregateJestResults();
- this.aggregateCoverageResults();
- this.aggregatePerformanceResults();
- this.aggregateTestSuiteResults();
- this.calculateMetrics();
- this.generateReport();
- this.generateHtmlReport();
-
- this.log('✅ Test result aggregation completed');
-
- // Exit with appropriate code
- process.exit(this.results.summary.failed_suites > 0 ? 1 : 0);
- }
-}
-
-// Handle graceful shutdown
-process.on('SIGINT', () => {
- console.log('\n🛑 Shutting down test aggregator...');
- process.exit(0);
-});
-
-// Start aggregation
-const aggregator = new TestResultAggregator();
-aggregator.aggregate().catch(error => {
- console.error('❌ Fatal error in test aggregator:', error);
- process.exit(1);
-});
\ No newline at end of file
diff --git a/archive/infrastructure/docker/testing/scripts/build-and-test.sh b/archive/infrastructure/docker/testing/scripts/build-and-test.sh
deleted file mode 100755
index 273aa17a2d..0000000000
--- a/archive/infrastructure/docker/testing/scripts/build-and-test.sh
+++ /dev/null
@@ -1,372 +0,0 @@
-#!/bin/bash
-
-# Automated build and test script for claude-code-flow Docker environment
-# This script handles the complete build, test, and validation pipeline
-
-set -euo pipefail
-
-# Colors for output
-RED='\033[0;31m'
-GREEN='\033[0;32m'
-YELLOW='\033[1;33m'
-BLUE='\033[0;34m'
-NC='\033[0m' # No Color
-
-# Script configuration
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
-DOCKER_TEST_DIR="${PROJECT_ROOT}/docker-test"
-TIMESTAMP=$(date +%Y%m%d_%H%M%S)
-LOG_FILE="${DOCKER_TEST_DIR}/logs/build-test-${TIMESTAMP}.log"
-
-# Ensure logs directory exists
-mkdir -p "${DOCKER_TEST_DIR}/logs"
-
-# Logging function
-log() {
- echo -e "${1}" | tee -a "${LOG_FILE}"
-}
-
-# Error handler
-error_handler() {
- log "${RED}❌ Error occurred in script at line $1${NC}"
- log "${RED}❌ Build and test process failed${NC}"
- exit 1
-}
-
-trap 'error_handler $LINENO' ERR
-
-# Function to check if Docker is running
-check_docker() {
- if ! docker info >/dev/null 2>&1; then
- log "${RED}❌ Docker is not running. Please start Docker first.${NC}"
- exit 1
- fi
- log "${GREEN}✅ Docker is running${NC}"
-}
-
-# Function to check if Docker Compose is available
-check_docker_compose() {
- if ! command -v docker-compose >/dev/null 2>&1; then
- log "${RED}❌ Docker Compose is not installed${NC}"
- exit 1
- fi
- log "${GREEN}✅ Docker Compose is available${NC}"
-}
-
-# Function to clean up previous containers and volumes
-cleanup() {
- log "${YELLOW}🧹 Cleaning up previous containers and volumes...${NC}"
-
- cd "${DOCKER_TEST_DIR}"
-
- # Stop and remove containers
- docker-compose down --volumes --remove-orphans 2>/dev/null || true
-
- # Remove dangling images
- docker image prune -f 2>/dev/null || true
-
- # Clean up test results
- rm -rf "${DOCKER_TEST_DIR}/test-results"
- mkdir -p "${DOCKER_TEST_DIR}/test-results"
-
- log "${GREEN}✅ Cleanup completed${NC}"
-}
-
-# Function to build all images
-build_images() {
- log "${YELLOW}🏗️ Building Docker images...${NC}"
-
- cd "${DOCKER_TEST_DIR}"
-
- # Build development image
- log "${BLUE}📦 Building development image...${NC}"
- docker-compose build claude-flow-dev
-
- # Build testing image
- log "${BLUE}📦 Building testing image...${NC}"
- docker-compose build claude-flow-test
-
- # Build production image
- log "${BLUE}📦 Building production image...${NC}"
- docker-compose build claude-flow-prod
-
- # Build swarm integration image
- log "${BLUE}📦 Building swarm integration image...${NC}"
- docker-compose build ruv-swarm-integration
-
- log "${GREEN}✅ All images built successfully${NC}"
-}
-
-# Function to run unit tests
-run_unit_tests() {
- log "${YELLOW}🧪 Running unit tests...${NC}"
-
- cd "${DOCKER_TEST_DIR}"
-
- # Run unit tests
- docker-compose run --rm claude-flow-test npm run test:unit > "${DOCKER_TEST_DIR}/test-results/unit-tests.log" 2>&1
-
- if [ $? -eq 0 ]; then
- log "${GREEN}✅ Unit tests passed${NC}"
- else
- log "${RED}❌ Unit tests failed${NC}"
- cat "${DOCKER_TEST_DIR}/test-results/unit-tests.log"
- return 1
- fi
-}
-
-# Function to run integration tests
-run_integration_tests() {
- log "${YELLOW}🔗 Running integration tests...${NC}"
-
- cd "${DOCKER_TEST_DIR}"
-
- # Start dependencies
- docker-compose up -d claude-flow-db ruv-swarm-db
-
- # Wait for databases to be ready
- sleep 10
-
- # Run integration tests
- docker-compose run --rm claude-flow-test npm run test:integration > "${DOCKER_TEST_DIR}/test-results/integration-tests.log" 2>&1
-
- if [ $? -eq 0 ]; then
- log "${GREEN}✅ Integration tests passed${NC}"
- else
- log "${RED}❌ Integration tests failed${NC}"
- cat "${DOCKER_TEST_DIR}/test-results/integration-tests.log"
- return 1
- fi
-}
-
-# Function to run swarm integration tests
-run_swarm_tests() {
- log "${YELLOW}🐝 Running swarm integration tests...${NC}"
-
- cd "${DOCKER_TEST_DIR}"
-
- # Start swarm integration environment
- docker-compose --profile swarm up -d
-
- # Wait for services to be ready
- sleep 20
-
- # Run swarm tests
- docker-compose run --rm ruv-swarm-integration npm run test:swarm > "${DOCKER_TEST_DIR}/test-results/swarm-tests.log" 2>&1
-
- if [ $? -eq 0 ]; then
- log "${GREEN}✅ Swarm integration tests passed${NC}"
- else
- log "${RED}❌ Swarm integration tests failed${NC}"
- cat "${DOCKER_TEST_DIR}/test-results/swarm-tests.log"
- return 1
- fi
-}
-
-# Function to run end-to-end tests
-run_e2e_tests() {
- log "${YELLOW}🎭 Running end-to-end tests...${NC}"
-
- cd "${DOCKER_TEST_DIR}"
-
- # Start full environment
- docker-compose up -d claude-flow-dev claude-flow-db
-
- # Wait for services to be ready
- sleep 30
-
- # Run e2e tests
- docker-compose run --rm --profile testing test-runner > "${DOCKER_TEST_DIR}/test-results/e2e-tests.log" 2>&1
-
- if [ $? -eq 0 ]; then
- log "${GREEN}✅ End-to-end tests passed${NC}"
- else
- log "${RED}❌ End-to-end tests failed${NC}"
- cat "${DOCKER_TEST_DIR}/test-results/e2e-tests.log"
- return 1
- fi
-}
-
-# Function to run performance tests
-run_performance_tests() {
- log "${YELLOW}⚡ Running performance tests...${NC}"
-
- cd "${DOCKER_TEST_DIR}"
-
- # Start performance monitoring
- docker-compose --profile monitoring up -d performance-monitor
-
- # Start services
- docker-compose up -d claude-flow-dev claude-flow-db
-
- # Wait for services
- sleep 20
-
- # Run performance tests
- docker-compose run --rm claude-flow-test npm run test:performance > "${DOCKER_TEST_DIR}/test-results/performance-tests.log" 2>&1
-
- if [ $? -eq 0 ]; then
- log "${GREEN}✅ Performance tests passed${NC}"
- else
- log "${RED}❌ Performance tests failed${NC}"
- cat "${DOCKER_TEST_DIR}/test-results/performance-tests.log"
- return 1
- fi
-}
-
-# Function to validate production deployment
-validate_production() {
- log "${YELLOW}🚀 Validating production deployment...${NC}"
-
- cd "${DOCKER_TEST_DIR}"
-
- # Start production environment
- docker-compose --profile production up -d
-
- # Wait for services
- sleep 30
-
- # Health check
- if curl -f http://localhost:3002/health >/dev/null 2>&1; then
- log "${GREEN}✅ Production deployment is healthy${NC}"
- else
- log "${RED}❌ Production deployment health check failed${NC}"
- docker-compose --profile production logs claude-flow-prod
- return 1
- fi
-}
-
-# Function to generate test reports
-generate_reports() {
- log "${YELLOW}📊 Generating test reports...${NC}"
-
- cd "${DOCKER_TEST_DIR}"
-
- # Create reports directory
- mkdir -p "${DOCKER_TEST_DIR}/test-results/reports"
-
- # Generate coverage report
- docker-compose run --rm claude-flow-test npm run coverage:report > "${DOCKER_TEST_DIR}/test-results/reports/coverage.html" 2>&1 || true
-
- # Generate summary report
- cat > "${DOCKER_TEST_DIR}/test-results/reports/summary.md" << EOF
-# Test Results Summary
-
-**Date:** $(date)
-**Build:** ${TIMESTAMP}
-
-## Test Results
-
-- ✅ Unit Tests: $(grep -c "✅ Unit tests passed" "${LOG_FILE}" || echo "0")/1
-- ✅ Integration Tests: $(grep -c "✅ Integration tests passed" "${LOG_FILE}" || echo "0")/1
-- ✅ Swarm Tests: $(grep -c "✅ Swarm integration tests passed" "${LOG_FILE}" || echo "0")/1
-- ✅ E2E Tests: $(grep -c "✅ End-to-end tests passed" "${LOG_FILE}" || echo "0")/1
-- ✅ Performance Tests: $(grep -c "✅ Performance tests passed" "${LOG_FILE}" || echo "0")/1
-- ✅ Production Validation: $(grep -c "✅ Production deployment is healthy" "${LOG_FILE}" || echo "0")/1
-
-## Build Information
-
-- **Docker Images Built:** $(docker images | grep claude-flow | wc -l)
-- **Total Test Duration:** $(grep -o "Build and test completed in [0-9]* seconds" "${LOG_FILE}" | cut -d' ' -f6 || echo "N/A")
-- **Log File:** ${LOG_FILE}
-
-## Next Steps
-
-1. Review individual test logs in \`test-results/\` directory
-2. Check coverage reports in \`test-results/reports/\`
-3. Validate production deployment if all tests pass
-4. Update GitHub issue #54 with results
-
-EOF
-
- log "${GREEN}✅ Test reports generated${NC}"
-}
-
-# Function to post results to GitHub issue
-post_to_github() {
- log "${YELLOW}📝 Posting results to GitHub issue #54...${NC}"
-
- # Create a summary for GitHub
- local summary_file="${DOCKER_TEST_DIR}/test-results/github-summary.md"
-
- cat > "${summary_file}" << EOF
-## Docker Infrastructure Test Results - ${TIMESTAMP}
-
-### Build Status: $(if [ $? -eq 0 ]; then echo "✅ SUCCESS"; else echo "❌ FAILED"; fi)
-
-**Environment:** Docker multi-stage build with compose orchestration
-**Test Coverage:** Unit, Integration, Swarm, E2E, Performance, Production validation
-
-### Key Achievements:
-- ✅ Multi-stage Dockerfile with optimized layers
-- ✅ Docker Compose orchestration with proper networking
-- ✅ Volume mounting for source code and shared data
-- ✅ Automated test pipeline with parallel execution
-- ✅ Production-ready deployment validation
-- ✅ Swarm integration testing environment
-
-### Infrastructure Features:
-- **Multi-stage builds** for development, testing, and production
-- **Volume mounting** for real-time development
-- **Network isolation** with custom bridge network
-- **Health checks** for all services
-- **Automated testing** pipeline with comprehensive coverage
-- **Performance monitoring** with real-time metrics
-- **Load balancing** with nginx for production
-
-### Next Steps:
-1. Review detailed test logs
-2. Validate performance metrics
-3. Update deployment documentation
-4. Create CI/CD pipeline integration
-
-**Full test log:** [Build Log](${LOG_FILE})
-EOF
-
- log "${GREEN}✅ GitHub summary prepared${NC}"
- log "${BLUE}📄 Summary written to: ${summary_file}${NC}"
-}
-
-# Main execution function
-main() {
- local start_time=$(date +%s)
-
- log "${BLUE}🚀 Starting Docker build and test pipeline...${NC}"
- log "${BLUE}📅 Started at: $(date)${NC}"
- log "${BLUE}📁 Project root: ${PROJECT_ROOT}${NC}"
- log "${BLUE}🐳 Docker test dir: ${DOCKER_TEST_DIR}${NC}"
-
- # Pre-flight checks
- check_docker
- check_docker_compose
-
- # Execute pipeline
- cleanup
- build_images
- run_unit_tests
- run_integration_tests
- run_swarm_tests
- run_e2e_tests
- run_performance_tests
- validate_production
- generate_reports
- post_to_github
-
- # Calculate duration
- local end_time=$(date +%s)
- local duration=$((end_time - start_time))
-
- log "${GREEN}🎉 Build and test completed successfully in ${duration} seconds${NC}"
- log "${GREEN}📊 All test results available in: ${DOCKER_TEST_DIR}/test-results/${NC}"
- log "${GREEN}📝 Summary report: ${DOCKER_TEST_DIR}/test-results/reports/summary.md${NC}"
-
- # Final cleanup
- cd "${DOCKER_TEST_DIR}"
- docker-compose down --volumes --remove-orphans 2>/dev/null || true
-
- log "${GREEN}✅ Docker infrastructure testing completed successfully${NC}"
-}
-
-# Execute main function
-main "$@"
\ No newline at end of file
diff --git a/archive/infrastructure/docker/testing/scripts/performance-monitor.js b/archive/infrastructure/docker/testing/scripts/performance-monitor.js
deleted file mode 100644
index e0ce3eb582..0000000000
--- a/archive/infrastructure/docker/testing/scripts/performance-monitor.js
+++ /dev/null
@@ -1,370 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * Performance monitoring script for Docker environment
- * Monitors resource usage, response times, and system metrics
- */
-
-const os = require('os');
-const fs = require('fs');
-const { execSync } = require('child_process');
-
-// Configuration
-const MONITOR_INTERVAL = process.env.MONITOR_INTERVAL || 30; // seconds
-const METRICS_OUTPUT = process.env.METRICS_OUTPUT || '/shared/metrics.json';
-const LOG_FILE = '/shared/performance-monitor.log';
-
-// Metrics collection
-class PerformanceMonitor {
- constructor() {
- this.metrics = {
- timestamp: new Date().toISOString(),
- system: {},
- docker: {},
- application: {},
- network: {}
- };
-
- this.startTime = Date.now();
- this.log('🚀 Performance monitor started');
- }
-
- log(message) {
- const timestamp = new Date().toISOString();
- const logMessage = `[${timestamp}] ${message}\n`;
-
- console.log(logMessage.trim());
-
- try {
- fs.appendFileSync(LOG_FILE, logMessage);
- } catch (error) {
- console.error('Failed to write to log file:', error);
- }
- }
-
- // System metrics
- collectSystemMetrics() {
- try {
- this.metrics.system = {
- uptime: os.uptime(),
- loadavg: os.loadavg(),
- memory: {
- total: os.totalmem(),
- free: os.freemem(),
- used: os.totalmem() - os.freemem(),
- usage_percent: ((os.totalmem() - os.freemem()) / os.totalmem() * 100).toFixed(2)
- },
- cpu: {
- count: os.cpus().length,
- model: os.cpus()[0]?.model || 'unknown'
- }
- };
- } catch (error) {
- this.log(`❌ Error collecting system metrics: ${error.message}`);
- }
- }
-
- // Docker metrics
- collectDockerMetrics() {
- try {
- // Get container stats
- const dockerStats = execSync('docker stats --no-stream --format "table {{.Container}}\\t{{.CPUPerc}}\\t{{.MemUsage}}\\t{{.NetIO}}"', { encoding: 'utf8' });
-
- this.metrics.docker = {
- containers: this.parseDockerStats(dockerStats),
- images: this.getDockerImages(),
- volumes: this.getDockerVolumes()
- };
- } catch (error) {
- this.log(`❌ Error collecting Docker metrics: ${error.message}`);
- }
- }
-
- parseDockerStats(stats) {
- const lines = stats.split('\n').slice(1); // Skip header
- return lines.filter(line => line.trim()).map(line => {
- const parts = line.split('\t');
- return {
- container: parts[0],
- cpu_percent: parts[1],
- memory_usage: parts[2],
- network_io: parts[3]
- };
- });
- }
-
- getDockerImages() {
- try {
- const images = execSync('docker images --format "{{.Repository}}:{{.Tag}}\\t{{.Size}}"', { encoding: 'utf8' });
- return images.split('\n').filter(line => line.trim()).map(line => {
- const [name, size] = line.split('\t');
- return { name, size };
- });
- } catch (error) {
- this.log(`❌ Error getting Docker images: ${error.message}`);
- return [];
- }
- }
-
- getDockerVolumes() {
- try {
- const volumes = execSync('docker volume ls --format "{{.Name}}"', { encoding: 'utf8' });
- return volumes.split('\n').filter(line => line.trim());
- } catch (error) {
- this.log(`❌ Error getting Docker volumes: ${error.message}`);
- return [];
- }
- }
-
- // Application metrics
- collectApplicationMetrics() {
- try {
- this.metrics.application = {
- endpoints: this.checkApplicationEndpoints(),
- response_times: this.measureResponseTimes(),
- health_status: this.checkHealthStatus()
- };
- } catch (error) {
- this.log(`❌ Error collecting application metrics: ${error.message}`);
- }
- }
-
- checkApplicationEndpoints() {
- const endpoints = [
- 'http://claude-flow-dev:3000/health',
- 'http://claude-flow-prod:3000/health'
- ];
-
- return endpoints.map(endpoint => {
- try {
- const start = Date.now();
- execSync(`curl -f ${endpoint}`, { timeout: 5000 });
- const end = Date.now();
-
- return {
- endpoint,
- status: 'healthy',
- response_time: end - start
- };
- } catch (error) {
- return {
- endpoint,
- status: 'unhealthy',
- error: error.message
- };
- }
- });
- }
-
- measureResponseTimes() {
- const urls = [
- 'http://claude-flow-dev:3000/api/status',
- 'http://claude-flow-dev:3000/api/agents',
- 'http://claude-flow-dev:3000/api/memory'
- ];
-
- return urls.map(url => {
- try {
- const start = Date.now();
- execSync(`curl -f ${url}`, { timeout: 10000 });
- const end = Date.now();
-
- return {
- url,
- response_time: end - start,
- status: 'success'
- };
- } catch (error) {
- return {
- url,
- response_time: -1,
- status: 'error',
- error: error.message
- };
- }
- });
- }
-
- checkHealthStatus() {
- try {
- const containers = execSync('docker ps --format "{{.Names}}\\t{{.Status}}"', { encoding: 'utf8' });
- return containers.split('\n').filter(line => line.trim()).map(line => {
- const [name, status] = line.split('\t');
- return { container: name, status };
- });
- } catch (error) {
- this.log(`❌ Error checking health status: ${error.message}`);
- return [];
- }
- }
-
- // Network metrics
- collectNetworkMetrics() {
- try {
- this.metrics.network = {
- interfaces: this.getNetworkInterfaces(),
- docker_networks: this.getDockerNetworks()
- };
- } catch (error) {
- this.log(`❌ Error collecting network metrics: ${error.message}`);
- }
- }
-
- getNetworkInterfaces() {
- const interfaces = os.networkInterfaces();
- return Object.keys(interfaces).map(name => ({
- name,
- addresses: interfaces[name].map(addr => ({
- address: addr.address,
- family: addr.family,
- internal: addr.internal
- }))
- }));
- }
-
- getDockerNetworks() {
- try {
- const networks = execSync('docker network ls --format "{{.Name}}\\t{{.Driver}}"', { encoding: 'utf8' });
- return networks.split('\n').filter(line => line.trim()).map(line => {
- const [name, driver] = line.split('\t');
- return { name, driver };
- });
- } catch (error) {
- this.log(`❌ Error getting Docker networks: ${error.message}`);
- return [];
- }
- }
-
- // Collect all metrics
- collectAllMetrics() {
- this.log('📊 Collecting performance metrics...');
-
- this.collectSystemMetrics();
- this.collectDockerMetrics();
- this.collectApplicationMetrics();
- this.collectNetworkMetrics();
-
- this.metrics.collection_duration = Date.now() - this.startTime;
- this.metrics.timestamp = new Date().toISOString();
-
- this.log('✅ Metrics collection completed');
- }
-
- // Save metrics
- saveMetrics() {
- try {
- const metricsJson = JSON.stringify(this.metrics, null, 2);
- fs.writeFileSync(METRICS_OUTPUT, metricsJson);
- this.log(`📝 Metrics saved to ${METRICS_OUTPUT}`);
- } catch (error) {
- this.log(`❌ Error saving metrics: ${error.message}`);
- }
- }
-
- // Generate performance report
- generateReport() {
- const report = {
- summary: {
- timestamp: this.metrics.timestamp,
- system_health: this.assessSystemHealth(),
- docker_health: this.assessDockerHealth(),
- application_health: this.assessApplicationHealth(),
- recommendations: this.generateRecommendations()
- },
- detailed_metrics: this.metrics
- };
-
- try {
- const reportPath = '/shared/performance-report.json';
- fs.writeFileSync(reportPath, JSON.stringify(report, null, 2));
- this.log(`📋 Performance report generated: ${reportPath}`);
- } catch (error) {
- this.log(`❌ Error generating report: ${error.message}`);
- }
- }
-
- assessSystemHealth() {
- const memoryUsage = parseFloat(this.metrics.system.memory?.usage_percent || 0);
- const loadAvg = this.metrics.system.loadavg?.[0] || 0;
-
- if (memoryUsage > 90 || loadAvg > 4) return 'critical';
- if (memoryUsage > 70 || loadAvg > 2) return 'warning';
- return 'healthy';
- }
-
- assessDockerHealth() {
- const containers = this.metrics.docker.containers || [];
- const unhealthyContainers = containers.filter(c =>
- c.cpu_percent && parseFloat(c.cpu_percent.replace('%', '')) > 90
- );
-
- if (unhealthyContainers.length > 0) return 'warning';
- return 'healthy';
- }
-
- assessApplicationHealth() {
- const endpoints = this.metrics.application.endpoints || [];
- const unhealthyEndpoints = endpoints.filter(e => e.status !== 'healthy');
-
- if (unhealthyEndpoints.length > 0) return 'critical';
- return 'healthy';
- }
-
- generateRecommendations() {
- const recommendations = [];
-
- const memoryUsage = parseFloat(this.metrics.system.memory?.usage_percent || 0);
- if (memoryUsage > 80) {
- recommendations.push('Consider increasing container memory limits');
- }
-
- const loadAvg = this.metrics.system.loadavg?.[0] || 0;
- if (loadAvg > 2) {
- recommendations.push('High CPU load detected - consider scaling containers');
- }
-
- const endpoints = this.metrics.application.endpoints || [];
- const slowEndpoints = endpoints.filter(e => e.response_time > 5000);
- if (slowEndpoints.length > 0) {
- recommendations.push('Slow response times detected - optimize application performance');
- }
-
- return recommendations;
- }
-
- // Main monitoring loop
- async startMonitoring() {
- this.log(`🔄 Starting monitoring loop (interval: ${MONITOR_INTERVAL}s)`);
-
- while (true) {
- try {
- this.collectAllMetrics();
- this.saveMetrics();
- this.generateReport();
-
- await new Promise(resolve => setTimeout(resolve, MONITOR_INTERVAL * 1000));
- } catch (error) {
- this.log(`❌ Error in monitoring loop: ${error.message}`);
- await new Promise(resolve => setTimeout(resolve, 5000)); // Wait 5s before retry
- }
- }
- }
-}
-
-// Handle graceful shutdown
-process.on('SIGINT', () => {
- console.log('\n🛑 Shutting down performance monitor...');
- process.exit(0);
-});
-
-process.on('SIGTERM', () => {
- console.log('\n🛑 Shutting down performance monitor...');
- process.exit(0);
-});
-
-// Start monitoring
-const monitor = new PerformanceMonitor();
-monitor.startMonitoring().catch(error => {
- console.error('❌ Fatal error in performance monitor:', error);
- process.exit(1);
-});
\ No newline at end of file
diff --git a/archive/infrastructure/docker/testing/scripts/run-all-tests.sh b/archive/infrastructure/docker/testing/scripts/run-all-tests.sh
deleted file mode 100755
index 0bc75d0b21..0000000000
--- a/archive/infrastructure/docker/testing/scripts/run-all-tests.sh
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/bin/bash
-
-# Comprehensive test runner for Docker environment
-# Runs all test suites with proper coordination and reporting
-
-set -euo pipefail
-
-# Colors for output
-RED='\033[0;31m'
-GREEN='\033[0;32m'
-YELLOW='\033[1;33m'
-BLUE='\033[0;34m'
-NC='\033[0m' # No Color
-
-# Configuration
-TEST_DIR="/app/test-results"
-SHARED_DIR="/app/docker-test/volumes/shared"
-TIMESTAMP=$(date +%Y%m%d_%H%M%S)
-
-# Ensure directories exist
-mkdir -p "$TEST_DIR" "$SHARED_DIR"
-
-# Logging function
-log() {
- echo -e "${1}" | tee -a "$TEST_DIR/test-runner-$TIMESTAMP.log"
-}
-
-# Function to run test suite
-run_test_suite() {
- local suite_name="$1"
- local test_command="$2"
- local output_file="$TEST_DIR/${suite_name}-${TIMESTAMP}.log"
-
- log "${YELLOW}🧪 Running $suite_name tests...${NC}"
-
- if eval "$test_command" > "$output_file" 2>&1; then
- log "${GREEN}✅ $suite_name tests passed${NC}"
- return 0
- else
- log "${RED}❌ $suite_name tests failed${NC}"
- cat "$output_file"
- return 1
- fi
-}
-
-# Function to check service health
-check_service_health() {
- local service_name="$1"
- local health_url="$2"
- local max_attempts=30
- local attempt=0
-
- log "${BLUE}🔍 Checking $service_name health...${NC}"
-
- while [ $attempt -lt $max_attempts ]; do
- if curl -f "$health_url" >/dev/null 2>&1; then
- log "${GREEN}✅ $service_name is healthy${NC}"
- return 0
- fi
-
- attempt=$((attempt + 1))
- sleep 2
- done
-
- log "${RED}❌ $service_name health check failed${NC}"
- return 1
-}
-
-# Main test execution
-main() {
- log "${BLUE}🚀 Starting comprehensive test suite...${NC}"
- log "${BLUE}📅 Started at: $(date)${NC}"
-
- local failed_tests=0
-
- # Unit tests
- if ! run_test_suite "unit" "npm run test:unit -- --verbose --coverage"; then
- failed_tests=$((failed_tests + 1))
- fi
-
- # Integration tests
- if ! run_test_suite "integration" "npm run test:integration -- --verbose"; then
- failed_tests=$((failed_tests + 1))
- fi
-
- # CLI tests
- if ! run_test_suite "cli" "npm run test:cli -- --verbose"; then
- failed_tests=$((failed_tests + 1))
- fi
-
- # Swarm coordination tests
- if ! run_test_suite "swarm" "npm run test:swarm -- --verbose"; then
- failed_tests=$((failed_tests + 1))
- fi
-
- # MCP integration tests
- if ! run_test_suite "mcp" "npm run test:mcp -- --verbose"; then
- failed_tests=$((failed_tests + 1))
- fi
-
- # Memory system tests
- if ! run_test_suite "memory" "npm run test:memory -- --verbose"; then
- failed_tests=$((failed_tests + 1))
- fi
-
- # Performance tests
- if ! run_test_suite "performance" "npm run test:performance -- --verbose"; then
- failed_tests=$((failed_tests + 1))
- fi
-
- # E2E tests
- if ! run_test_suite "e2e" "npm run test:e2e -- --verbose"; then
- failed_tests=$((failed_tests + 1))
- fi
-
- # Generate test report
- cat > "$TEST_DIR/test-summary-$TIMESTAMP.json" << EOF
-{
- "timestamp": "$TIMESTAMP",
- "total_suites": 8,
- "passed_suites": $((8 - failed_tests)),
- "failed_suites": $failed_tests,
- "success_rate": $(echo "scale=2; $((8 - failed_tests)) * 100 / 8" | bc -l)%,
- "environment": "docker",
- "node_version": "$(node --version)",
- "npm_version": "$(npm --version)"
-}
-EOF
-
- # Store results in shared volume
- cp "$TEST_DIR/test-summary-$TIMESTAMP.json" "$SHARED_DIR/"
-
- if [ $failed_tests -eq 0 ]; then
- log "${GREEN}🎉 All test suites passed!${NC}"
- exit 0
- else
- log "${RED}❌ $failed_tests test suite(s) failed${NC}"
- exit 1
- fi
-}
-
-# Execute main function
-main "$@"
\ No newline at end of file
diff --git a/archive/infrastructure/docker/testing/test-mcp-tools.sh b/archive/infrastructure/docker/testing/test-mcp-tools.sh
deleted file mode 100755
index bc0b9d2845..0000000000
--- a/archive/infrastructure/docker/testing/test-mcp-tools.sh
+++ /dev/null
@@ -1,331 +0,0 @@
-#!/bin/bash
-
-# Comprehensive MCP Tool Testing Script
-# Usage: ./test-mcp-tools.sh [npx|npm] [category] [tool_name]
-
-INSTALL_METHOD=${1:-npx}
-CATEGORY=${2:-all}
-TOOL_NAME=${3:-all}
-
-# Colors for output
-RED='\033[0;31m'
-GREEN='\033[0;32m'
-YELLOW='\033[1;33m'
-BLUE='\033[0;34m'
-NC='\033[0m' # No Color
-
-# Logging functions
-log_info() {
- echo -e "${BLUE}[INFO]${NC} $(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a /test/logs/test.log
-}
-
-log_success() {
- echo -e "${GREEN}[SUCCESS]${NC} $(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a /test/logs/test.log
-}
-
-log_error() {
- echo -e "${RED}[ERROR]${NC} $(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a /test/logs/test.log
-}
-
-log_warning() {
- echo -e "${YELLOW}[WARNING]${NC} $(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a /test/logs/test.log
-}
-
-# Initialize results tracking
-init_results() {
- mkdir -p /test/results
- echo '{"test_start": "'$(date -Iseconds)'", "install_method": "'$INSTALL_METHOD'", "results": {}}' > /test/results/test_results.json
-}
-
-# Get claude-flow command based on install method
-get_command() {
- if [ "$INSTALL_METHOD" = "npx" ]; then
- echo "npx [email protected]"
- else
- echo "./node_modules/.bin/claude-flow"
- fi
-}
-
-# Test individual MCP tool
-test_mcp_tool() {
- local tool_name=$1
- local test_params=$2
- local expected_fields=$3
-
- log_info "Testing tool: $tool_name with params: $test_params"
-
- local cmd=$(get_command)
- local start_time=$(date +%s.%N)
-
- # Start MCP server in background
- timeout 10s $cmd mcp start --stdio > /tmp/mcp_output_$tool_name.log 2>&1 &
- local mcp_pid=$!
- sleep 2
-
- # Test tool via JSON-RPC
- local test_message="{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{\"tools\":{},\"resources\":{}},\"clientInfo\":{\"name\":\"test\",\"version\":\"1.0.0\"}}}
-{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"$tool_name\",\"arguments\":$test_params}}"
-
- local result=$(echo "$test_message" | timeout 5s $cmd mcp start --stdio 2>/dev/null | tail -1)
- local end_time=$(date +%s.%N)
- local duration=$(echo "$end_time - $start_time" | bc)
-
- # Kill MCP server
- kill $mcp_pid 2>/dev/null || true
-
- # Validate result
- if echo "$result" | jq -e '.result.content[0].text' > /dev/null 2>&1; then
- local response=$(echo "$result" | jq -r '.result.content[0].text')
- if echo "$response" | jq -e '.success' > /dev/null 2>&1; then
- log_success "Tool $tool_name executed successfully (${duration}s)"
- echo "$response" > "/test/results/${tool_name}_result.json"
-
- # Update results
- local temp_file=$(mktemp)
- jq --arg tool "$tool_name" --arg status "success" --arg duration "$duration" --argjson response "$response" \
- '.results[$tool] = {"status": $status, "duration": ($duration | tonumber), "response": $response}' \
- /test/results/test_results.json > "$temp_file" && mv "$temp_file" /test/results/test_results.json
-
- return 0
- else
- log_error "Tool $tool_name returned failure response"
- return 1
- fi
- else
- log_error "Tool $tool_name failed to execute or returned invalid response"
- return 1
- fi
-}
-
-# Test tool categories
-test_swarm_tools() {
- log_info "Testing Swarm Coordination Tools (12 tools)"
-
- test_mcp_tool "swarm_init" '{"topology":"hierarchical","maxAgents":5,"strategy":"auto"}'
- test_mcp_tool "agent_spawn" '{"type":"researcher","name":"test-agent"}'
- test_mcp_tool "task_orchestrate" '{"task":"test task","strategy":"parallel"}'
- test_mcp_tool "swarm_status" '{}'
- test_mcp_tool "agent_list" '{}'
- test_mcp_tool "agent_metrics" '{"agentId":"test-agent"}'
- test_mcp_tool "swarm_monitor" '{"interval":5}'
- test_mcp_tool "topology_optimize" '{}'
- test_mcp_tool "load_balance" '{"tasks":["task1","task2"]}'
- test_mcp_tool "coordination_sync" '{}'
- test_mcp_tool "swarm_scale" '{"targetSize":3}'
- test_mcp_tool "swarm_destroy" '{"swarmId":"test-swarm"}'
-}
-
-test_neural_tools() {
- log_info "Testing Neural Network Tools (15 tools)"
-
- test_mcp_tool "neural_status" '{}'
- test_mcp_tool "neural_train" '{"pattern_type":"coordination","training_data":"test_data","epochs":10}'
- test_mcp_tool "neural_patterns" '{"action":"analyze","operation":"test_op"}'
- test_mcp_tool "neural_predict" '{"modelId":"test-model","input":"test input"}'
- test_mcp_tool "model_load" '{"modelPath":"/tmp/test_model"}'
- test_mcp_tool "model_save" '{"modelId":"test-model","path":"/tmp/saved_model"}'
- test_mcp_tool "wasm_optimize" '{"operation":"test_optimization"}'
- test_mcp_tool "inference_run" '{"modelId":"test-model","data":["test","data"]}'
- test_mcp_tool "pattern_recognize" '{"data":["pattern1","pattern2"]}'
- test_mcp_tool "cognitive_analyze" '{"behavior":"test_behavior"}'
- test_mcp_tool "learning_adapt" '{"experience":{"type":"test","outcome":"success"}}'
- test_mcp_tool "neural_compress" '{"modelId":"test-model","ratio":0.5}'
- test_mcp_tool "ensemble_create" '{"models":["model1","model2"],"strategy":"voting"}'
- test_mcp_tool "transfer_learn" '{"sourceModel":"source","targetDomain":"target"}'
- test_mcp_tool "neural_explain" '{"modelId":"test-model","prediction":{"class":"A","confidence":0.9}}'
-}
-
-test_memory_tools() {
- log_info "Testing Memory & Persistence Tools (12 tools)"
-
- test_mcp_tool "memory_usage" '{"action":"store","key":"test_key","value":"test_value"}'
- test_mcp_tool "memory_search" '{"pattern":"test*","limit":10}'
- test_mcp_tool "memory_persist" '{"sessionId":"test-session"}'
- test_mcp_tool "memory_namespace" '{"namespace":"test_ns","action":"create"}'
- test_mcp_tool "memory_backup" '{"path":"/tmp/backup"}'
- test_mcp_tool "memory_restore" '{"backupPath":"/tmp/backup"}'
- test_mcp_tool "memory_compress" '{"namespace":"test_ns"}'
- test_mcp_tool "memory_sync" '{"target":"remote_instance"}'
- test_mcp_tool "cache_manage" '{"action":"clear","key":"test_cache"}'
- test_mcp_tool "state_snapshot" '{"name":"test_snapshot"}'
- test_mcp_tool "context_restore" '{"snapshotId":"test_snapshot"}'
- test_mcp_tool "memory_analytics" '{"timeframe":"24h"}'
-}
-
-test_analysis_tools() {
- log_info "Testing Analysis & Monitoring Tools (13 tools)"
-
- test_mcp_tool "task_status" '{"taskId":"test-task"}'
- test_mcp_tool "task_results" '{"taskId":"test-task"}'
- test_mcp_tool "benchmark_run" '{"suite":"performance"}'
- test_mcp_tool "bottleneck_analyze" '{"component":"test_component"}'
- test_mcp_tool "performance_report" '{"timeframe":"24h","format":"summary"}'
- test_mcp_tool "token_usage" '{"operation":"test_op"}'
- test_mcp_tool "metrics_collect" '{"components":["cpu","memory"]}'
- test_mcp_tool "trend_analysis" '{"metric":"response_time","period":"7d"}'
- test_mcp_tool "cost_analysis" '{"timeframe":"30d"}'
- test_mcp_tool "quality_assess" '{"target":"test_system","criteria":["performance","reliability"]}'
- test_mcp_tool "error_analysis" '{"logs":["error1","error2"]}'
- test_mcp_tool "usage_stats" '{"component":"api"}'
- test_mcp_tool "health_check" '{"components":["database","api","cache"]}'
-}
-
-test_workflow_tools() {
- log_info "Testing Workflow & Automation Tools (11 tools)"
-
- test_mcp_tool "workflow_create" '{"name":"test_workflow","steps":["step1","step2"],"triggers":["manual"]}'
- test_mcp_tool "workflow_execute" '{"workflowId":"test_workflow","params":{}}'
- test_mcp_tool "workflow_export" '{"workflowId":"test_workflow","format":"json"}'
- test_mcp_tool "sparc_mode" '{"mode":"dev","task_description":"test development task"}'
- test_mcp_tool "automation_setup" '{"rules":[{"trigger":"event","action":"response"}]}'
- test_mcp_tool "pipeline_create" '{"config":{"stages":["build","test","deploy"]}}'
- test_mcp_tool "scheduler_manage" '{"action":"create","schedule":{"cron":"0 0 * * *"}}'
- test_mcp_tool "trigger_setup" '{"events":["push"],"actions":["build"]}'
- test_mcp_tool "workflow_template" '{"action":"create","template":{"name":"ci_template"}}'
- test_mcp_tool "batch_process" '{"items":["item1","item2"],"operation":"transform"}'
- test_mcp_tool "parallel_execute" '{"tasks":[{"id":"task1"},{"id":"task2"}]}'
-}
-
-test_github_tools() {
- log_info "Testing GitHub Integration Tools (8 tools)"
-
- test_mcp_tool "github_repo_analyze" '{"repo":"test/repo","analysis_type":"code_quality"}'
- test_mcp_tool "github_pr_manage" '{"repo":"test/repo","action":"review","pr_number":1}'
- test_mcp_tool "github_issue_track" '{"repo":"test/repo","action":"list"}'
- test_mcp_tool "github_release_coord" '{"repo":"test/repo","version":"v1.0.0"}'
- test_mcp_tool "github_workflow_auto" '{"repo":"test/repo","workflow":{"name":"ci"}}'
- test_mcp_tool "github_code_review" '{"repo":"test/repo","pr":1}'
- test_mcp_tool "github_sync_coord" '{"repos":["repo1","repo2"]}'
- test_mcp_tool "github_metrics" '{"repo":"test/repo"}'
-}
-
-test_daa_tools() {
- log_info "Testing DAA Tools (8 tools)"
-
- test_mcp_tool "daa_agent_create" '{"agent_type":"worker","capabilities":["compute","storage"]}'
- test_mcp_tool "daa_capability_match" '{"task_requirements":["cpu","memory"],"available_agents":[]}'
- test_mcp_tool "daa_resource_alloc" '{"resources":{"cpu":2,"memory":"4GB"},"agents":["agent1"]}'
- test_mcp_tool "daa_lifecycle_manage" '{"agentId":"test-agent","action":"start"}'
- test_mcp_tool "daa_communication" '{"from":"agent1","to":"agent2","message":{"type":"task","data":"test"}}'
- test_mcp_tool "daa_consensus" '{"agents":["agent1","agent2"],"proposal":{"action":"migrate"}}'
- test_mcp_tool "daa_fault_tolerance" '{"agentId":"test-agent","strategy":"retry"}'
- test_mcp_tool "daa_optimization" '{"target":"throughput","metrics":["latency","cpu"]}'
-}
-
-test_system_tools() {
- log_info "Testing System & Utilities Tools (8 tools)"
-
- test_mcp_tool "terminal_execute" '{"command":"echo","args":["hello"]}'
- test_mcp_tool "config_manage" '{"action":"get","config":{"section":"general"}}'
- test_mcp_tool "features_detect" '{"component":"mcp_server"}'
- test_mcp_tool "security_scan" '{"target":"localhost","depth":"basic"}'
- test_mcp_tool "backup_create" '{"components":["config","data"],"destination":"/tmp/backup"}'
- test_mcp_tool "restore_system" '{"backupId":"backup_123"}'
- test_mcp_tool "log_analysis" '{"logFile":"/var/log/app.log","patterns":["ERROR","WARN"]}'
- test_mcp_tool "diagnostic_run" '{"components":["network","disk","memory"]}'
-}
-
-# Test persistence by running multiple operations
-test_persistence() {
- log_info "Testing data persistence across operations"
-
- # Store data
- test_mcp_tool "memory_usage" '{"action":"store","key":"persist_test","value":"test_data_123"}'
-
- # Retrieve data
- test_mcp_tool "memory_usage" '{"action":"retrieve","key":"persist_test"}'
-
- # Verify data persisted
- if [ -f "/test/results/memory_usage_result.json" ]; then
- local retrieved_value=$(jq -r '.value' /test/results/memory_usage_result.json)
- if [ "$retrieved_value" = "test_data_123" ] || [ "$retrieved_value" = "Retrieved value for persist_test" ]; then
- log_success "Data persistence test passed"
- return 0
- else
- log_error "Data persistence test failed - value mismatch"
- return 1
- fi
- else
- log_error "Data persistence test failed - no result file"
- return 1
- fi
-}
-
-# Generate final report
-generate_report() {
- log_info "Generating final test report"
-
- local total_tests=$(jq -r '.results | length' /test/results/test_results.json)
- local successful_tests=$(jq -r '.results | to_entries | map(select(.value.status == "success")) | length' /test/results/test_results.json)
- local success_rate=$(echo "scale=2; $successful_tests * 100 / $total_tests" | bc)
- local avg_duration=$(jq -r '.results | to_entries | map(.value.duration) | add / length' /test/results/test_results.json)
-
- # Update final results
- local temp_file=$(mktemp)
- jq --arg end_time "$(date -Iseconds)" --arg total "$total_tests" --arg successful "$successful_tests" \
- --arg success_rate "$success_rate" --arg avg_duration "$avg_duration" \
- '.test_end = $end_time | .summary = {"total_tests": ($total | tonumber), "successful_tests": ($successful | tonumber), "success_rate": ($success_rate | tonumber), "avg_duration": ($avg_duration | tonumber)}' \
- /test/results/test_results.json > "$temp_file" && mv "$temp_file" /test/results/test_results.json
-
- log_success "Test Report Summary:"
- log_success "Total Tests: $total_tests"
- log_success "Successful: $successful_tests"
- log_success "Success Rate: ${success_rate}%"
- log_success "Average Duration: ${avg_duration}s"
-
- # Output final JSON report
- cat /test/results/test_results.json
-}
-
-# Main execution
-main() {
- log_info "Starting MCP Tool Testing with $INSTALL_METHOD installation method"
- init_results
-
- case $CATEGORY in
- "swarm")
- test_swarm_tools
- ;;
- "neural")
- test_neural_tools
- ;;
- "memory")
- test_memory_tools
- ;;
- "analysis")
- test_analysis_tools
- ;;
- "workflow")
- test_workflow_tools
- ;;
- "github")
- test_github_tools
- ;;
- "daa")
- test_daa_tools
- ;;
- "system")
- test_system_tools
- ;;
- "all")
- test_swarm_tools
- test_neural_tools
- test_memory_tools
- test_analysis_tools
- test_workflow_tools
- test_github_tools
- test_daa_tools
- test_system_tools
- test_persistence
- ;;
- *)
- log_error "Unknown category: $CATEGORY"
- exit 1
- ;;
- esac
-
- generate_report
-}
-
-# Execute main function
-main "$@"
\ No newline at end of file
diff --git a/archive/legacy-memory-system/README.md b/archive/legacy-memory-system/README.md
deleted file mode 100644
index e8a14159b3..0000000000
--- a/archive/legacy-memory-system/README.md
+++ /dev/null
@@ -1,379 +0,0 @@
-# SPARC Memory Bank
-
-A sophisticated persistent memory system for Claude-Flow, providing CRDT-based conflict resolution, hybrid storage backends, advanced indexing, and distributed replication capabilities.
-
-## Features
-
-- **Hybrid Storage Backends**: Choose between SQLite for performance or Markdown for human-readability
-- **CRDT Conflict Resolution**: Automatic conflict resolution for distributed scenarios
-- **Advanced Caching**: LRU, LFU, and FIFO cache strategies with TTL support
-- **Vector Search**: Semantic search capabilities with vector embeddings
-- **Namespace Isolation**: Session-based memory isolation with fine-grained permissions
-- **Replication Support**: Master-slave and peer-to-peer replication modes
-- **Time-Travel Queries**: Query historical states with point-in-time recovery
-- **Import/Export**: Multiple formats (JSON, Markdown, CSV) with encryption support
-
-## Installation
-
-```bash
-npm install @claude-flow/memory
-```
-
-## Quick Start
-
-```typescript
-import { MemoryManager } from '@claude-flow/memory';
-
-// Initialize with SQLite backend
-const memory = new MemoryManager({
- backend: 'sqlite',
- backendConfig: {
- path: './memory.db'
- },
- cacheConfig: {
- maxSize: 1000,
- ttl: 3600000, // 1 hour
- strategy: 'lru'
- }
-});
-
-await memory.initialize();
-
-// Store a memory item
-await memory.store({
- category: 'knowledge',
- key: 'important-fact',
- value: { data: 'Claude-Flow is awesome!' },
- metadata: {
- tags: ['important', 'claude-flow'],
- confidence: 0.95
- }
-});
-
-// Query memory
-const results = await memory.query({
- categories: ['knowledge'],
- tags: ['important']
-});
-
-// Close when done
-await memory.close();
-```
-
-## Architecture
-
-### Core Components
-
-1. **Memory Manager**: Central coordinator for all memory operations
-2. **Storage Backends**: Pluggable storage implementations (SQLite, Markdown)
-3. **Cache Layer**: High-performance caching with multiple eviction strategies
-4. **Indexer**: Fast queries and vector search support
-5. **Replication Manager**: Distributed memory synchronization
-6. **Namespace Manager**: Multi-tenant memory isolation
-
-### Storage Backends
-
-#### SQLite Backend
-
-Optimized for performance with:
-- Full-text search using FTS5
-- Efficient indexing on all query fields
-- Version history for time-travel queries
-- ACID compliance with WAL mode
-
-```typescript
-const memory = new MemoryManager({
- backend: 'sqlite',
- backendConfig: {
- path: './memory.db',
- wal: true,
- verbose: true
- }
-});
-```
-
-#### Markdown Backend
-
-Human-readable storage with:
-- Organized directory structure
-- YAML frontmatter metadata
-- Git-friendly format
-- Easy manual editing
-
-```typescript
-const memory = new MemoryManager({
- backend: 'markdown',
- backendConfig: {
- rootPath: './memory',
- prettyPrint: true,
- gitIntegration: true
- }
-});
-```
-
-### Cache Strategies
-
-- **LRU (Least Recently Used)**: Evicts least recently accessed items
-- **LFU (Least Frequently Used)**: Evicts least frequently accessed items
-- **FIFO (First In, First Out)**: Evicts oldest items first
-
-```typescript
-const memory = new MemoryManager({
- cacheConfig: {
- maxSize: 1000, // Maximum items
- ttl: 3600000, // Time to live (ms)
- strategy: 'lru', // or 'lfu', 'fifo'
- onEvict: (key, value) => {
- console.log(`Evicted: ${key}`);
- }
- }
-});
-```
-
-## Advanced Features
-
-### Vector Search
-
-Enable semantic search with vector embeddings:
-
-```typescript
-const memory = new MemoryManager({
- enableIndexing: true
-});
-
-// Store with embedding
-await memory.store({
- category: 'documents',
- key: 'doc1',
- value: 'Machine learning in production',
- vectorEmbedding: [0.1, 0.2, 0.3, ...] // 384 dimensions
-});
-
-// Search semantically
-const results = await memory.query({
- vectorSearch: {
- embedding: queryEmbedding,
- topK: 10,
- threshold: 0.8
- }
-});
-```
-
-### Namespaces
-
-Isolate memory by namespace with permissions:
-
-```typescript
-// Create namespace
-const namespace = await namespaceManager.createNamespace({
- name: 'Project Alpha',
- permissions: {
- read: ['user1', 'user2'],
- write: ['user1'],
- delete: ['admin'],
- admin: ['admin']
- }
-});
-
-// Create session
-const sessionId = namespaceManager.createSession(
- namespace.id,
- 'user1',
- ['read', 'write']
-);
-
-// Store in namespace
-await memory.store(item, namespace.id);
-```
-
-### Replication
-
-Synchronize memory across multiple nodes:
-
-```typescript
-const memory = new MemoryManager({
- replicationConfig: {
- mode: 'peer-to-peer',
- nodes: [
- { id: 'node1', url: 'http://node1:3000' },
- { id: 'node2', url: 'http://node2:3000' }
- ],
- syncInterval: 60000,
- conflictResolution: 'last-write-wins'
- }
-});
-
-// Manual sync
-await replicationManager.syncWithNode('node1');
-```
-
-### Time-Travel Queries
-
-Query historical states:
-
-```typescript
-// Query as of 1 hour ago
-const historicalItems = await memory.query({
- asOf: Date.now() - 3600000
-});
-
-// Query time range
-const rangeItems = await memory.query({
- startTime: yesterday,
- endTime: today
-});
-```
-
-### Import/Export
-
-Export memory for backup or migration:
-
-```typescript
-const exportManager = new ImportExportManager();
-
-// Export to JSON
-const json = await exportManager.export(items, {
- format: 'json',
- includeMetadata: true,
- compress: true,
- encryption: {
- algorithm: 'aes-256-cbc',
- key: 'your-secret-key'
- }
-});
-
-// Import from file
-const imported = await exportManager.importFromFile('./backup.json', {
- format: 'json',
- compress: true,
- encryption: { ... }
-});
-```
-
-## CRDT Conflict Resolution
-
-The memory system uses Conflict-free Replicated Data Types (CRDTs) for automatic conflict resolution:
-
-1. **Last-Write-Wins**: Uses vector clocks to determine the most recent update
-2. **Deep Merge**: Merges object values when concurrent updates occur
-3. **Version Tracking**: Maintains complete version history
-
-```typescript
-// Concurrent updates are automatically resolved
-const item1 = { id: 'x', value: { a: 1, b: 2 } };
-const item2 = { id: 'x', value: { b: 3, c: 4 } };
-
-// Result: { a: 1, b: 3, c: 4 }
-```
-
-## Performance Optimization
-
-### Indexing
-
-Indexes are automatically maintained for:
-- Categories
-- Keys
-- Tags
-- Namespaces
-- Timestamps
-- Vector embeddings
-
-### Query Optimization
-
-```typescript
-// Efficient queries with multiple filters
-const results = await memory.query({
- categories: ['users', 'accounts'],
- tags: ['active', 'premium'],
- namespace: 'production',
- orderBy: 'timestamp',
- orderDirection: 'desc',
- limit: 100,
- offset: 0
-});
-```
-
-### Batch Operations
-
-```typescript
-// Batch import for better performance
-await memory.import({
- version: '1.0',
- items: largeArrayOfItems
-}, { merge: true });
-```
-
-## Testing
-
-Run the comprehensive test suite:
-
-```bash
-npm test # Run all tests
-npm run test:watch # Watch mode
-npm run test:coverage # Coverage report
-```
-
-## Examples
-
-See the [examples](./examples) directory for:
-- Basic usage
-- Advanced querying
-- Vector search
-- Replication setup
-- Custom backends
-- Agent coordination
-
-## API Reference
-
-### MemoryManager
-
-- `store(item, namespace?)`: Store a memory item
-- `get(category, key, namespace?)`: Retrieve an item
-- `query(query)`: Query items with filters
-- `delete(category, key, namespace?)`: Delete an item
-- `export(options?)`: Export memory snapshot
-- `import(snapshot, options?)`: Import memory snapshot
-- `getStats()`: Get memory statistics
-- `close()`: Close and cleanup
-
-### Types
-
-```typescript
-interface MemoryItem {
- id: string;
- category: string;
- key: string;
- value: any;
- metadata?: MemoryMetadata;
- vectorEmbedding?: number[];
- ttl?: number;
-}
-
-interface MemoryQuery {
- categories?: string[];
- keys?: string[];
- tags?: string[];
- namespace?: string;
- startTime?: number;
- endTime?: number;
- asOf?: number;
- limit?: number;
- offset?: number;
- orderBy?: 'timestamp' | 'key' | 'category';
- orderDirection?: 'asc' | 'desc';
- vectorSearch?: VectorSearchOptions;
- filter?: (item: MemoryItem) => boolean;
-}
-```
-
-## Contributing
-
-Contributions are welcome! Please read the contributing guidelines and submit pull requests.
-
-## License
-
-MIT License - see LICENSE file for details.
-
----
-
-Created by **rUv** - [github.com/ruvnet](https://github.com/ruvnet)
\ No newline at end of file
diff --git a/archive/legacy-memory-system/agents/README.md b/archive/legacy-memory-system/agents/README.md
deleted file mode 100644
index f1bd36c461..0000000000
--- a/archive/legacy-memory-system/agents/README.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Agent Memory Storage
-
-## Purpose
-This directory stores agent-specific memory data, configurations, and persistent state information for individual Claude agents in the orchestration system.
-
-## Structure
-Each agent gets its own subdirectory for isolated memory storage:
-
-```
-memory/agents/
-├── agent_001/
-│ ├── state.json # Agent state and configuration
-│ ├── knowledge.md # Agent-specific knowledge base
-│ ├── tasks.json # Completed and active tasks
-│ └── calibration.json # Agent-specific calibrations
-├── agent_002/
-│ └── ...
-└── shared/
- ├── common_knowledge.md # Shared knowledge across agents
- └── global_config.json # Global agent configurations
-```
-
-## Usage Guidelines
-1. **Agent Isolation**: Each agent should only read/write to its own directory
-2. **Shared Resources**: Use the `shared/` directory for cross-agent information
-3. **State Persistence**: Update state.json whenever agent status changes
-4. **Knowledge Sharing**: Document discoveries in knowledge.md files
-5. **Cleanup**: Remove directories for terminated agents periodically
-
-## Last Updated
-2025-06-16T20:04:49.343Z
diff --git a/archive/legacy-memory-system/backups/backup-2025-06-19T19-16-50-931Z.json b/archive/legacy-memory-system/backups/backup-2025-06-19T19-16-50-931Z.json
deleted file mode 100644
index 9598b6b32b..0000000000
--- a/archive/legacy-memory-system/backups/backup-2025-06-19T19-16-50-931Z.json
+++ /dev/null
@@ -1,187 +0,0 @@
-{
- "timestamp": "2025-06-19T19:16:50.932Z",
- "version": "1.0",
- "entries": [
- {
- "id": "entry_mc2ti5rs_5rhtkp56x",
- "key": "test-key",
- "value": {
- "data": "test value"
- },
- "type": "object",
- "namespace": "test-namespace",
- "tags": [
- "test",
- "demo"
- ],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-06-19T03:24:46.648Z",
- "updatedAt": "2025-06-19T03:24:46.648Z",
- "lastAccessedAt": "2025-06-19T18:56:14.638Z",
- "version": 1,
- "size": 50,
- "compressed": false,
- "checksum": "eee9ad0c23c54c98b836354da834f397021a040426a206f8e7fde150c9fcbff3",
- "references": [],
- "dependencies": []
- },
- {
- "id": "entry_mc3ozvl4_gxpvb86hx",
- "key": "mcp_integration_plan",
- "value": "{\"overview\":\"Comprehensive plan for integrating all SPARC and swarm tools into the MCP server\",\"phases\":[{\"phase\":1,\"name\":\"Tool Registration Architecture Enhancement\",\"description\":\"Enhance the existing MCP tool registration system to support SPARC modes and swarm tools\",\"tasks\":[\"Create sparc-tools.ts module for SPARC mode tool generation\",\"Enhance ToolRegistry to support tool categories and mode-based filtering\",\"Implement dynamic tool loading based on SPARC mode configuration\",\"Add tool capability metadata for each SPARC mode\"]},{\"phase\":2,\"name\":\"SPARC Tools Implementation\",\"description\":\"Create MCP tool wrappers for all 17 SPARC modes\",\"tasks\":[\"Implement createSparcTools() function similar to createClaudeFlowTools()\",\"Create individual tool factories for each SPARC mode\",\"Map SPARC mode tools to their MCP tool implementations\",\"Add SPARC context injection for mode-specific behavior\"]},{\"phase\":3,\"name\":\"Enhanced Swarm Tools Integration\",\"description\":\"Expand existing swarm-tools.ts with comprehensive swarm capabilities\",\"tasks\":[\"Add SPARC executor integration tools\",\"Create swarm orchestration tools for multi-agent coordination\",\"Implement memory-driven swarm coordination tools\",\"Add batch execution and workflow management tools\"]},{\"phase\":4,\"name\":\"Context and Capability Management\",\"description\":\"Implement context management for SPARC and swarm operations\",\"tasks\":[\"Create SparcToolContext interface extending MCPContext\",\"Implement capability negotiation for SPARC modes\",\"Add mode-specific tool filtering and validation\",\"Create tool discovery mechanism for SPARC modes\"]},{\"phase\":5,\"name\":\"Orchestration Integration\",\"description\":\"Deep integration with orchestration components\",\"tasks\":[\"Enhance MCPOrchestrationIntegration for SPARC support\",\"Add SPARC executor component integration\",\"Implement swarm coordinator tool registration\",\"Create unified tool context for all components\"]}],\"implementation_details\":{\"new_files\":[\"src/mcp/sparc-tools.ts - SPARC mode tool implementations\",\"src/mcp/sparc-context.ts - SPARC-specific context management\",\"src/mcp/tool-categories.ts - Tool categorization system\"],\"modified_files\":[\"src/mcp/server.ts - Add SPARC tool registration\",\"src/mcp/tools.ts - Enhance with category support\",\"src/mcp/swarm-tools.ts - Add comprehensive swarm tools\",\"src/mcp/orchestration-integration.ts - Add SPARC components\"],\"tool_mappings\":{\"orchestrator\":[\"TodoWrite\",\"TodoRead\",\"Task\",\"Memory\",\"Bash\"],\"coder\":[\"Read\",\"Write\",\"Edit\",\"Bash\",\"Glob\",\"Grep\",\"TodoWrite\"],\"researcher\":[\"WebSearch\",\"WebFetch\",\"Read\",\"Write\",\"Memory\",\"TodoWrite\",\"Task\"],\"tdd\":[\"Read\",\"Write\",\"Edit\",\"Bash\",\"TodoWrite\",\"Task\"],\"architect\":[\"Read\",\"Write\",\"Glob\",\"Memory\",\"TodoWrite\",\"Task\"],\"reviewer\":[\"Read\",\"Edit\",\"Grep\",\"Bash\",\"TodoWrite\",\"Memory\"],\"debugger\":[\"Read\",\"Edit\",\"Bash\",\"Grep\",\"TodoWrite\",\"Memory\"],\"tester\":[\"Read\",\"Write\",\"Edit\",\"Bash\",\"TodoWrite\",\"Task\"],\"analyzer\":[\"Read\",\"Grep\",\"Bash\",\"Write\",\"Memory\",\"TodoWrite\",\"Task\"],\"optimizer\":[\"Read\",\"Edit\",\"Bash\",\"Grep\",\"TodoWrite\",\"Memory\"],\"documenter\":[\"Read\",\"Write\",\"Glob\",\"Memory\",\"TodoWrite\"],\"designer\":[\"Read\",\"Write\",\"Edit\",\"Memory\",\"TodoWrite\"],\"innovator\":[\"Read\",\"Write\",\"WebSearch\",\"Memory\",\"TodoWrite\",\"Task\"],\"swarm-coordinator\":[\"TodoWrite\",\"TodoRead\",\"Task\",\"Memory\",\"Bash\"],\"memory-manager\":[\"Memory\",\"Read\",\"Write\",\"TodoWrite\",\"TodoRead\"],\"batch-executor\":[\"Task\",\"Bash\",\"Read\",\"Write\",\"TodoWrite\",\"Memory\"],\"workflow-manager\":[\"TodoWrite\",\"TodoRead\",\"Task\",\"Bash\",\"Memory\"]}},\"technical_approach\":{\"tool_generation\":\"Dynamic tool generation based on SPARC mode configuration\",\"context_injection\":\"Context-aware tool handlers with mode-specific behavior\",\"capability_discovery\":\"Tool discovery API for SPARC modes and capabilities\",\"integration_pattern\":\"Wrapper pattern for existing orchestration tools\",\"namespace_convention\":\"sparc/<mode>/<action> for SPARC-specific tools\"},\"benefits\":{\"unified_interface\":\"Single MCP interface for all SPARC and swarm operations\",\"mode_discovery\":\"Dynamic discovery of available SPARC modes and tools\",\"capability_negotiation\":\"Protocol-level capability negotiation\",\"seamless_integration\":\"Deep integration with orchestration system\",\"extensibility\":\"Easy addition of new SPARC modes and tools\"}}",
- "type": "object",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-06-19T18:06:21.352Z",
- "updatedAt": "2025-06-19T18:06:21.352Z",
- "lastAccessedAt": "2025-06-19T18:56:14.638Z",
- "version": 1,
- "size": 4694,
- "compressed": true,
- "checksum": "da928bdb6449349446bdc2518fcb7a3b78e866aeb6f13aeaa233cb6fb32d8585",
- "references": [],
- "dependencies": []
- },
- {
- "id": "entry_mc3ozxnn_1ekigvuqa",
- "key": "sparc_swarm_research",
- "value": "\"## SPARC Modes and Swarm Research Findings\\n\\n### All 17 SPARC Modes Available:\\n\\n1. **orchestrator** - Multi-agent task orchestration and coordination\\n - Tools: TodoWrite, TodoRead, Task, Memory, Bash\\n - Coordinates multiple specialized agents for complex tasks\\n\\n2. **coder** - Autonomous code generation and implementation \\n - Tools: Read, Write, Edit, Bash, Glob, Grep, TodoWrite\\n - Expert programmer focused on clean, efficient code\\n\\n3. **researcher** - Deep research and comprehensive analysis\\n - Tools: WebSearch, WebFetch, Read, Write, Memory, TodoWrite, Task\\n - Parallel research operations with memory coordination\\n\\n4. **tdd** - Test-driven development methodology\\n - Tools: Read, Write, Edit, Bash, TodoWrite, Task\\n - Strict TDD practices with test planning\\n\\n5. **architect** - System design and architecture planning\\n - Tools: Read, Write, Glob, Memory, TodoWrite, Task\\n - Scalable system architecture design\\n\\n6. **reviewer** - Code review and quality optimization\\n - Tools: Read, Edit, Grep, Bash, TodoWrite, Memory\\n - Systematic code quality improvement\\n\\n7. **debugger** - Debug and fix issues systematically\\n - Tools: Read, Edit, Bash, Grep, TodoWrite, Memory\\n - Systematic debugging with issue pattern tracking\\n\\n8. **tester** - Comprehensive testing and validation\\n - Tools: Read, Write, Edit, Bash, TodoWrite, Task\\n - Test planning and parallel execution\\n\\n9. **analyzer** - Code and data analysis specialist\\n - Tools: Read, Grep, Bash, Write, Memory, TodoWrite, Task\\n - Batch operations for efficient analysis\\n\\n10. **optimizer** - Performance optimization specialist\\n - Tools: Read, Edit, Bash, Grep, TodoWrite, Memory\\n - Systematic performance improvements\\n\\n11. **documenter** - Documentation generation and maintenance\\n - Tools: Read, Write, Glob, Memory, TodoWrite\\n - Comprehensive documentation coordination\\n\\n12. **designer** - UI/UX design and user experience\\n - Tools: Read, Write, Edit, Memory, TodoWrite\\n - Design coordination and process management\\n\\n13. **innovator** - Creative problem solving and innovation\\n - Tools: Read, Write, WebSearch, Memory, TodoWrite, Task\\n - Innovation with idea coordination\\n\\n14. **swarm-coordinator** - Swarm coordination and management\\n - Tools: TodoWrite, TodoRead, Task, Memory, Bash\\n - Coordinates swarms of AI agents\\n\\n15. **memory-manager** - Memory and knowledge management\\n - Tools: Memory, Read, Write, TodoWrite, TodoRead\\n - Persistent knowledge storage\\n\\n16. **batch-executor** - Parallel task execution specialist\\n - Tools: Task, Bash, Read, Write, TodoWrite, Memory\\n - Maximum efficiency parallel execution\\n\\n17. **workflow-manager** - Workflow automation and process management\\n - Tools: TodoWrite, TodoRead, Task, Bash, Memory\\n - Automated workflow design and execution\\n\\n### Additional SPARC Modes in sparc-modes/ directory:\\n- ask - Research and Q&A mode\\n- debug - Debugging mode\\n- devops - DevOps and deployment\\n- docs-writer - Documentation writing\\n- integration - System integration\\n- mcp - MCP integration mode\\n- monitoring - Post-deployment monitoring (maps to post-deployment-monitoring-mode)\\n- optimization - Performance optimization (maps to refinement-optimization-mode)\\n- security-review - Security auditing\\n- spec-pseudocode - Specification and pseudocode\\n- supabase-admin - Supabase administration\\n- tutorial - Tutorial and guide creation\\n- generic - Generic orchestration fallback\\n\\n### Swarm Coordination System:\\n\\n**Swarm Strategies:**\\n- development - Code implementation with quality checks\\n- research - Information gathering and analysis \\n- analysis - Data processing and insights\\n- testing - Comprehensive quality assurance\\n- optimization - Performance improvements\\n- maintenance - System updates and fixes\\n\\n**Coordination Modes:**\\n- centralized - Single coordinator (recommended for beginners)\\n- distributed - Multiple coordinators\\n- hierarchical - Tree structure with nested coordination\\n- mesh - Peer-to-peer agent collaboration\\n- hybrid - Mixed coordination strategies\\n\\n**Key Swarm Features:**\\n- Timeout-free background execution for long tasks\\n- Distributed memory sharing between agents\\n- Work stealing and load balancing\\n- Circuit breaker patterns for fault tolerance\\n- Real-time monitoring and metrics\\n- Persistent state with backup/recovery\\n- Security features with encryption options\\n\\n### MCP Server Integration:\\n\\n**Available MCP Tools:**\\n- agent_spawn - Create and manage AI agents\\n- task_create - Create and execute tasks\\n- memory_store - Store information in memory bank\\n- memory_query - Query stored information\\n- terminal_execute - Execute terminal commands\\n- workflow_run - Execute predefined workflows\\n- sparc_mode - Run SPARC development modes\\n\\n**MCP Configuration:**\\n- Default port: 3000\\n- Protocol: HTTP/STDIO\\n- Authentication: API Key based\\n- Rate limiting enabled\\n- TLS in production\\n\\n### Tool Registration Patterns:\\n\\n1. **SPARC Mode Registration:** Each mode exports an orchestration function that defines tools, prompt, and workflow\\n2. **Memory Coordination:** All modes use Memory for cross-agent data sharing\\n3. **TodoWrite Integration:** Complex task coordination through TodoWrite\\n4. **Task Tool Usage:** Parallel agent launching via Task tool\\n5. **Batch Operations:** Multiple tools support batch file operations for efficiency\\n\\n### Integration Points:\\n\\n1. **SPARC + Swarm:** Use swarm mode for multi-agent coordination of SPARC modes\\n2. **SPARC + MCP:** MCP server exposes SPARC modes as callable tools\\n3. **Memory System:** Central coordination point for all agents\\n4. **Background Execution:** Prevents timeouts for long-running tasks\\n5. **Monitoring:** Real-time progress tracking across all operations\"",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-06-19T18:06:24.035Z",
- "updatedAt": "2025-06-19T18:06:24.035Z",
- "lastAccessedAt": "2025-06-19T18:56:14.638Z",
- "version": 1,
- "size": 6026,
- "compressed": true,
- "checksum": "cd77d114c3d47828acc132bbba706b3d7c783a4a3b080683c534863d38ab1a58",
- "references": [],
- "dependencies": []
- },
- {
- "id": "entry_mc3q71ly_hlgtehngg",
- "key": "test_key",
- "value": "This is a test value for MCP memory",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-06-19T18:39:55.366Z",
- "updatedAt": "2025-06-19T18:39:55.366Z",
- "lastAccessedAt": "2025-06-19T18:56:14.638Z",
- "version": 1,
- "size": 66,
- "compressed": false,
- "checksum": "640530faece06f786418c74a1fe7b0ed521ef31be44dfb1971e96607351ed00f",
- "references": [],
- "dependencies": []
- },
- {
- "id": "entry_mc3qv4ha_fwbhafmk8",
- "key": "mcp_test_key",
- "value": "Testing MCP memory integration at Thu Jun 19 18:58:35 UTC 2025",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-06-19T18:58:38.830Z",
- "updatedAt": "2025-06-19T18:58:38.830Z",
- "lastAccessedAt": "2025-06-19T18:58:43.588Z",
- "version": 1,
- "size": 93,
- "compressed": false,
- "checksum": "c9a55fd5fbc5a2665c0bd7d9f1ef89008c7d3277fe75eabdbcb0cd9bda367591",
- "references": [],
- "dependencies": []
- }
- ],
- "statistics": {
- "overview": {
- "totalEntries": 5,
- "totalSize": 10929,
- "compressedEntries": 2,
- "compressionRatio": -50.291866028708135,
- "indexSize": 250,
- "memoryUsage": 9377856,
- "diskUsage": 0
- },
- "distribution": {
- "byNamespace": {
- "test-namespace": {
- "count": 1,
- "size": 50
- },
- "default": {
- "count": 4,
- "size": 10879
- }
- },
- "byType": {
- "object": {
- "count": 2,
- "size": 4744
- },
- "string": {
- "count": 3,
- "size": 6185
- }
- },
- "byOwner": {
- "system": {
- "count": 5,
- "size": 10929
- }
- },
- "byAccessLevel": {
- "shared": {
- "count": 5,
- "size": 10929
- }
- }
- },
- "temporal": {
- "entriesCreatedLast24h": 5,
- "entriesUpdatedLast24h": 5,
- "entriesAccessedLast24h": 5,
- "oldestEntry": "2025-06-19T03:24:46.648Z",
- "newestEntry": "2025-06-19T18:58:38.830Z"
- },
- "performance": {
- "averageQueryTime": 0,
- "averageWriteTime": 0,
- "cacheHitRatio": 0,
- "indexEfficiency": 0.95
- },
- "health": {
- "expiredEntries": 0,
- "orphanedReferences": 0,
- "duplicateKeys": 0,
- "corruptedEntries": 0,
- "recommendedCleanup": false
- },
- "optimization": {
- "suggestions": [],
- "potentialSavings": {
- "compression": 0,
- "cleanup": 0,
- "deduplication": 0
- },
- "indexOptimization": [
- "Consider periodic index rebuilding for optimal performance"
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/backups/backup-2025-07-01T23-07-10-184Z.json b/archive/legacy-memory-system/backups/backup-2025-07-01T23-07-10-184Z.json
deleted file mode 100644
index 3c825bcd07..0000000000
--- a/archive/legacy-memory-system/backups/backup-2025-07-01T23-07-10-184Z.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "timestamp": "2025-07-01T23:07:10.184Z",
- "version": "1.0",
- "entries": [],
- "statistics": {
- "overview": {
- "totalEntries": 0,
- "totalSize": 0,
- "compressedEntries": 0,
- "compressionRatio": 0,
- "indexSize": 0,
- "memoryUsage": 9582952,
- "diskUsage": 0
- },
- "distribution": {
- "byNamespace": {},
- "byType": {},
- "byOwner": {},
- "byAccessLevel": {}
- },
- "temporal": {
- "entriesCreatedLast24h": 0,
- "entriesUpdatedLast24h": 0,
- "entriesAccessedLast24h": 0
- },
- "performance": {
- "averageQueryTime": 0,
- "averageWriteTime": 0,
- "cacheHitRatio": 0,
- "indexEfficiency": 0.95
- },
- "health": {
- "expiredEntries": 0,
- "orphanedReferences": 0,
- "duplicateKeys": 0,
- "corruptedEntries": 0,
- "recommendedCleanup": false
- },
- "optimization": {
- "suggestions": [],
- "potentialSavings": {
- "compression": 0,
- "cleanup": 0,
- "deduplication": 0
- },
- "indexOptimization": [
- "Consider periodic index rebuilding for optimal performance"
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/backups/backup-2025-07-01T23-08-43-103Z.json b/archive/legacy-memory-system/backups/backup-2025-07-01T23-08-43-103Z.json
deleted file mode 100644
index 869cc814ca..0000000000
--- a/archive/legacy-memory-system/backups/backup-2025-07-01T23-08-43-103Z.json
+++ /dev/null
@@ -1,94 +0,0 @@
-{
- "timestamp": "2025-07-01T23:08:43.103Z",
- "version": "1.0",
- "entries": [
- {
- "id": "entry_mcl52xul_cyffbau3x",
- "key": "test-key",
- "value": "test-value",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-07-01T23:08:43.101Z",
- "updatedAt": "2025-07-01T23:08:43.101Z",
- "lastAccessedAt": "2025-07-01T23:08:43.101Z",
- "version": 1,
- "size": 41,
- "compressed": false,
- "checksum": "d1cae01b21c77850707c5b75192b6efdb722169b59dce6bce7fb938b64df9c1a",
- "references": [],
- "dependencies": []
- }
- ],
- "statistics": {
- "overview": {
- "totalEntries": 1,
- "totalSize": 41,
- "compressedEntries": 0,
- "compressionRatio": 1,
- "indexSize": 50,
- "memoryUsage": 9531488,
- "diskUsage": 0
- },
- "distribution": {
- "byNamespace": {
- "default": {
- "count": 1,
- "size": 41
- }
- },
- "byType": {
- "string": {
- "count": 1,
- "size": 41
- }
- },
- "byOwner": {
- "system": {
- "count": 1,
- "size": 41
- }
- },
- "byAccessLevel": {
- "shared": {
- "count": 1,
- "size": 41
- }
- }
- },
- "temporal": {
- "entriesCreatedLast24h": 1,
- "entriesUpdatedLast24h": 1,
- "entriesAccessedLast24h": 1,
- "oldestEntry": "2025-07-01T23:08:43.101Z",
- "newestEntry": "2025-07-01T23:08:43.101Z"
- },
- "performance": {
- "averageQueryTime": 0,
- "averageWriteTime": 1,
- "cacheHitRatio": 0,
- "indexEfficiency": 0.95
- },
- "health": {
- "expiredEntries": 0,
- "orphanedReferences": 0,
- "duplicateKeys": 0,
- "corruptedEntries": 0,
- "recommendedCleanup": false
- },
- "optimization": {
- "suggestions": [],
- "potentialSavings": {
- "compression": 0,
- "cleanup": 0,
- "deduplication": 0
- },
- "indexOptimization": [
- "Consider periodic index rebuilding for optimal performance"
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/backups/backup-2025-07-01T23-08-51-121Z.json b/archive/legacy-memory-system/backups/backup-2025-07-01T23-08-51-121Z.json
deleted file mode 100644
index 17c8679db7..0000000000
--- a/archive/legacy-memory-system/backups/backup-2025-07-01T23-08-51-121Z.json
+++ /dev/null
@@ -1,94 +0,0 @@
-{
- "timestamp": "2025-07-01T23:08:51.121Z",
- "version": "1.0",
- "entries": [
- {
- "id": "entry_mcl52xul_cyffbau3x",
- "key": "test-key",
- "value": "test-value",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-07-01T23:08:43.101Z",
- "updatedAt": "2025-07-01T23:08:43.101Z",
- "lastAccessedAt": "2025-07-01T23:08:51.106Z",
- "version": 1,
- "size": 41,
- "compressed": false,
- "checksum": "d1cae01b21c77850707c5b75192b6efdb722169b59dce6bce7fb938b64df9c1a",
- "references": [],
- "dependencies": []
- }
- ],
- "statistics": {
- "overview": {
- "totalEntries": 1,
- "totalSize": 41,
- "compressedEntries": 0,
- "compressionRatio": 1,
- "indexSize": 50,
- "memoryUsage": 9518992,
- "diskUsage": 0
- },
- "distribution": {
- "byNamespace": {
- "default": {
- "count": 1,
- "size": 41
- }
- },
- "byType": {
- "string": {
- "count": 1,
- "size": 41
- }
- },
- "byOwner": {
- "system": {
- "count": 1,
- "size": 41
- }
- },
- "byAccessLevel": {
- "shared": {
- "count": 1,
- "size": 41
- }
- }
- },
- "temporal": {
- "entriesCreatedLast24h": 1,
- "entriesUpdatedLast24h": 1,
- "entriesAccessedLast24h": 1,
- "oldestEntry": "2025-07-01T23:08:43.101Z",
- "newestEntry": "2025-07-01T23:08:43.101Z"
- },
- "performance": {
- "averageQueryTime": 0,
- "averageWriteTime": 0,
- "cacheHitRatio": 0,
- "indexEfficiency": 0.95
- },
- "health": {
- "expiredEntries": 0,
- "orphanedReferences": 0,
- "duplicateKeys": 0,
- "corruptedEntries": 0,
- "recommendedCleanup": false
- },
- "optimization": {
- "suggestions": [],
- "potentialSavings": {
- "compression": 0,
- "cleanup": 0,
- "deduplication": 0
- },
- "indexOptimization": [
- "Consider periodic index rebuilding for optimal performance"
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/backups/backup-2025-07-01T23-09-51-926Z.json b/archive/legacy-memory-system/backups/backup-2025-07-01T23-09-51-926Z.json
deleted file mode 100644
index 620381692a..0000000000
--- a/archive/legacy-memory-system/backups/backup-2025-07-01T23-09-51-926Z.json
+++ /dev/null
@@ -1,114 +0,0 @@
-{
- "timestamp": "2025-07-01T23:09:51.927Z",
- "version": "1.0",
- "entries": [
- {
- "id": "entry_mcl52xul_cyffbau3x",
- "key": "test-key",
- "value": "test-value",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-07-01T23:08:43.101Z",
- "updatedAt": "2025-07-01T23:08:43.101Z",
- "lastAccessedAt": "2025-07-01T23:08:51.106Z",
- "version": 1,
- "size": 41,
- "compressed": false,
- "checksum": "d1cae01b21c77850707c5b75192b6efdb722169b59dce6bce7fb938b64df9c1a",
- "references": [],
- "dependencies": []
- },
- {
- "id": "entry_mcl54eyc_c4g9ve24a",
- "key": "perf-test",
- "value": "Performance test data",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-07-01T23:09:51.924Z",
- "updatedAt": "2025-07-01T23:09:51.924Z",
- "lastAccessedAt": "2025-07-01T23:09:51.924Z",
- "version": 1,
- "size": 52,
- "compressed": false,
- "checksum": "9253531d0f5e676dde2d8d6fe61884c2c8b91a9a72aa826c3b65723eac344869",
- "references": [],
- "dependencies": []
- }
- ],
- "statistics": {
- "overview": {
- "totalEntries": 2,
- "totalSize": 93,
- "compressedEntries": 0,
- "compressionRatio": 1,
- "indexSize": 100,
- "memoryUsage": 9548896,
- "diskUsage": 0
- },
- "distribution": {
- "byNamespace": {
- "default": {
- "count": 2,
- "size": 93
- }
- },
- "byType": {
- "string": {
- "count": 2,
- "size": 93
- }
- },
- "byOwner": {
- "system": {
- "count": 2,
- "size": 93
- }
- },
- "byAccessLevel": {
- "shared": {
- "count": 2,
- "size": 93
- }
- }
- },
- "temporal": {
- "entriesCreatedLast24h": 2,
- "entriesUpdatedLast24h": 2,
- "entriesAccessedLast24h": 2,
- "oldestEntry": "2025-07-01T23:08:43.101Z",
- "newestEntry": "2025-07-01T23:09:51.924Z"
- },
- "performance": {
- "averageQueryTime": 0,
- "averageWriteTime": 1,
- "cacheHitRatio": 0,
- "indexEfficiency": 0.95
- },
- "health": {
- "expiredEntries": 0,
- "orphanedReferences": 0,
- "duplicateKeys": 0,
- "corruptedEntries": 0,
- "recommendedCleanup": false
- },
- "optimization": {
- "suggestions": [],
- "potentialSavings": {
- "compression": 0,
- "cleanup": 0,
- "deduplication": 0
- },
- "indexOptimization": [
- "Consider periodic index rebuilding for optimal performance"
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/backups/backup-2025-07-01T23-10-42-020Z.json b/archive/legacy-memory-system/backups/backup-2025-07-01T23-10-42-020Z.json
deleted file mode 100644
index 0ab16adbb2..0000000000
--- a/archive/legacy-memory-system/backups/backup-2025-07-01T23-10-42-020Z.json
+++ /dev/null
@@ -1,134 +0,0 @@
-{
- "timestamp": "2025-07-01T23:10:42.020Z",
- "version": "1.0",
- "entries": [
- {
- "id": "entry_mcl52xul_cyffbau3x",
- "key": "test-key",
- "value": "test-value",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-07-01T23:08:43.101Z",
- "updatedAt": "2025-07-01T23:08:43.101Z",
- "lastAccessedAt": "2025-07-01T23:08:51.106Z",
- "version": 1,
- "size": 41,
- "compressed": false,
- "checksum": "d1cae01b21c77850707c5b75192b6efdb722169b59dce6bce7fb938b64df9c1a",
- "references": [],
- "dependencies": []
- },
- {
- "id": "entry_mcl54eyc_c4g9ve24a",
- "key": "perf-test",
- "value": "Performance test data",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-07-01T23:09:51.924Z",
- "updatedAt": "2025-07-01T23:09:51.924Z",
- "lastAccessedAt": "2025-07-01T23:09:51.924Z",
- "version": 1,
- "size": 52,
- "compressed": false,
- "checksum": "9253531d0f5e676dde2d8d6fe61884c2c8b91a9a72aa826c3b65723eac344869",
- "references": [],
- "dependencies": []
- },
- {
- "id": "entry_mcl55hlu_urt8suv3j",
- "key": "comprehensive-test-results",
- "value": "\"{\\n \\\\\\\"testSession\\\\\\\": \\\\\\\"2025-07-01T23:08:12Z\\\\\\\",\\n \\\\\\\"testCategories\\\\\\\": {\\n \\\\\\\"coreCommands\\\\\\\": {\\n \\\\\\\"status\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"configInit\\\\\\\": \\\\\\\"PASSED\\\\\\\", \\n \\\\\\\"agentSpawn\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"memoryStore\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"memoryGet\\\\\\\": \\\\\\\"PASSED\\\\\\\"\\n },\\n \\\\\\\"ruvSwarmIntegration\\\\\\\": {\\n \\\\\\\"swarmInit\\\\\\\": \\\\\\\"PASSED_WITH_WARNINGS\\\\\\\",\\n \\\\\\\"swarmStatus\\\\\\\": \\\\\\\"PASSED_WITH_WARNINGS\\\\\\\",\\n \\\\\\\"hooks\\\\\\\": \\\\\\\"FAILED\\\\\\\"\\n },\\n \\\\\\\"performance\\\\\\\": {\\n \\\\\\\"statusResponseTime\\\\\\\": \\\\\\\"1.146s_GOOD\\\\\\\",\\n \\\\\\\"memoryPerformance\\\\\\\": \\\\\\\"1.069s_GOOD\\\\\\\",\\n \\\\\\\"memoryUsage\\\\\\\": \\\\\\\"768K_EFFICIENT\\\\\\\"\\n },\\n \\\\\\\"integration\\\\\\\": {\\n \\\\\\\"sparcModes\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"sparcModesList\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"mcpServer\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"agentCoordination\\\\\\\": \\\\\\\"PASSED\\\\\\\"\\n }\\n },\\n \\\\\\\"summary\\\\\\\": \\\\\\\"Most core functionality working, minor WASM warnings, hooks need fixing\\\\\\\"\\n}\"",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-07-01T23:10:42.018Z",
- "updatedAt": "2025-07-01T23:10:42.018Z",
- "lastAccessedAt": "2025-07-01T23:10:42.018Z",
- "version": 1,
- "size": 1424,
- "compressed": true,
- "checksum": "3cef23d9b4e24b83cfa80ef622b1c2308f84c4f900925b586dd59590ab193831",
- "references": [],
- "dependencies": []
- }
- ],
- "statistics": {
- "overview": {
- "totalEntries": 3,
- "totalSize": 1517,
- "compressedEntries": 1,
- "compressionRatio": -14.311827956989248,
- "indexSize": 150,
- "memoryUsage": 9582120,
- "diskUsage": 0
- },
- "distribution": {
- "byNamespace": {
- "default": {
- "count": 3,
- "size": 1517
- }
- },
- "byType": {
- "string": {
- "count": 3,
- "size": 1517
- }
- },
- "byOwner": {
- "system": {
- "count": 3,
- "size": 1517
- }
- },
- "byAccessLevel": {
- "shared": {
- "count": 3,
- "size": 1517
- }
- }
- },
- "temporal": {
- "entriesCreatedLast24h": 3,
- "entriesUpdatedLast24h": 3,
- "entriesAccessedLast24h": 3,
- "oldestEntry": "2025-07-01T23:08:43.101Z",
- "newestEntry": "2025-07-01T23:10:42.018Z"
- },
- "performance": {
- "averageQueryTime": 0,
- "averageWriteTime": 1,
- "cacheHitRatio": 0,
- "indexEfficiency": 0.95
- },
- "health": {
- "expiredEntries": 0,
- "orphanedReferences": 0,
- "duplicateKeys": 0,
- "corruptedEntries": 0,
- "recommendedCleanup": false
- },
- "optimization": {
- "suggestions": [],
- "potentialSavings": {
- "compression": 0,
- "cleanup": 0,
- "deduplication": 0
- },
- "indexOptimization": [
- "Consider periodic index rebuilding for optimal performance"
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/backups/backup-2025-07-10T02-55-33-887Z.json b/archive/legacy-memory-system/backups/backup-2025-07-10T02-55-33-887Z.json
deleted file mode 100644
index 2266a462f1..0000000000
--- a/archive/legacy-memory-system/backups/backup-2025-07-10T02-55-33-887Z.json
+++ /dev/null
@@ -1,134 +0,0 @@
-{
- "timestamp": "2025-07-10T02:55:33.887Z",
- "version": "1.0",
- "entries": [
- {
- "id": "entry_mcl52xul_cyffbau3x",
- "key": "test-key",
- "value": "test-value",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-07-01T23:08:43.101Z",
- "updatedAt": "2025-07-01T23:08:43.101Z",
- "lastAccessedAt": "2025-07-01T23:08:51.106Z",
- "version": 1,
- "size": 41,
- "compressed": false,
- "checksum": "d1cae01b21c77850707c5b75192b6efdb722169b59dce6bce7fb938b64df9c1a",
- "references": [],
- "dependencies": []
- },
- {
- "id": "entry_mcl54eyc_c4g9ve24a",
- "key": "perf-test",
- "value": "Performance test data",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-07-01T23:09:51.924Z",
- "updatedAt": "2025-07-01T23:09:51.924Z",
- "lastAccessedAt": "2025-07-01T23:09:51.924Z",
- "version": 1,
- "size": 52,
- "compressed": false,
- "checksum": "9253531d0f5e676dde2d8d6fe61884c2c8b91a9a72aa826c3b65723eac344869",
- "references": [],
- "dependencies": []
- },
- {
- "id": "entry_mcl55hlu_urt8suv3j",
- "key": "comprehensive-test-results",
- "value": "\"{\\n \\\\\\\"testSession\\\\\\\": \\\\\\\"2025-07-01T23:08:12Z\\\\\\\",\\n \\\\\\\"testCategories\\\\\\\": {\\n \\\\\\\"coreCommands\\\\\\\": {\\n \\\\\\\"status\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"configInit\\\\\\\": \\\\\\\"PASSED\\\\\\\", \\n \\\\\\\"agentSpawn\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"memoryStore\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"memoryGet\\\\\\\": \\\\\\\"PASSED\\\\\\\"\\n },\\n \\\\\\\"ruvSwarmIntegration\\\\\\\": {\\n \\\\\\\"swarmInit\\\\\\\": \\\\\\\"PASSED_WITH_WARNINGS\\\\\\\",\\n \\\\\\\"swarmStatus\\\\\\\": \\\\\\\"PASSED_WITH_WARNINGS\\\\\\\",\\n \\\\\\\"hooks\\\\\\\": \\\\\\\"FAILED\\\\\\\"\\n },\\n \\\\\\\"performance\\\\\\\": {\\n \\\\\\\"statusResponseTime\\\\\\\": \\\\\\\"1.146s_GOOD\\\\\\\",\\n \\\\\\\"memoryPerformance\\\\\\\": \\\\\\\"1.069s_GOOD\\\\\\\",\\n \\\\\\\"memoryUsage\\\\\\\": \\\\\\\"768K_EFFICIENT\\\\\\\"\\n },\\n \\\\\\\"integration\\\\\\\": {\\n \\\\\\\"sparcModes\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"sparcModesList\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"mcpServer\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"agentCoordination\\\\\\\": \\\\\\\"PASSED\\\\\\\"\\n }\\n },\\n \\\\\\\"summary\\\\\\\": \\\\\\\"Most core functionality working, minor WASM warnings, hooks need fixing\\\\\\\"\\n}\"",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-07-01T23:10:42.018Z",
- "updatedAt": "2025-07-01T23:10:42.018Z",
- "lastAccessedAt": "2025-07-01T23:10:42.018Z",
- "version": 1,
- "size": 1424,
- "compressed": true,
- "checksum": "3cef23d9b4e24b83cfa80ef622b1c2308f84c4f900925b586dd59590ab193831",
- "references": [],
- "dependencies": []
- }
- ],
- "statistics": {
- "overview": {
- "totalEntries": 3,
- "totalSize": 1517,
- "compressedEntries": 1,
- "compressionRatio": -14.311827956989248,
- "indexSize": 150,
- "memoryUsage": 7713048,
- "diskUsage": 0
- },
- "distribution": {
- "byNamespace": {
- "default": {
- "count": 3,
- "size": 1517
- }
- },
- "byType": {
- "string": {
- "count": 3,
- "size": 1517
- }
- },
- "byOwner": {
- "system": {
- "count": 3,
- "size": 1517
- }
- },
- "byAccessLevel": {
- "shared": {
- "count": 3,
- "size": 1517
- }
- }
- },
- "temporal": {
- "entriesCreatedLast24h": 0,
- "entriesUpdatedLast24h": 0,
- "entriesAccessedLast24h": 0,
- "oldestEntry": "2025-07-01T23:08:43.101Z",
- "newestEntry": "2025-07-01T23:10:42.018Z"
- },
- "performance": {
- "averageQueryTime": 0,
- "averageWriteTime": 0,
- "cacheHitRatio": 0,
- "indexEfficiency": 0.95
- },
- "health": {
- "expiredEntries": 0,
- "orphanedReferences": 0,
- "duplicateKeys": 0,
- "corruptedEntries": 0,
- "recommendedCleanup": false
- },
- "optimization": {
- "suggestions": [],
- "potentialSavings": {
- "compression": 0,
- "cleanup": 0,
- "deduplication": 0
- },
- "indexOptimization": [
- "Consider periodic index rebuilding for optimal performance"
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/claude-flow-data.json b/archive/legacy-memory-system/claude-flow-data.json
deleted file mode 100644
index 0b8efe7ba9..0000000000
--- a/archive/legacy-memory-system/claude-flow-data.json
+++ /dev/null
@@ -1,303 +0,0 @@
-{
- "agents": [
- {
- "id": "agent-1750130170618-u1cooc1tc",
- "type": "test",
- "name": "Test Agent",
- "status": "active",
- "capabilities": [
- "testing"
- ],
- "createdAt": 1750130170618
- },
- {
- "id": "agent-1750130191292-1611sn95b",
- "type": "test",
- "name": "Test Agent",
- "status": "active",
- "capabilities": [
- "testing"
- ],
- "createdAt": 1750130191292
- }
- ],
- "tasks": [
- {
- "id": "task-1750130170626-80f7urx2w",
- "type": "test-task",
- "description": "Test task from orchestrator test",
- "status": "assigned",
- "priority": "medium",
- "progress": 0,
- "createdAt": 1750130170626,
- "assignedAgent": "agent-1750130170618-u1cooc1tc"
- },
- {
- "id": "task-1750130191296-xk1r0hzx3",
- "type": "test-task",
- "description": "Test task from orchestrator test",
- "status": "assigned",
- "priority": "medium",
- "progress": 0,
- "createdAt": 1750130191296,
- "assignedAgent": "agent-1750130170618-u1cooc1tc"
- }
- ],
- "environment": "dev",
- "template": "web-api",
- "customConfig": {},
- "swarm_commands_status": {
- "task": "Creating compiled JavaScript version of swarm-commands.js",
- "progress": "completed",
- "agent": "Swarm Commands Agent",
- "timestamp": "2025-06-17T00:00:00.000Z",
- "components": {
- "typescript_analysis": "completed",
- "javascript_conversion": "completed",
- "documentation_creation": "completed",
- "coordination_modes": "completed",
- "batch_tools_integration": "completed",
- "best_practices": "completed",
- "advanced_strategies": "completed"
- },
- "output_file": "/workspaces/claude-code-flow/dist/cli/init/swarm-commands.js",
- "features_implemented": [
- "ES module syntax conversion",
- "Node.js compatibility",
- "Comprehensive batch tools integration",
- "Advanced coordination modes documentation",
- "Performance optimization strategies",
- "Error handling and recovery procedures",
- "Real-time monitoring capabilities",
- "Security and compliance features"
- ]
- },
- "main_init_status": {
- "orchestrator": "Main Init Orchestrator Agent",
- "task": "Created compiled JavaScript version of index.js in dist/cli/init/ and updated main CLI",
- "progress": "completed",
- "timestamp": "2025-06-17T00:00:00.000Z",
- "phases": {
- "validation": "completed",
- "backup": "completed",
- "directory-structure": "completed",
- "core-files": "completed",
- "memory-system": "completed",
- "sparc-environment": "completed",
- "executable-wrapper": "completed",
- "post-validation": "completed"
- },
- "components": {
- "typescript_conversion": "completed",
- "orchestrator_creation": "completed",
- "cli_integration": "completed",
- "error_handling": "completed",
- "success_reporting": "completed"
- },
- "implementation_details": {
- "main_orchestrator_file": "/workspaces/claude-code-flow/dist/cli/init/index.js",
- "cli_integration_file": "/workspaces/claude-code-flow/dist/cli/simple-cli.js",
- "features": [
- "Phase-based initialization system",
- "Comprehensive error handling",
- "Success reporting with detailed metrics",
- "ES module syntax throughout",
- "Node.js compatibility",
- "Fallback mechanisms for reliability",
- "Memory coordination system",
- "SPARC environment support",
- "Batch operation capabilities",
- "Real-time progress tracking"
- ],
- "architecture": {
- "pattern": "Orchestrator with phase execution",
- "error_handling": "Try-catch with graceful degradation",
- "coordination": "Memory-based status tracking",
- "reporting": "Comprehensive success metrics",
- "modularity": "Separated concerns with clean interfaces"
- }
- },
- "coordination_with_other_agents": {
- "directory_structure_agent": "integrated",
- "swarm_commands_agent": "coordinated",
- "memory_system": "enhanced",
- "cli_system": "updated"
- }
- },
- "lastUpdated": 1750134883369,
- "memory": {
- "directory_structure_status": {
- "status": "completed",
- "timestamp": 1750134775505,
- "agent": "Directory Structure Agent",
- "details": {
- "directories_created": [
- ".claude",
- ".claude/commands",
- ".claude/commands/swarm",
- ".claude/commands/sparc",
- ".claude/logs",
- ".claude/memory",
- ".claude/configs",
- "memory",
- "memory/agents",
- "memory/sessions",
- "coordination",
- "coordination/memory_bank",
- "coordination/subtasks",
- "coordination/orchestration",
- "reports"
- ],
- "readme_files_created": [
- "memory/agents/README.md",
- "memory/sessions/README.md",
- "coordination/README.md",
- "reports/README.md"
- ],
- "persistence_db": "memory/claude-flow-data.json",
- "node_js_compatible": true,
- "es_module_syntax": true
- },
- "location": "/workspaces/claude-code-flow/dist/cli/simple-commands/init/directory-structure.js"
- },
- "claude_config_status": {
- "status": "completed",
- "timestamp": 1750134883369,
- "agent": "Claude Config Agent",
- "task": "create-compiled-claude-config",
- "details": {
- "file_created": "/workspaces/claude-code-flow/dist/cli/init/claude-config.js",
- "features_implemented": [
- "base_claude_configuration",
- "batch_tools_settings",
- "swarm_orchestration_config",
- "coordination_config",
- "todowrite_memory_integration"
- ],
- "configuration_components": {
- "main_config": {
- "version": "1.0.71",
- "features": [
- "swarm",
- "sparc",
- "memory",
- "terminal",
- "mcp",
- "batchTools",
- "orchestration"
- ]
- },
- "batch_tools": {
- "tools": [
- "todoWrite",
- "todoRead",
- "task",
- "memory",
- "fileOperations",
- "search"
- ],
- "max_concurrent_tasks": 10,
- "coordination_enabled": true
- },
- "swarm_strategies": [
- "research",
- "development",
- "analysis",
- "testing",
- "optimization",
- "maintenance"
- ],
- "coordination_modes": [
- "centralized",
- "distributed",
- "hierarchical",
- "mesh",
- "hybrid"
- ]
- },
- "es_module_syntax": true,
- "node_js_compatible": true
- },
- "location": "/workspaces/claude-code-flow/dist/cli/init/claude-config.js"
- },
- "batch_tools_status": {
- "status": "completed",
- "timestamp": 1750135049000,
- "agent": "Batch Tools Agent",
- "task": "create-compiled-batch-tools-coordination-guide",
- "details": {
- "file_created": "/workspaces/claude-code-flow/dist/cli/init/batch-tools.js",
- "components_implemented": [
- "memory_integration_system",
- "todo_integration_system",
- "swarm_orchestration_patterns",
- "performance_optimization_system",
- "error_handling_recovery_system",
- "comprehensive_coordination_guide"
- ],
- "features": {
- "memory_manager": {
- "persistent_storage": true,
- "cache_management": true,
- "search_capabilities": true,
- "coordination_tracking": true
- },
- "todo_manager": {
- "todowrite_integration": true,
- "todoread_compatibility": true,
- "batch_operations": true,
- "progress_tracking": true
- },
- "swarm_coordinator": {
- "agent_types": ["researcher", "developer", "analyzer", "tester", "documenter", "coordinator", "reviewer", "specialist"],
- "strategies": ["research", "development", "analysis", "testing", "optimization", "maintenance", "hybrid"],
- "coordination_modes": ["centralized", "distributed", "hierarchical", "mesh", "pipeline"],
- "task_decomposition": true,
- "dependency_management": true
- },
- "performance_optimizer": {
- "resource_monitoring": true,
- "adaptive_concurrency": true,
- "alert_system": true,
- "optimization_strategies": true
- },
- "error_handler": {
- "error_classification": true,
- "recovery_strategies": ["retry", "exponential-backoff", "circuit-breaker", "skip"],
- "statistics_tracking": true,
- "circuit_breaker_pattern": true
- }
- },
- "coordination_patterns": {
- "research_workflow": "Literature review, data collection, synthesis",
- "development_workflow": "Requirements, architecture, implementation, testing, documentation",
- "analysis_workflow": "Data preprocessing, modeling, validation, interpretation",
- "testing_workflow": "Test planning, unit testing, integration testing, reporting",
- "optimization_workflow": "Baseline, bottleneck identification, optimization, validation",
- "hybrid_workflow": "Combines multiple strategies for complex workflows"
- },
- "documentation_generated": {
- "overview": true,
- "coordination_patterns": true,
- "todo_integration": true,
- "memory_system": true,
- "swarm_patterns": true,
- "performance_optimization": true,
- "error_handling": true,
- "best_practices": true,
- "usage_examples": true
- },
- "integration_capabilities": {
- "claude_flow_memory": true,
- "todowrite_todoread": true,
- "task_coordination": true,
- "file_operations": true,
- "search_patterns": true,
- "es_module_syntax": true,
- "node_js_compatibility": true
- }
- },
- "location": "/workspaces/claude-code-flow/dist/cli/init/batch-tools.js"
- }
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/creative_sparc_modes_status.json b/archive/legacy-memory-system/creative_sparc_modes_status.json
deleted file mode 100644
index b92c225d07..0000000000
--- a/archive/legacy-memory-system/creative_sparc_modes_status.json
+++ /dev/null
@@ -1 +0,0 @@
-{"creative_sparc_modes_status": {"status": "completed", "timestamp": "2024-12-17T10:00:00Z", "files_created": [".claude/commands/sparc/designer.md", ".claude/commands/sparc/innovator.md"], "description": "Successfully created two creative SPARC mode files with comprehensive workflows for design and innovation processes"}}
diff --git a/archive/legacy-memory-system/data/entries.json b/archive/legacy-memory-system/data/entries.json
deleted file mode 100644
index 0117e90701..0000000000
--- a/archive/legacy-memory-system/data/entries.json
+++ /dev/null
@@ -1,62 +0,0 @@
-[
- {
- "id": "entry_mcl52xul_cyffbau3x",
- "key": "test-key",
- "value": "test-value",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-07-01T23:08:43.101Z",
- "updatedAt": "2025-07-01T23:08:43.101Z",
- "lastAccessedAt": "2025-07-01T23:08:51.106Z",
- "version": 1,
- "size": 41,
- "compressed": false,
- "checksum": "d1cae01b21c77850707c5b75192b6efdb722169b59dce6bce7fb938b64df9c1a",
- "references": [],
- "dependencies": []
- },
- {
- "id": "entry_mcl54eyc_c4g9ve24a",
- "key": "perf-test",
- "value": "Performance test data",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-07-01T23:09:51.924Z",
- "updatedAt": "2025-07-01T23:09:51.924Z",
- "lastAccessedAt": "2025-07-01T23:09:51.924Z",
- "version": 1,
- "size": 52,
- "compressed": false,
- "checksum": "9253531d0f5e676dde2d8d6fe61884c2c8b91a9a72aa826c3b65723eac344869",
- "references": [],
- "dependencies": []
- },
- {
- "id": "entry_mcl55hlu_urt8suv3j",
- "key": "comprehensive-test-results",
- "value": "\"{\\n \\\\\\\"testSession\\\\\\\": \\\\\\\"2025-07-01T23:08:12Z\\\\\\\",\\n \\\\\\\"testCategories\\\\\\\": {\\n \\\\\\\"coreCommands\\\\\\\": {\\n \\\\\\\"status\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"configInit\\\\\\\": \\\\\\\"PASSED\\\\\\\", \\n \\\\\\\"agentSpawn\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"memoryStore\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"memoryGet\\\\\\\": \\\\\\\"PASSED\\\\\\\"\\n },\\n \\\\\\\"ruvSwarmIntegration\\\\\\\": {\\n \\\\\\\"swarmInit\\\\\\\": \\\\\\\"PASSED_WITH_WARNINGS\\\\\\\",\\n \\\\\\\"swarmStatus\\\\\\\": \\\\\\\"PASSED_WITH_WARNINGS\\\\\\\",\\n \\\\\\\"hooks\\\\\\\": \\\\\\\"FAILED\\\\\\\"\\n },\\n \\\\\\\"performance\\\\\\\": {\\n \\\\\\\"statusResponseTime\\\\\\\": \\\\\\\"1.146s_GOOD\\\\\\\",\\n \\\\\\\"memoryPerformance\\\\\\\": \\\\\\\"1.069s_GOOD\\\\\\\",\\n \\\\\\\"memoryUsage\\\\\\\": \\\\\\\"768K_EFFICIENT\\\\\\\"\\n },\\n \\\\\\\"integration\\\\\\\": {\\n \\\\\\\"sparcModes\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"sparcModesList\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"mcpServer\\\\\\\": \\\\\\\"PASSED\\\\\\\",\\n \\\\\\\"agentCoordination\\\\\\\": \\\\\\\"PASSED\\\\\\\"\\n }\\n },\\n \\\\\\\"summary\\\\\\\": \\\\\\\"Most core functionality working, minor WASM warnings, hooks need fixing\\\\\\\"\\n}\"",
- "type": "string",
- "namespace": "default",
- "tags": [],
- "metadata": {},
- "owner": "system",
- "accessLevel": "shared",
- "createdAt": "2025-07-01T23:10:42.018Z",
- "updatedAt": "2025-07-01T23:10:42.018Z",
- "lastAccessedAt": "2025-07-01T23:10:42.018Z",
- "version": 1,
- "size": 1424,
- "compressed": true,
- "checksum": "3cef23d9b4e24b83cfa80ef622b1c2308f84c4f900925b586dd59590ab193831",
- "references": [],
- "dependencies": []
- }
-]
\ No newline at end of file
diff --git a/archive/legacy-memory-system/docs/README.md b/archive/legacy-memory-system/docs/README.md
deleted file mode 100644
index 2483023a68..0000000000
--- a/archive/legacy-memory-system/docs/README.md
+++ /dev/null
@@ -1,139 +0,0 @@
-# SPARC Memory Bank System
-
-## Overview
-
-The SPARC Memory Bank is a sophisticated, distributed memory management system designed for multi-agent collaborative development environments. It provides persistent, searchable, and conflict-resistant storage with advanced features including CRDT-based synchronization, vector search, namespace isolation, and multiple storage backends.
-
-## Key Features
-
-- **Dual Storage Backends**: SQLite for performance, Markdown for human-readability and git integration
-- **Advanced Caching**: Multiple eviction strategies with TTL support and performance metrics
-- **Vector Search**: Semantic similarity search with embeddings and indexing
-- **CRDT Conflict Resolution**: Automatic conflict resolution for concurrent updates
-- **Namespace Isolation**: Multi-tenant support with permissions and access control
-- **Replication**: Distributed synchronization across multiple instances
-- **Import/Export**: Multiple formats with compression and encryption
-- **Full-Text Search**: Integrated FTS5 search for SQLite backend
-
-## Quick Start
-
-```typescript
-import { MemoryManager } from '@sparc/memory-bank';
-
-// Initialize with SQLite backend
-const memory = new MemoryManager({
- backend: 'sqlite',
- storage: { path: './memory.db' },
- cache: { enabled: true, maxSize: 100 * 1024 * 1024 }, // 100MB
- indexing: { vectorSearch: true }
-});
-
-// Store a memory item
-const item = await memory.store({
- id: 'task-001',
- category: 'implementation',
- content: 'Implemented user authentication system',
- tags: ['auth', 'security', 'backend'],
- metadata: {
- assignee: 'alice',
- priority: 'high',
- completion: 0.8
- }
-});
-
-// Query memories
-const results = await memory.query({
- category: 'implementation',
- tags: ['auth'],
- fullText: 'authentication',
- limit: 10
-});
-```
-
-## Documentation Structure
-
-- [Architecture Overview](./architecture.md) - System design and component interactions
-- [API Reference](./api.md) - Complete API documentation
-- [Usage Guide](./usage.md) - Practical examples and best practices
-- [Backends](./backends.md) - Storage backend configuration and capabilities
-- [Configuration](./configuration.md) - Complete configuration reference
-- [Performance](./performance.md) - Optimization and monitoring
-- [Security](./security.md) - Security features and best practices
-- [Deployment](./deployment.md) - Production deployment guide
-- [Troubleshooting](./troubleshooting.md) - Common issues and solutions
-
-## Installation
-
-```bash
-# Using npm
-npm install @sparc/memory-bank
-
-# Using deno
-import { MemoryManager } from 'https://deno.land/x/sparc_memory@latest/mod.ts';
-```
-
-## Core Concepts
-
-### Memory Items
-
-Memory items are the fundamental unit of storage in the SPARC Memory Bank:
-
-```typescript
-interface MemoryItem {
- id: string; // Unique identifier
- category: string; // Logical grouping
- content: string; // Main content
- tags: string[]; // Searchable tags
- namespace?: string; // Isolation boundary
- metadata?: Record<string, unknown>; // Additional data
- embedding?: number[]; // Vector representation
- version: number; // CRDT version
- vectorClock: Record<string, number>; // Conflict resolution
- created: Date; // Creation timestamp
- updated: Date; // Last modification
- checksum: string; // Integrity verification
-}
-```
-
-### Backends
-
-**SQLite Backend**: Optimized for performance with FTS5 search, WAL mode, and proper indexing.
-
-**Markdown Backend**: Human-readable storage with git integration for version control and collaboration.
-
-### Caching
-
-Intelligent caching layer with multiple eviction strategies:
-- **LRU**: Least Recently Used (default)
-- **LFU**: Least Frequently Used
-- **FIFO**: First In, First Out
-- **TTL**: Time To Live based expiration
-
-### Vector Search
-
-Semantic similarity search using vector embeddings:
-- Automatic embedding generation
-- Cosine similarity matching
-- Configurable similarity thresholds
-- Integration with external embedding services
-
-## System Requirements
-
-- **Runtime**: Node.js 18+ or Deno 1.30+
-- **Storage**: SQLite 3.38+ (for SQLite backend)
-- **Memory**: Minimum 512MB RAM (varies with cache size)
-- **Disk**: Variable (depends on data volume and caching)
-
-## License
-
-MIT License - see [LICENSE](../LICENSE) for details.
-
-## Contributing
-
-See [CONTRIBUTING.md](../CONTRIBUTING.md) for development setup and guidelines.
-
-## Support
-
-- **Documentation**: [GitHub Wiki](https://github.com/sparc/memory-bank/wiki)
-- **Issues**: [GitHub Issues](https://github.com/sparc/memory-bank/issues)
-- **Discussions**: [GitHub Discussions](https://github.com/sparc/memory-bank/discussions)
\ No newline at end of file
diff --git a/archive/legacy-memory-system/docs/api.md b/archive/legacy-memory-system/docs/api.md
deleted file mode 100644
index 6b4159d141..0000000000
--- a/archive/legacy-memory-system/docs/api.md
+++ /dev/null
@@ -1,449 +0,0 @@
-# API Reference
-
-## Core Classes
-
-### MemoryManager
-
-The main interface for all memory operations.
-
-```typescript
-class MemoryManager {
- constructor(config: MemoryConfig)
-
- // Core operations
- async store(item: Partial<MemoryItem>): Promise<MemoryItem>
- async retrieve(id: string): Promise<MemoryItem | null>
- async query(query: MemoryQuery): Promise<MemoryItem[]>
- async update(id: string, updates: Partial<MemoryItem>): Promise<MemoryItem>
- async delete(id: string): Promise<boolean>
-
- // Batch operations
- async storeBatch(items: Partial<MemoryItem>[]): Promise<MemoryItem[]>
- async retrieveBatch(ids: string[]): Promise<(MemoryItem | null)[]>
- async deleteBatch(ids: string[]): Promise<boolean[]>
-
- // Advanced operations
- async vectorSearch(query: VectorQuery): Promise<VectorSearchResult[]>
- async fullTextSearch(query: string, options?: SearchOptions): Promise<MemoryItem[]>
- async getStatistics(): Promise<MemoryStatistics>
-
- // Lifecycle
- async initialize(): Promise<void>
- async close(): Promise<void>
- async backup(options: BackupOptions): Promise<string>
- async restore(backupPath: string): Promise<void>
-}
-```
-
-#### store(item: Partial<MemoryItem>): Promise<MemoryItem>
-
-Stores a new memory item or updates an existing one.
-
-**Parameters:**
-- `item`: Partial memory item with at least `category` and `content`
-
-**Returns:**
-- Complete `MemoryItem` with generated ID, timestamps, and metadata
-
-**Example:**
-```typescript
-const item = await memory.store({
- category: 'task',
- content: 'Implement user authentication',
- tags: ['auth', 'security'],
- metadata: {
- priority: 'high',
- assignee: 'alice'
- }
-});
-
-console.log(`Created item: ${item.id}`);
-```
-
-#### retrieve(id: string): Promise<MemoryItem | null>
-
-Retrieves a memory item by its unique ID.
-
-**Parameters:**
-- `id`: Unique identifier of the memory item
-
-**Returns:**
-- `MemoryItem` if found, `null` otherwise
-
-**Example:**
-```typescript
-const item = await memory.retrieve('item-123');
-if (item) {
- console.log(`Found: ${item.content}`);
-} else {
- console.log('Item not found');
-}
-```
-
-#### query(query: MemoryQuery): Promise<MemoryItem[]>
-
-Searches for memory items based on various criteria.
-
-**Parameters:**
-- `query`: Search criteria and options
-
-**Returns:**
-- Array of matching `MemoryItem`s, sorted by relevance
-
-**Example:**
-```typescript
-const results = await memory.query({
- category: 'task',
- tags: ['auth'],
- fullText: 'authentication',
- dateRange: {
- start: new Date('2024-01-01'),
- end: new Date('2024-12-31')
- },
- limit: 10,
- sortBy: 'updated',
- sortOrder: 'desc'
-});
-
-console.log(`Found ${results.length} items`);
-```
-
-#### update(id: string, updates: Partial<MemoryItem>): Promise<MemoryItem>
-
-Updates an existing memory item with conflict resolution.
-
-**Parameters:**
-- `id`: Unique identifier of the item to update
-- `updates`: Partial updates to apply
-
-**Returns:**
-- Updated `MemoryItem` with new version and timestamp
-
-**Example:**
-```typescript
-const updated = await memory.update('item-123', {
- content: 'Updated implementation notes',
- tags: ['auth', 'security', 'completed'],
- metadata: {
- ...item.metadata,
- status: 'completed',
- completedAt: new Date()
- }
-});
-
-console.log(`Updated to version ${updated.version}`);
-```
-
-#### delete(id: string): Promise<boolean>
-
-Deletes a memory item permanently.
-
-**Parameters:**
-- `id`: Unique identifier of the item to delete
-
-**Returns:**
-- `true` if item was deleted, `false` if not found
-
-**Example:**
-```typescript
-const deleted = await memory.delete('item-123');
-if (deleted) {
- console.log('Item deleted successfully');
-} else {
- console.log('Item not found');
-}
-```
-
-#### vectorSearch(query: VectorQuery): Promise<VectorSearchResult[]>
-
-Performs semantic similarity search using vector embeddings.
-
-**Parameters:**
-- `query`: Vector search criteria
-
-**Returns:**
-- Array of results with similarity scores
-
-**Example:**
-```typescript
-const results = await memory.vectorSearch({
- text: 'user authentication and security',
- threshold: 0.7,
- limit: 5,
- categories: ['task', 'research']
-});
-
-for (const result of results) {
- console.log(`${result.item.content} (${result.similarity})`);
-}
-```
-
-## Data Types
-
-### MemoryItem
-
-The core data structure representing a stored memory.
-
-```typescript
-interface MemoryItem {
- id: string; // Unique identifier (UUID)
- category: string; // Logical grouping (e.g., 'task', 'research')
- content: string; // Main content/description
- tags: string[]; // Searchable tags
- namespace?: string; // Isolation boundary
- metadata?: Record<string, unknown>; // Additional structured data
- embedding?: number[]; // Vector representation (1536 dimensions)
- version: number; // CRDT version counter
- vectorClock: Record<string, number>; // Conflict resolution timestamps
- created: Date; // Creation timestamp
- updated: Date; // Last modification timestamp
- checksum: string; // SHA-256 integrity hash
-}
-```
-
-### MemoryQuery
-
-Search criteria for querying memory items.
-
-```typescript
-interface MemoryQuery {
- // Content filters
- category?: string; // Exact category match
- categories?: string[]; // Multiple category options
- tags?: string[]; // Must include all tags (AND)
- tagsAny?: string[]; // Must include any tag (OR)
- fullText?: string; // Full-text search query
- content?: string; // Content substring match
-
- // Metadata filters
- namespace?: string; // Namespace isolation
- metadata?: Record<string, unknown>; // Metadata key-value matches
-
- // Time filters
- dateRange?: {
- start?: Date; // Items created/updated after
- end?: Date; // Items created/updated before
- field?: 'created' | 'updated'; // Which timestamp to use
- };
-
- // Vector search
- similarity?: {
- text?: string; // Text to compare against
- embedding?: number[]; // Direct embedding comparison
- threshold?: number; // Minimum similarity (0-1)
- };
-
- // Result options
- limit?: number; // Maximum results (default: 100)
- offset?: number; // Skip first N results
- sortBy?: 'created' | 'updated' | 'category' | 'relevance';
- sortOrder?: 'asc' | 'desc'; // Sort direction
-
- // Performance options
- useCache?: boolean; // Use cache for results
- includeEmbeddings?: boolean; // Include vector data in results
-}
-```
-
-### VectorQuery
-
-Specialized query for semantic vector search.
-
-```typescript
-interface VectorQuery {
- text?: string; // Text to find similar items for
- embedding?: number[]; // Pre-computed embedding vector
- threshold?: number; // Minimum similarity score (0-1)
- limit?: number; // Maximum results
- categories?: string[]; // Limit to specific categories
- namespaces?: string[]; // Limit to specific namespaces
- excludeIds?: string[]; // Exclude specific item IDs
-}
-```
-
-### VectorSearchResult
-
-Result from vector similarity search.
-
-```typescript
-interface VectorSearchResult {
- item: MemoryItem; // The matching memory item
- similarity: number; // Cosine similarity score (0-1)
- distance: number; // Euclidean distance
- rank: number; // Result ranking (1-based)
-}
-```
-
-### MemoryConfig
-
-Configuration options for the memory system.
-
-```typescript
-interface MemoryConfig {
- // Backend configuration
- backend: 'sqlite' | 'markdown'; // Storage backend type
- storage: {
- path: string; // Storage path/connection string
- options?: Record<string, unknown>; // Backend-specific options
- };
-
- // Cache configuration
- cache?: {
- enabled: boolean; // Enable caching
- maxSize: number; // Maximum cache size in bytes
- strategy: 'lru' | 'lfu' | 'fifo' | 'ttl'; // Eviction strategy
- ttl?: number; // Time-to-live in milliseconds
- };
-
- // Indexing configuration
- indexing?: {
- enabled: boolean; // Enable advanced indexing
- vectorSearch: boolean; // Enable vector search
- fullTextSearch: boolean; // Enable full-text search
- embeddingService?: EmbeddingService; // Custom embedding service
- };
-
- // Namespace configuration
- namespaces?: {
- enabled: boolean; // Enable namespace isolation
- defaultNamespace: string; // Default namespace name
- permissions?: NamespacePermissions; // Access control
- };
-
- // Replication configuration
- replication?: {
- enabled: boolean; // Enable replication
- peers: string[]; // Peer connection strings
- strategy: 'immediate' | 'batched' | 'scheduled';
- conflictResolution: 'lastWrite' | 'merge' | 'manual';
- };
-
- // Security configuration
- security?: {
- encryption: {
- enabled: boolean; // Enable encryption at rest
- algorithm: 'aes-256-gcm'; // Encryption algorithm
- keyDerivation: 'pbkdf2'; // Key derivation function
- };
- checksums: boolean; // Enable integrity checking
- auditLog: boolean; // Enable audit logging
- };
-}
-```
-
-## Error Types
-
-### MemoryError
-
-Base error class for all memory-related errors.
-
-```typescript
-class MemoryError extends Error {
- constructor(
- message: string,
- public code: string,
- public details?: unknown
- )
-}
-```
-
-### Common Error Codes
-
-- `ITEM_NOT_FOUND`: Requested item does not exist
-- `INVALID_QUERY`: Query parameters are invalid
-- `STORAGE_ERROR`: Backend storage operation failed
-- `CACHE_ERROR`: Cache operation failed
-- `INDEX_ERROR`: Indexing operation failed
-- `NAMESPACE_ERROR`: Namespace operation failed
-- `PERMISSION_DENIED`: Insufficient permissions
-- `CONFLICT_ERROR`: CRDT merge conflict
-- `VALIDATION_ERROR`: Data validation failed
-- `INITIALIZATION_ERROR`: System initialization failed
-
-## Advanced Features
-
-### Batch Operations
-
-Efficient bulk operations for high-throughput scenarios.
-
-```typescript
-// Store multiple items efficiently
-const items = await memory.storeBatch([
- { category: 'task', content: 'Task 1' },
- { category: 'task', content: 'Task 2' },
- { category: 'research', content: 'Finding 1' }
-]);
-
-// Retrieve multiple items by ID
-const retrieved = await memory.retrieveBatch(['id1', 'id2', 'id3']);
-
-// Delete multiple items
-const deleted = await memory.deleteBatch(['id1', 'id2']);
-```
-
-### Statistics and Monitoring
-
-```typescript
-interface MemoryStatistics {
- totalItems: number;
- itemsByCategory: Record<string, number>;
- itemsByNamespace: Record<string, number>;
- storageSize: number;
- cacheStats: {
- hitRate: number;
- missRate: number;
- evictions: number;
- size: number;
- };
- indexStats: {
- vectorIndexSize: number;
- fullTextIndexSize: number;
- rebuildCount: number;
- };
- performance: {
- averageQueryTime: number;
- averageStoreTime: number;
- averageRetrieveTime: number;
- };
-}
-
-const stats = await memory.getStatistics();
-console.log(`Total items: ${stats.totalItems}`);
-console.log(`Cache hit rate: ${(stats.cacheStats.hitRate * 100).toFixed(2)}%`);
-```
-
-### Backup and Restore
-
-```typescript
-// Create backup
-const backupPath = await memory.backup({
- format: 'json',
- compression: 'gzip',
- encryption: true,
- includeIndexes: false
-});
-
-// Restore from backup
-await memory.restore(backupPath);
-```
-
-### Event Handling
-
-```typescript
-// Listen for memory events
-memory.on('itemStored', (item: MemoryItem) => {
- console.log(`Stored: ${item.id}`);
-});
-
-memory.on('itemUpdated', (item: MemoryItem, previousVersion: number) => {
- console.log(`Updated: ${item.id} (v${previousVersion} -> v${item.version})`);
-});
-
-memory.on('itemDeleted', (id: string) => {
- console.log(`Deleted: ${id}`);
-});
-
-memory.on('conflictResolved', (item: MemoryItem, conflicts: MemoryItem[]) => {
- console.log(`Resolved conflict for: ${item.id}`);
-});
-```
\ No newline at end of file
diff --git a/archive/legacy-memory-system/docs/architecture.md b/archive/legacy-memory-system/docs/architecture.md
deleted file mode 100644
index e19c24c916..0000000000
--- a/archive/legacy-memory-system/docs/architecture.md
+++ /dev/null
@@ -1,414 +0,0 @@
-# Architecture Overview
-
-## System Architecture
-
-The SPARC Memory Bank follows a layered architecture designed for scalability, maintainability, and performance:
-
-```
-┌─────────────────────────────────────────────────────────────┐
-│ Application Layer │
-├─────────────────────────────────────────────────────────────┤
-│ Memory Manager │ Namespace Manager │ Replication Mgr │
-├─────────────────────────────────────────────────────────────┤
-│ Cache Layer │ Indexer │ Import/Export │
-├─────────────────────────────────────────────────────────────┤
-│ SQLite Backend │ Markdown Backend │
-├─────────────────────────────────────────────────────────────┤
-│ Storage Layer (File System/Database) │
-└─────────────────────────────────────────────────────────────┘
-```
-
-## Core Components
-
-### Memory Manager
-
-The central orchestrator that coordinates all memory operations:
-
-```typescript
-class MemoryManager {
- private backend: MemoryBackend;
- private cache: MemoryCache;
- private indexer: MemoryIndexer;
- private namespaceManager: NamespaceManager;
- private replicationManager: ReplicationManager;
- private config: MemoryConfig;
-
- // Core operations
- async store(item: Partial<MemoryItem>): Promise<MemoryItem>
- async retrieve(id: string): Promise<MemoryItem | null>
- async query(query: MemoryQuery): Promise<MemoryItem[]>
- async update(id: string, updates: Partial<MemoryItem>): Promise<MemoryItem>
- async delete(id: string): Promise<boolean>
-}
-```
-
-**Key Responsibilities:**
-- Coordinate operations across all subsystems
-- Manage transactions and consistency
-- Handle caching strategies
-- Orchestrate replication and conflict resolution
-- Provide unified API interface
-
-### Storage Backends
-
-#### SQLite Backend
-
-**Optimizations:**
-- WAL (Write-Ahead Logging) mode for concurrent access
-- FTS5 full-text search with custom tokenizers
-- Prepared statements for performance
-- Connection pooling for concurrent operations
-- Automatic vacuum and optimization
-
-**Schema Design:**
-```sql
-CREATE TABLE memory_items (
- id TEXT PRIMARY KEY,
- category TEXT NOT NULL,
- content TEXT NOT NULL,
- tags TEXT, -- JSON array
- namespace TEXT,
- metadata TEXT, -- JSON object
- embedding BLOB, -- Vector data
- version INTEGER NOT NULL,
- vector_clock TEXT, -- JSON object
- created INTEGER NOT NULL,
- updated INTEGER NOT NULL,
- checksum TEXT NOT NULL
-);
-
--- Indexes for optimal query performance
-CREATE INDEX idx_category ON memory_items(category);
-CREATE INDEX idx_namespace ON memory_items(namespace);
-CREATE INDEX idx_created ON memory_items(created);
-CREATE INDEX idx_updated ON memory_items(updated);
-
--- Full-text search virtual table
-CREATE VIRTUAL TABLE memory_fts USING fts5(
- content,
- tags,
- content='memory_items',
- content_rowid='rowid'
-);
-```
-
-#### Markdown Backend
-
-**Directory Structure:**
-```
-memory/
-├── namespaces/
-│ ├── default/
-│ │ ├── implementation/
-│ │ │ ├── 2024/01/
-│ │ │ │ ├── task-001.md
-│ │ │ │ └── task-002.md
-│ │ │ └── index.json
-│ │ └── research/
-│ └── project-x/
-├── .meta/
-│ ├── vector_clock.json
-│ ├── checksums.json
-│ └── indexes/
-└── .gitignore
-```
-
-**File Format:**
-```markdown
----
-id: task-001
-category: implementation
-tags: [auth, security, backend]
-namespace: default
-version: 3
-vectorClock:
- agent-1: 2
- agent-2: 1
-created: 2024-01-15T10:30:00Z
-updated: 2024-01-15T14:20:00Z
-checksum: sha256:abc123...
-metadata:
- assignee: alice
- priority: high
- completion: 0.8
----
-
-# User Authentication Implementation
-
-Implemented JWT-based authentication system with the following features:
-
-- Token generation and validation
-- Role-based access control
-- Session management
-- Password hashing with bcrypt
-
-## Progress
-
-- [x] JWT token service
-- [x] Authentication middleware
-- [x] User registration endpoint
-- [ ] Password reset functionality
-```
-
-### Caching System
-
-**Multi-Strategy Cache:**
-```typescript
-interface CacheEntry<T> {
- value: T;
- accessCount: number;
- lastAccessed: number;
- created: number;
- ttl?: number;
- size: number;
-}
-
-class MemoryCache {
- private strategies: {
- lru: LRUStrategy;
- lfu: LFUStrategy;
- fifo: FIFOStrategy;
- ttl: TTLStrategy;
- };
-
- private stats: {
- hits: number;
- misses: number;
- evictions: number;
- totalSize: number;
- };
-}
-```
-
-**Cache Strategies:**
-- **LRU (Least Recently Used)**: Evicts items not accessed recently
-- **LFU (Least Frequently Used)**: Evicts items with lowest access count
-- **FIFO (First In, First Out)**: Evicts oldest items first
-- **TTL (Time To Live)**: Automatic expiration based on time
-
-### Indexing System
-
-**Multi-Dimensional Indexing:**
-```typescript
-class MemoryIndexer {
- private indexes: {
- category: Map<string, Set<string>>;
- tags: Map<string, Set<string>>;
- namespace: Map<string, Set<string>>;
- timestamp: TreeMap<number, Set<string>>;
- vector: VectorIndex;
- };
-
- private vectorIndex: {
- embeddings: Map<string, number[]>;
- index: HNSWIndex; // Hierarchical Navigable Small World
- };
-}
-```
-
-**Vector Search Implementation:**
-- HNSW (Hierarchical Navigable Small World) for efficient similarity search
-- Cosine similarity for semantic matching
-- Configurable embedding dimensions (default: 1536 for OpenAI)
-- Batch processing for embedding generation
-
-### Conflict Resolution (CRDT)
-
-**Vector Clock Implementation:**
-```typescript
-interface VectorClock {
- [agentId: string]: number;
-}
-
-class ConflictResolver {
- // Determine if clock A happened before clock B
- happensBefore(clockA: VectorClock, clockB: VectorClock): boolean {
- let allLessOrEqual = true;
- let atLeastOneLess = false;
-
- for (const agent in clockB) {
- const a = clockA[agent] || 0;
- const b = clockB[agent] || 0;
-
- if (a > b) return false;
- if (a < b) atLeastOneLess = true;
- }
-
- return allLessOrEqual && atLeastOneLess;
- }
-
- // Merge concurrent updates
- merge(itemA: MemoryItem, itemB: MemoryItem): MemoryItem {
- // Custom merge strategies based on field types
- return {
- ...itemA,
- content: this.mergeContent(itemA.content, itemB.content),
- tags: this.mergeTags(itemA.tags, itemB.tags),
- metadata: this.mergeMetadata(itemA.metadata, itemB.metadata),
- version: Math.max(itemA.version, itemB.version) + 1,
- vectorClock: this.mergeVectorClocks(itemA.vectorClock, itemB.vectorClock),
- updated: new Date()
- };
- }
-}
-```
-
-### Replication Manager
-
-**Distributed Synchronization:**
-```typescript
-class ReplicationManager {
- private peers: Map<string, PeerConnection>;
- private conflictResolver: ConflictResolver;
- private syncStrategy: SyncStrategy;
-
- // Synchronization strategies
- private strategies: {
- immediate: ImmediateSyncStrategy;
- batched: BatchedSyncStrategy;
- scheduled: ScheduledSyncStrategy;
- };
-
- async syncWithPeer(peerId: string): Promise<SyncResult> {
- const peer = this.peers.get(peerId);
- const localState = await this.getLocalState();
- const remoteState = await peer.getState();
-
- return this.reconcile(localState, remoteState);
- }
-}
-```
-
-### Namespace Management
-
-**Multi-Tenant Isolation:**
-```typescript
-interface NamespaceConfig {
- id: string;
- name: string;
- description?: string;
- permissions: NamespacePermissions;
- quotas: NamespaceQuotas;
- encryption: EncryptionConfig;
- replication: ReplicationConfig;
-}
-
-interface NamespacePermissions {
- read: string[]; // Agent IDs
- write: string[];
- admin: string[];
- public: boolean;
-}
-
-class NamespaceManager {
- async createNamespace(config: NamespaceConfig): Promise<void>
- async deleteNamespace(id: string): Promise<void>
- async checkPermission(namespace: string, agent: string, action: string): Promise<boolean>
- async enforceQuotas(namespace: string): Promise<QuotaStatus>
-}
-```
-
-## Data Flow
-
-### Write Operation Flow
-
-```mermaid
-sequenceDiagram
- participant App as Application
- participant MM as MemoryManager
- participant Cache as Cache
- participant Idx as Indexer
- participant BE as Backend
- participant Repl as ReplicationManager
-
- App->>MM: store(item)
- MM->>MM: generateId()
- MM->>MM: calculateChecksum()
- MM->>Cache: store(item)
- MM->>Idx: index(item)
- MM->>BE: store(item)
- MM->>Repl: propagate(item)
- MM->>App: return item
-```
-
-### Query Operation Flow
-
-```mermaid
-sequenceDiagram
- participant App as Application
- participant MM as MemoryManager
- participant Cache as Cache
- participant Idx as Indexer
- participant BE as Backend
-
- App->>MM: query(criteria)
- MM->>Cache: checkCache(criteria)
- alt Cache Hit
- Cache->>MM: return cached results
- else Cache Miss
- MM->>Idx: findCandidates(criteria)
- MM->>BE: retrieve(candidates)
- MM->>Cache: store(results)
- end
- MM->>App: return results
-```
-
-## Performance Characteristics
-
-### Time Complexity
-
-| Operation | SQLite Backend | Markdown Backend | Notes |
-|-----------|---------------|------------------|-------|
-| Store | O(log n) | O(1) | SQLite index updates |
-| Retrieve by ID | O(1) | O(1) | Hash table lookup |
-| Query by category | O(log n) | O(n) | Index vs scan |
-| Full-text search | O(k log n) | O(n) | FTS5 vs grep |
-| Vector search | O(k log n) | O(n) | HNSW vs linear |
-
-### Space Complexity
-
-- **SQLite**: ~1.5x original data size (indexes, metadata)
-- **Markdown**: ~1.2x original data size (YAML frontmatter)
-- **Cache**: Configurable, typically 10-20% of total data
-- **Indexes**: ~30-50% of original data size
-
-## Scalability Considerations
-
-### Horizontal Scaling
-
-- **Read Replicas**: Multiple read-only instances
-- **Sharding**: Namespace-based partitioning
-- **Load Balancing**: Round-robin or weighted routing
-
-### Vertical Scaling
-
-- **Memory**: Larger cache sizes improve performance
-- **Storage**: SSD recommended for SQLite backend
-- **CPU**: Multi-core benefits indexing and search operations
-
-### Limits
-
-- **SQLite**: ~281TB theoretical, ~140TB practical
-- **Markdown**: Limited by filesystem (ext4: 16TB, NTFS: 256TB)
-- **Vector Search**: ~10M vectors with reasonable performance
-- **Concurrent Users**: ~1000 with proper connection pooling
-
-## Security Architecture
-
-### Encryption
-
-- **At Rest**: AES-256 for sensitive data
-- **In Transit**: TLS 1.3 for replication
-- **Key Management**: PBKDF2 with salt for key derivation
-
-### Access Control
-
-- **Namespace-level**: Read/write/admin permissions
-- **Item-level**: Optional fine-grained access control
-- **Audit Logging**: All operations logged with agent ID
-
-### Integrity
-
-- **Checksums**: SHA-256 for data integrity
-- **Digital Signatures**: Optional signing for critical data
-- **Version Verification**: CRDT vector clocks prevent tampering
\ No newline at end of file
diff --git a/archive/legacy-memory-system/docs/backends.md b/archive/legacy-memory-system/docs/backends.md
deleted file mode 100644
index 242108790c..0000000000
--- a/archive/legacy-memory-system/docs/backends.md
+++ /dev/null
@@ -1,546 +0,0 @@
-# Storage Backends
-
-SPARC Memory Bank supports multiple storage backends, each optimized for different use cases and requirements.
-
-## SQLite Backend
-
-The SQLite backend provides high-performance, ACID-compliant storage with advanced indexing and full-text search capabilities.
-
-### Features
-
-- **ACID Transactions**: Full transaction support with rollback capabilities
-- **WAL Mode**: Write-Ahead Logging for better concurrent access
-- **FTS5 Search**: Full-text search with ranking and highlighting
-- **Vector Storage**: Efficient storage and retrieval of embeddings
-- **Connection Pooling**: Multiple concurrent connections
-- **Automatic Optimization**: VACUUM and ANALYZE operations
-
-### Configuration
-
-```typescript
-const sqliteConfig = {
- backend: 'sqlite',
- storage: {
- path: './memory.db',
- options: {
- // SQLite-specific options
- journalMode: 'WAL', // WAL, DELETE, TRUNCATE, PERSIST, MEMORY, OFF
- synchronous: 'NORMAL', // OFF, NORMAL, FULL, EXTRA
- cacheSize: 2000, // Number of pages in cache
- tempStore: 'MEMORY', // MEMORY, FILE, DEFAULT
- mmapSize: 268435456, // Memory-mapped I/O size (256MB)
- pageSize: 4096, // Database page size
- autoVacuum: 'INCREMENTAL', // NONE, FULL, INCREMENTAL
- foreignKeys: true, // Enable foreign key constraints
-
- // Connection pool settings
- maxConnections: 10, // Maximum concurrent connections
- idleTimeout: 60000, // Idle connection timeout (ms)
- busyTimeout: 30000, // Busy timeout (ms)
-
- // Full-text search settings
- ftsTokenizer: 'unicode61', // Tokenizer for FTS5
- ftsRankFunction: 'bm25', // Ranking function
-
- // Performance tuning
- enableWalCheckpoint: true, // Automatic WAL checkpointing
- walCheckpointInterval: 300000, // Checkpoint interval (5 minutes)
- pragmaOptimize: true, // Run PRAGMA optimize periodically
- }
- }
-};
-```
-
-### Schema Design
-
-The SQLite backend uses an optimized schema for memory storage:
-
-```sql
--- Main table for memory items
-CREATE TABLE memory_items (
- id TEXT PRIMARY KEY NOT NULL,
- category TEXT NOT NULL,
- content TEXT NOT NULL,
- tags TEXT NOT NULL, -- JSON array
- namespace TEXT,
- metadata TEXT, -- JSON object
- embedding BLOB, -- Vector data as binary
- version INTEGER NOT NULL DEFAULT 1,
- vector_clock TEXT NOT NULL, -- JSON object
- created INTEGER NOT NULL, -- Unix timestamp
- updated INTEGER NOT NULL, -- Unix timestamp
- checksum TEXT NOT NULL,
-
- -- Constraints
- CHECK (version > 0),
- CHECK (created > 0),
- CHECK (updated >= created),
- CHECK (length(checksum) = 64) -- SHA-256 hex
-);
-
--- Indexes for optimal query performance
-CREATE INDEX idx_memory_category ON memory_items(category);
-CREATE INDEX idx_memory_namespace ON memory_items(namespace);
-CREATE INDEX idx_memory_created ON memory_items(created DESC);
-CREATE INDEX idx_memory_updated ON memory_items(updated DESC);
-CREATE INDEX idx_memory_version ON memory_items(version);
-CREATE INDEX idx_memory_category_namespace ON memory_items(category, namespace);
-
--- JSON indexes for metadata queries (SQLite 3.45+)
-CREATE INDEX idx_memory_metadata_status ON memory_items(json_extract(metadata, '$.status'));
-CREATE INDEX idx_memory_metadata_priority ON memory_items(json_extract(metadata, '$.priority'));
-
--- Full-text search virtual table
-CREATE VIRTUAL TABLE memory_fts USING fts5(
- content,
- tags,
- category,
-
- -- Configuration
- content='memory_items',
- content_rowid='rowid',
- tokenize='unicode61 remove_diacritics 2'
-);
-
--- Triggers to maintain FTS index
-CREATE TRIGGER memory_fts_insert AFTER INSERT ON memory_items
-BEGIN
- INSERT INTO memory_fts(rowid, content, tags, category)
- VALUES (NEW.rowid, NEW.content, NEW.tags, NEW.category);
-END;
-
-CREATE TRIGGER memory_fts_update AFTER UPDATE ON memory_items
-BEGIN
- UPDATE memory_fts
- SET content = NEW.content, tags = NEW.tags, category = NEW.category
- WHERE rowid = NEW.rowid;
-END;
-
-CREATE TRIGGER memory_fts_delete AFTER DELETE ON memory_items
-BEGIN
- DELETE FROM memory_fts WHERE rowid = OLD.rowid;
-END;
-
--- Vector similarity functions (requires sqlite-vss extension)
-CREATE VIRTUAL TABLE IF NOT EXISTS memory_vectors USING vss0(
- embedding(1536), -- OpenAI embedding dimensions
- metadata TEXT
-);
-```
-
-### Performance Characteristics
-
-| Operation | Time Complexity | Notes |
-|-----------|----------------|-------|
-| Store | O(log n) | Index updates |
-| Retrieve by ID | O(1) | Primary key lookup |
-| Query by category | O(log n) | Index scan |
-| Full-text search | O(k log n) | FTS5 with ranking |
-| Vector search | O(k log n) | With vss extension |
-| Batch operations | O(n log n) | Transaction batching |
-
-### Optimization Tips
-
-```typescript
-// Enable performance monitoring
-const memory = new MemoryManager({
- backend: 'sqlite',
- storage: {
- path: './optimized.db',
- options: {
- // Optimize for read-heavy workloads
- journalMode: 'WAL',
- synchronous: 'NORMAL',
- cacheSize: 10000, // Larger cache
- mmapSize: 1073741824, // 1GB memory mapping
-
- // Connection pooling for concurrent access
- maxConnections: 20,
-
- // Regular maintenance
- pragmaOptimize: true,
- enableWalCheckpoint: true,
- walCheckpointInterval: 60000 // More frequent checkpoints
- }
- }
-});
-
-// Monitor query performance
-const stats = await memory.getStatistics();
-if (stats.performance.averageQueryTime > 50) {
- console.warn('Consider adding indexes or optimizing queries');
-}
-```
-
-## Markdown Backend
-
-The Markdown backend provides human-readable storage with git integration for version control and collaboration.
-
-### Features
-
-- **Human-Readable**: Files can be edited directly in any text editor
-- **Git Integration**: Full version control with git repositories
-- **Hierarchical Organization**: Directory structure mirrors data organization
-- **YAML Frontmatter**: Structured metadata in standard format
-- **Cross-Platform**: Works on any filesystem
-- **Backup-Friendly**: Easy to backup and restore
-
-### Configuration
-
-```typescript
-const markdownConfig = {
- backend: 'markdown',
- storage: {
- path: './memory',
- options: {
- // Directory structure
- useNamespaceDirectories: true, // Create dirs for namespaces
- useCategoryDirectories: true, // Create dirs for categories
- useTimeBasedDirectories: true, // Create YYYY/MM dirs
-
- // File naming
- fileNaming: 'timestamp', // 'id', 'timestamp', 'slug'
- slugify: true, // Create URL-friendly filenames
- maxFilenameLength: 100, // Truncate long filenames
-
- // Content formatting
- frontmatterFormat: 'yaml', // 'yaml', 'toml', 'json'
- contentFormat: 'markdown', // 'markdown', 'text', 'html'
- includeTableOfContents: false, // Generate TOC
-
- // Git integration
- gitEnabled: true, // Enable git operations
- gitAutoCommit: true, // Auto-commit changes
- gitCommitMessage: 'Update memory: {id}', // Commit message template
- gitBranch: 'main', // Target branch
-
- // Performance
- cacheDirectory: './.cache', // Cache parsed files
- watchForChanges: true, // Watch for external changes
- rebuildIndexInterval: 300000, // Rebuild index every 5 minutes
-
- // Cleanup
- enableGarbageCollection: true, // Remove orphaned files
- garbageCollectionInterval: 86400000, // Daily cleanup
- }
- }
-};
-```
-
-### Directory Structure
-
-The Markdown backend organizes files in a hierarchical structure:
-
-```
-memory/
-├── namespaces/
-│ ├── default/
-│ │ ├── task/
-│ │ │ ├── 2024/
-│ │ │ │ ├── 01/
-│ │ │ │ │ ├── implement-auth-system-20240115-143022.md
-│ │ │ │ │ └── design-database-schema-20240116-091455.md
-│ │ │ │ └── 02/
-│ │ │ └── index.json
-│ │ ├── research/
-│ │ │ ├── 2024/
-│ │ │ │ ├── 01/
-│ │ │ │ │ └── auth-patterns-analysis-20240115-102033.md
-│ │ │ │ └── index.json
-│ │ │ └── index.json
-│ │ └── implementation/
-│ ├── project-alpha/
-│ │ ├── task/
-│ │ └── progress/
-│ └── project-beta/
-├── .meta/
-│ ├── vector_clock.json
-│ ├── checksums.json
-│ ├── indexes/
-│ │ ├── category.json
-│ │ ├── tags.json
-│ │ ├── namespace.json
-│ │ └── embeddings.bin
-│ └── config.json
-├── .cache/
-│ ├── parsed/
-│ └── indexes/
-├── .gitignore
-└── README.md
-```
-
-### File Format
-
-Each memory item is stored as a Markdown file with YAML frontmatter:
-
-```markdown
----
-id: "item_1705329022456_7x8k9n2m"
-category: "implementation"
-tags:
- - "auth"
- - "jwt"
- - "security"
- - "middleware"
-namespace: "project-alpha"
-version: 3
-vectorClock:
- agent-alice: 2
- agent-bob: 1
-created: "2024-01-15T14:30:22.456Z"
-updated: "2024-01-15T16:45:33.789Z"
-checksum: "sha256:a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456"
-metadata:
- assignee: "[email protected]"
- priority: "high"
- estimatedHours: 8
- status: "completed"
- codeReviewUrl: "https://github.com/company/project/pull/123"
- testCoverage: 0.85
-embedding:
- dimensions: 1536
- model: "text-embedding-ada-002"
- checksum: "md5:1a2b3c4d5e6f7890"
----
-
-# JWT Authentication Middleware Implementation
-
-Implemented a robust JWT authentication middleware for the Express.js application with the following features:
-
-## Features Implemented
-
-- **Token Validation**: Validates JWT tokens using RS256 algorithm
-- **Expiration Checking**: Automatically rejects expired tokens
-- **Role-Based Access**: Supports role-based authorization
-- **Refresh Token Support**: Implements secure token refresh mechanism
-
-## Code Structure
-
-```typescript
-interface JWTPayload {
- userId: string;
- email: string;
- roles: string[];
- iat: number;
- exp: number;
-}
-
-class AuthMiddleware {
- async validateToken(token: string): Promise<JWTPayload> {
- // Implementation details...
- }
-}
-```
-
-## Testing
-
-- ✅ Unit tests for token validation
-- ✅ Integration tests with Express routes
-- ✅ Security penetration testing
-- ✅ Performance benchmarking
-
-## Performance Metrics
-
-- Token validation: ~2ms average
-- Memory usage: <1MB per 1000 concurrent requests
-- CPU usage: <0.1% under normal load
-
-## Next Steps
-
-- [ ] Add support for multiple JWT issuers
-- [ ] Implement token blacklisting
-- [ ] Add metrics and monitoring
-```
-
-### Git Integration
-
-The Markdown backend can automatically manage git operations:
-
-```typescript
-// Enable git integration
-const gitMemory = new MemoryManager({
- backend: 'markdown',
- storage: {
- path: './memory-repo',
- options: {
- gitEnabled: true,
- gitAutoCommit: true,
- gitCommitMessage: 'Memory update: {category} - {id}',
- gitBranch: 'main'
- }
- }
-});
-
-// Operations automatically create git commits
-const item = await gitMemory.store({
- category: 'task',
- content: 'New task created'
-});
-// Creates git commit: "Memory update: task - item_1705329022456_7x8k9n2m"
-
-// Manual git operations
-const backend = gitMemory.getBackend();
-await backend.gitCommit('Custom commit message');
-await backend.gitPush('origin', 'main');
-await backend.gitPull('origin', 'main');
-
-// Branch management
-await backend.gitCreateBranch('feature/new-memory-structure');
-await backend.gitCheckout('feature/new-memory-structure');
-await backend.gitMerge('main');
-```
-
-### Performance Characteristics
-
-| Operation | Time Complexity | Notes |
-|-----------|----------------|-------|
-| Store | O(1) | File write + index update |
-| Retrieve by ID | O(1) | Direct file read |
-| Query by category | O(n) | Directory scan + filtering |
-| Full-text search | O(n) | Grep-like text search |
-| Vector search | O(n) | Linear search through embeddings |
-| Git operations | O(m) | Where m = number of changed files |
-
-### Optimization Tips
-
-```typescript
-// Optimize for large datasets
-const optimizedMarkdown = new MemoryManager({
- backend: 'markdown',
- storage: {
- path: './large-memory',
- options: {
- // Use time-based directories to avoid large flat structures
- useTimeBasedDirectories: true,
- useCategoryDirectories: true,
-
- // Enable caching for better read performance
- cacheDirectory: './.cache',
- watchForChanges: false, // Disable if no external edits
-
- // Optimize git operations
- gitAutoCommit: false, // Manual commits for batching
- enableGarbageCollection: true,
-
- // Index optimization
- rebuildIndexInterval: 600000, // 10 minutes
- }
- },
- cache: {
- enabled: true,
- maxSize: 100 * 1024 * 1024, // 100MB cache
- strategy: 'lru'
- }
-});
-
-// Manual batching for better git performance
-const items = [
- { category: 'task', content: 'Task 1' },
- { category: 'task', content: 'Task 2' },
- { category: 'task', content: 'Task 3' }
-];
-
-await optimizedMarkdown.storeBatch(items);
-await optimizedMarkdown.getBackend().gitCommit('Batch update: 3 new tasks');
-```
-
-## Backend Comparison
-
-| Feature | SQLite | Markdown |
-|---------|--------|----------|
-| **Performance** |
-| Read speed | Excellent | Good |
-| Write speed | Excellent | Good |
-| Query speed | Excellent | Fair |
-| Full-text search | Excellent (FTS5) | Good (grep) |
-| Vector search | Excellent (with ext) | Fair (linear) |
-| **Scalability** |
-| Max items | 281 TB | Filesystem limit |
-| Concurrent users | Excellent | Good |
-| **Features** |
-| ACID transactions | Yes | No |
-| Human readable | No | Yes |
-| Git integration | No | Yes |
-| Direct editing | No | Yes |
-| **Operational** |
-| Backup complexity | Medium | Simple |
-| Migration | Medium | Simple |
-| Debugging | Medium | Easy |
-| Monitoring | Good | Basic |
-
-## Choosing a Backend
-
-### Use SQLite When:
-
-- **Performance is critical**: High-throughput applications
-- **Complex queries**: Advanced search and filtering requirements
-- **Large datasets**: Millions of memory items
-- **Concurrent access**: Multiple agents accessing simultaneously
-- **Transactional integrity**: ACID compliance required
-
-### Use Markdown When:
-
-- **Human collaboration**: Teams need to read/edit memories directly
-- **Version control**: Git-based workflows and history
-- **Transparency**: Auditable, human-readable storage
-- **Simple deployment**: No database setup required
-- **Documentation**: Memories serve as living documentation
-
-## Hybrid Approach
-
-For some use cases, you might want to use both backends:
-
-```typescript
-// Primary storage with SQLite for performance
-const primaryMemory = new MemoryManager({
- backend: 'sqlite',
- storage: { path: './primary.db' }
-});
-
-// Secondary storage with Markdown for collaboration
-const secondaryMemory = new MemoryManager({
- backend: 'markdown',
- storage: { path: './docs' }
-});
-
-// Sync important items to both
-const importantItem = await primaryMemory.store({
- category: 'architecture-decision',
- content: 'Decision to use microservices architecture',
- tags: ['architecture', 'decision', 'microservices']
-});
-
-// Also store in markdown for documentation
-await secondaryMemory.store(importantItem);
-```
-
-## Custom Backends
-
-You can implement custom backends by implementing the `MemoryBackend` interface:
-
-```typescript
-interface MemoryBackend {
- initialize(): Promise<void>;
- close(): Promise<void>;
- store(item: MemoryItem): Promise<void>;
- retrieve(id: string): Promise<MemoryItem | null>;
- query(query: MemoryQuery): Promise<MemoryItem[]>;
- update(id: string, item: MemoryItem): Promise<void>;
- delete(id: string): Promise<boolean>;
- getStatistics(): Promise<BackendStatistics>;
-}
-
-// Example: Redis backend for distributed caching
-class RedisBackend implements MemoryBackend {
- // Implementation...
-}
-
-// Use custom backend
-const redisMemory = new MemoryManager({
- backend: new RedisBackend({
- host: 'localhost',
- port: 6379,
- password: 'secret'
- })
-});
-```
\ No newline at end of file
diff --git a/archive/legacy-memory-system/docs/configuration.md b/archive/legacy-memory-system/docs/configuration.md
deleted file mode 100644
index 78d74f033c..0000000000
--- a/archive/legacy-memory-system/docs/configuration.md
+++ /dev/null
@@ -1,710 +0,0 @@
-# Configuration Reference
-
-This document provides a complete reference for configuring the SPARC Memory Bank system.
-
-## Main Configuration
-
-### MemoryConfig Interface
-
-```typescript
-interface MemoryConfig {
- // Required: Backend configuration
- backend: 'sqlite' | 'markdown' | MemoryBackend;
- storage: StorageConfig;
-
- // Optional: Feature configurations
- cache?: CacheConfig;
- indexing?: IndexingConfig;
- namespaces?: NamespaceConfig;
- replication?: ReplicationConfig;
- security?: SecurityConfig;
- monitoring?: MonitoringConfig;
-
- // Optional: System settings
- system?: SystemConfig;
-}
-```
-
-## Backend Configuration
-
-### SQLite Backend
-
-```typescript
-interface SQLiteStorageConfig {
- path: string; // Database file path
- options?: {
- // SQLite PRAGMA settings
- journalMode?: 'DELETE' | 'TRUNCATE' | 'PERSIST' | 'MEMORY' | 'WAL' | 'OFF';
- synchronous?: 'OFF' | 'NORMAL' | 'FULL' | 'EXTRA';
- cacheSize?: number; // Number of pages (default: 2000)
- tempStore?: 'DEFAULT' | 'FILE' | 'MEMORY';
- mmapSize?: number; // Memory-mapped I/O size in bytes
- pageSize?: number; // Database page size (512-65536)
- autoVacuum?: 'NONE' | 'FULL' | 'INCREMENTAL';
- foreignKeys?: boolean; // Enable foreign key constraints
- secureDelete?: boolean; // Secure deletion of data
-
- // Connection management
- maxConnections?: number; // Max concurrent connections (default: 10)
- idleTimeout?: number; // Idle connection timeout in ms
- busyTimeout?: number; // Busy timeout in ms (default: 30000)
- retryAttempts?: number; // Connection retry attempts
-
- // Performance tuning
- enableWalCheckpoint?: boolean; // Automatic WAL checkpointing
- walCheckpointInterval?: number; // Checkpoint interval in ms
- walCheckpointPages?: number; // Pages before checkpoint
- pragmaOptimize?: boolean; // Run PRAGMA optimize
- optimizeInterval?: number; // Optimize interval in ms
-
- // Full-text search
- ftsTokenizer?: 'simple' | 'porter' | 'unicode61' | 'ascii';
- ftsRankFunction?: 'bm25' | 'okapi';
- ftsRemoveDiacritics?: boolean;
-
- // Extensions
- loadExtensions?: string[]; // SQLite extension paths
- enableVectorSearch?: boolean; // Load vector search extension
-
- // Backup and recovery
- backupInterval?: number; // Automatic backup interval
- backupRetention?: number; // Number of backups to keep
- pointInTimeRecovery?: boolean; // Enable WAL-based recovery
-
- // Debugging
- logQueries?: boolean; // Log SQL queries
- queryTimeout?: number; // Query timeout in ms
- explainQueryPlan?: boolean; // Log query plans
- };
-}
-
-// Example SQLite configuration
-const sqliteConfig: MemoryConfig = {
- backend: 'sqlite',
- storage: {
- path: './data/memory.db',
- options: {
- journalMode: 'WAL',
- synchronous: 'NORMAL',
- cacheSize: 10000,
- mmapSize: 268435456, // 256MB
- maxConnections: 20,
- enableWalCheckpoint: true,
- walCheckpointInterval: 300000, // 5 minutes
- pragmaOptimize: true,
- ftsTokenizer: 'unicode61',
- loadExtensions: ['./extensions/vector.so'],
- enableVectorSearch: true
- }
- }
-};
-```
-
-### Markdown Backend
-
-```typescript
-interface MarkdownStorageConfig {
- path: string; // Root directory path
- options?: {
- // Directory structure
- useNamespaceDirectories?: boolean; // Create namespace subdirectories
- useCategoryDirectories?: boolean; // Create category subdirectories
- useTimeBasedDirectories?: boolean; // Create YYYY/MM subdirectories
- maxDirectoryDepth?: number; // Maximum directory nesting
-
- // File naming
- fileNaming?: 'id' | 'timestamp' | 'slug' | 'custom';
- customNamingFunction?: (item: MemoryItem) => string;
- slugify?: boolean; // Create URL-friendly filenames
- maxFilenameLength?: number; // Maximum filename length
- fileExtension?: string; // File extension (default: '.md')
-
- // Content formatting
- frontmatterFormat?: 'yaml' | 'toml' | 'json';
- contentFormat?: 'markdown' | 'text' | 'html';
- includeTableOfContents?: boolean; // Generate TOC
- includeMetadata?: boolean; // Include metadata in content
- wordWrap?: number; // Word wrap column
-
- // Markdown options
- markdownOptions?: {
- gfm?: boolean; // GitHub Flavored Markdown
- breaks?: boolean; // Convert line breaks to <br>
- linkify?: boolean; // Auto-link URLs
- typographer?: boolean; // Smart quotes and dashes
- highlight?: (code: string, lang: string) => string; // Code highlighting
- };
-
- // Git integration
- gitEnabled?: boolean; // Enable git operations
- gitAutoCommit?: boolean; // Auto-commit changes
- gitCommitMessage?: string; // Commit message template
- gitBranch?: string; // Target branch
- gitRemote?: string; // Remote repository
- gitAuthor?: {
- name: string;
- email: string;
- };
- gitIgnorePatterns?: string[]; // Additional .gitignore patterns
-
- // Performance
- cacheDirectory?: string; // Cache directory for parsed files
- cacheParsedFiles?: boolean; // Cache parsed frontmatter
- watchForChanges?: boolean; // Watch for external file changes
- rebuildIndexInterval?: number; // Index rebuild interval
-
- // Maintenance
- enableGarbageCollection?: boolean; // Remove orphaned files
- garbageCollectionInterval?: number; // GC interval in ms
- validateChecksums?: boolean; // Validate file integrity
-
- // Import/Export
- exportFormats?: string[]; // Supported export formats
- importFormats?: string[]; // Supported import formats
-
- // Templates
- itemTemplate?: string; // Template for new items
- categoryTemplates?: Record<string, string>; // Category-specific templates
- };
-}
-
-// Example Markdown configuration
-const markdownConfig: MemoryConfig = {
- backend: 'markdown',
- storage: {
- path: './memory-docs',
- options: {
- useNamespaceDirectories: true,
- useCategoryDirectories: true,
- useTimeBasedDirectories: true,
- fileNaming: 'slug',
- slugify: true,
- maxFilenameLength: 100,
- frontmatterFormat: 'yaml',
- contentFormat: 'markdown',
- gitEnabled: true,
- gitAutoCommit: true,
- gitCommitMessage: 'Memory update: {category}/{id}',
- gitBranch: 'main',
- cacheDirectory: './.cache',
- watchForChanges: true,
- enableGarbageCollection: true
- }
- }
-};
-```
-
-## Cache Configuration
-
-```typescript
-interface CacheConfig {
- enabled: boolean; // Enable caching
- maxSize: number; // Maximum cache size in bytes
- strategy: 'lru' | 'lfu' | 'fifo' | 'ttl' | 'adaptive';
-
- // TTL settings
- ttl?: number; // Default TTL in milliseconds
- maxTtl?: number; // Maximum TTL
- checkInterval?: number; // TTL check interval
-
- // Strategy-specific settings
- lru?: {
- maxAge?: number; // Maximum age for LRU items
- };
- lfu?: {
- windowSize?: number; // Frequency calculation window
- decayFactor?: number; // Frequency decay factor
- };
- adaptive?: {
- learningRate?: number; // Adaptation learning rate
- performanceThreshold?: number; // Performance threshold for strategy switching
- };
-
- // Performance settings
- preallocation?: number; // Pre-allocate cache slots
- compressionEnabled?: boolean; // Compress cached items
- compressionThreshold?: number; // Compression size threshold
-
- // Monitoring
- enableMetrics?: boolean; // Enable cache metrics
- metricsInterval?: number; // Metrics collection interval
- logEvictions?: boolean; // Log cache evictions
-}
-
-// Example cache configurations
-const performanceCache: CacheConfig = {
- enabled: true,
- maxSize: 500 * 1024 * 1024, // 500MB
- strategy: 'adaptive',
- ttl: 3600000, // 1 hour
- adaptive: {
- learningRate: 0.1,
- performanceThreshold: 100 // ms
- },
- compressionEnabled: true,
- compressionThreshold: 1024, // 1KB
- enableMetrics: true
-};
-
-const memoryConstrainedCache: CacheConfig = {
- enabled: true,
- maxSize: 50 * 1024 * 1024, // 50MB
- strategy: 'lfu',
- lfu: {
- windowSize: 1000,
- decayFactor: 0.95
- },
- compressionEnabled: true,
- enableMetrics: false
-};
-```
-
-## Indexing Configuration
-
-```typescript
-interface IndexingConfig {
- enabled: boolean; // Enable advanced indexing
-
- // Search capabilities
- vectorSearch?: VectorSearchConfig;
- fullTextSearch?: FullTextSearchConfig;
-
- // Index management
- rebuildInterval?: number; // Automatic rebuild interval
- incrementalUpdates?: boolean; // Use incremental index updates
- backgroundRebuild?: boolean; // Rebuild indexes in background
-
- // Performance
- indexDirectory?: string; // Directory for index files
- memoryLimit?: number; // Memory limit for indexing
- compressionEnabled?: boolean; // Compress index files
-
- // Custom indexes
- customIndexes?: CustomIndexConfig[];
-}
-
-interface VectorSearchConfig {
- enabled: boolean;
- dimensions: number; // Embedding dimensions
- algorithm: 'hnsw' | 'ivf' | 'brute-force';
-
- // HNSW parameters
- hnsw?: {
- m: number; // Number of connections
- efConstruction: number; // Construction parameter
- efSearch: number; // Search parameter
- maxM: number; // Maximum connections
- maxM0: number; // Maximum connections for layer 0
- };
-
- // IVF parameters
- ivf?: {
- nlist: number; // Number of clusters
- nprobe: number; // Number of clusters to search
- };
-
- // Embedding service
- embeddingService?: EmbeddingServiceConfig;
-
- // Similarity settings
- defaultThreshold: number; // Default similarity threshold
- similarityMetric: 'cosine' | 'euclidean' | 'dot-product';
-
- // Performance
- batchSize: number; // Embedding batch size
- concurrency: number; // Concurrent embedding requests
- cacheEmbeddings: boolean; // Cache generated embeddings
-}
-
-interface FullTextSearchConfig {
- enabled: boolean;
- language: string; // Language for stemming
-
- // Tokenization
- tokenizer: 'standard' | 'keyword' | 'pattern' | 'custom';
- stopWords: string[]; // Stop words to ignore
- stemming: boolean; // Enable stemming
-
- // Indexing
- fields: string[]; // Fields to index
- boost: Record<string, number>; // Field boost factors
-
- // Search options
- fuzzySearch: boolean; // Enable fuzzy matching
- fuzzyDistance: number; // Maximum edit distance
- phraseSlop: number; // Phrase search sloppiness
-
- // Performance
- maxClauseCount: number; // Maximum query clauses
- analyzeWildcard: boolean; // Analyze wildcard queries
-}
-
-interface EmbeddingServiceConfig {
- provider: 'openai' | 'huggingface' | 'local' | 'custom';
-
- // OpenAI configuration
- openai?: {
- apiKey: string;
- model: string; // e.g., 'text-embedding-ada-002'
- maxTokens: number;
- requestsPerMinute: number;
- };
-
- // Hugging Face configuration
- huggingface?: {
- apiKey?: string;
- model: string;
- endpoint?: string;
- };
-
- // Local service configuration
- local?: {
- endpoint: string;
- timeout: number;
- retries: number;
- };
-
- // Custom service
- custom?: {
- generateEmbedding: (text: string) => Promise<number[]>;
- };
-}
-
-// Example indexing configuration
-const advancedIndexing: IndexingConfig = {
- enabled: true,
- vectorSearch: {
- enabled: true,
- dimensions: 1536,
- algorithm: 'hnsw',
- hnsw: {
- m: 16,
- efConstruction: 200,
- efSearch: 100,
- maxM: 16,
- maxM0: 32
- },
- embeddingService: {
- provider: 'openai',
- openai: {
- apiKey: process.env.OPENAI_API_KEY!,
- model: 'text-embedding-ada-002',
- maxTokens: 8000,
- requestsPerMinute: 1000
- }
- },
- defaultThreshold: 0.7,
- similarityMetric: 'cosine',
- batchSize: 100,
- concurrency: 5,
- cacheEmbeddings: true
- },
- fullTextSearch: {
- enabled: true,
- language: 'english',
- tokenizer: 'standard',
- stopWords: ['the', 'a', 'an', 'and', 'or', 'but'],
- stemming: true,
- fields: ['content', 'tags'],
- boost: {
- content: 1.0,
- tags: 2.0
- },
- fuzzySearch: true,
- fuzzyDistance: 2
- },
- rebuildInterval: 3600000, // 1 hour
- incrementalUpdates: true,
- backgroundRebuild: true
-};
-```
-
-## Namespace Configuration
-
-```typescript
-interface NamespaceConfig {
- enabled: boolean; // Enable namespace isolation
- defaultNamespace: string; // Default namespace name
-
- // Access control
- permissions?: NamespacePermissions;
- enforcePermissions?: boolean; // Enforce permission checks
-
- // Quotas and limits
- quotas?: NamespaceQuotas;
- enforceQuotas?: boolean; // Enforce quota limits
-
- // Isolation settings
- strictIsolation?: boolean; // Prevent cross-namespace access
- allowGlobalSearch?: boolean; // Allow search across namespaces
- inheritPermissions?: boolean; // Inherit parent namespace permissions
-}
-
-interface NamespacePermissions {
- [namespace: string]: {
- read: string[]; // Agent IDs with read access
- write: string[]; // Agent IDs with write access
- admin: string[]; // Agent IDs with admin access
- public?: boolean; // Allow public read access
- inherit?: string; // Inherit from parent namespace
- };
-}
-
-interface NamespaceQuotas {
- [namespace: string]: {
- maxItems?: number; // Maximum number of items
- maxStorage?: number; // Maximum storage in bytes
- maxEmbeddings?: number; // Maximum vector embeddings
- dailyWrites?: number; // Daily write limit
- dailyReads?: number; // Daily read limit
- };
-}
-
-// Example namespace configuration
-const namespaceConfig: NamespaceConfig = {
- enabled: true,
- defaultNamespace: 'default',
- permissions: {
- 'public': {
- read: ['*'],
- write: ['admin'],
- admin: ['admin'],
- public: true
- },
- 'project-alpha': {
- read: ['alice', 'bob', 'charlie'],
- write: ['alice', 'bob'],
- admin: ['alice']
- },
- 'sensitive': {
- read: ['admin', 'security-team'],
- write: ['admin'],
- admin: ['admin']
- }
- },
- quotas: {
- 'project-alpha': {
- maxItems: 10000,
- maxStorage: 100 * 1024 * 1024, // 100MB
- dailyWrites: 1000
- },
- 'development': {
- maxItems: 1000,
- maxStorage: 10 * 1024 * 1024, // 10MB
- dailyWrites: 100
- }
- },
- enforcePermissions: true,
- enforceQuotas: true,
- strictIsolation: false,
- allowGlobalSearch: true
-};
-```
-
-## Security Configuration
-
-```typescript
-interface SecurityConfig {
- // Encryption at rest
- encryption?: {
- enabled: boolean;
- algorithm: 'aes-256-gcm' | 'aes-256-cbc' | 'chacha20-poly1305';
- keyDerivation: 'pbkdf2' | 'scrypt' | 'argon2';
- keyDerivationOptions?: {
- iterations?: number; // PBKDF2 iterations
- memory?: number; // Scrypt/Argon2 memory cost
- parallelism?: number; // Argon2 parallelism
- saltLength?: number; // Salt length in bytes
- };
- rotateKeys?: boolean; // Enable key rotation
- keyRotationInterval?: number; // Key rotation interval
- };
-
- // Data integrity
- checksums?: {
- enabled: boolean;
- algorithm: 'sha256' | 'sha512' | 'blake3';
- verifyOnRead: boolean; // Verify checksums on read
- repairCorruption: boolean; // Attempt to repair corruption
- };
-
- // Access control
- authentication?: {
- enabled: boolean;
- method: 'token' | 'certificate' | 'custom';
- tokenConfig?: {
- algorithm: 'HS256' | 'RS256' | 'ES256';
- secretOrKey: string | Buffer;
- expiresIn: string;
- };
- certificateConfig?: {
- ca: string; // CA certificate path
- cert: string; // Client certificate path
- key: string; // Client key path
- };
- };
-
- // Audit logging
- auditLog?: {
- enabled: boolean;
- level: 'minimal' | 'standard' | 'verbose';
- destination: 'file' | 'database' | 'syslog' | 'custom';
- logFile?: string;
- rotateSize?: number; // Log rotation size
- retentionDays?: number; // Log retention period
- includeData?: boolean; // Include operation data
- };
-
- // Rate limiting
- rateLimiting?: {
- enabled: boolean;
- globalLimit?: number; // Global operations per second
- perAgentLimit?: number; // Per-agent operations per second
- burstAllowance?: number; // Burst allowance
- windowSize?: number; // Rate limiting window
- };
-}
-
-// Example security configuration
-const highSecurityConfig: SecurityConfig = {
- encryption: {
- enabled: true,
- algorithm: 'aes-256-gcm',
- keyDerivation: 'argon2',
- keyDerivationOptions: {
- memory: 65536, // 64MB
- iterations: 3,
- parallelism: 1,
- saltLength: 32
- },
- rotateKeys: true,
- keyRotationInterval: 30 * 24 * 60 * 60 * 1000 // 30 days
- },
- checksums: {
- enabled: true,
- algorithm: 'blake3',
- verifyOnRead: true,
- repairCorruption: false
- },
- authentication: {
- enabled: true,
- method: 'certificate',
- certificateConfig: {
- ca: './certs/ca.pem',
- cert: './certs/client.pem',
- key: './certs/client.key'
- }
- },
- auditLog: {
- enabled: true,
- level: 'verbose',
- destination: 'file',
- logFile: './logs/audit.log',
- rotateSize: 100 * 1024 * 1024, // 100MB
- retentionDays: 90,
- includeData: false
- },
- rateLimiting: {
- enabled: true,
- globalLimit: 1000,
- perAgentLimit: 100,
- burstAllowance: 50,
- windowSize: 60000 // 1 minute
- }
-};
-```
-
-## Environment Variables
-
-Many configuration options can be set via environment variables:
-
-```bash
-# Backend configuration
-MEMORY_BACKEND=sqlite
-MEMORY_STORAGE_PATH=./data/memory.db
-
-# Cache configuration
-MEMORY_CACHE_ENABLED=true
-MEMORY_CACHE_SIZE=100MB
-MEMORY_CACHE_STRATEGY=lru
-
-# Security configuration
-MEMORY_ENCRYPTION_ENABLED=true
-MEMORY_ENCRYPTION_KEY=your-encryption-key
-
-# OpenAI configuration
-OPENAI_API_KEY=your-openai-api-key
-OPENAI_MODEL=text-embedding-ada-002
-
-# Git configuration
-GIT_AUTHOR_NAME="SPARC Memory Agent"
-GIT_AUTHOR_EMAIL="[email protected]"
-
-# Performance tuning
-MEMORY_MAX_CONNECTIONS=20
-MEMORY_QUERY_TIMEOUT=30000
-MEMORY_CACHE_TTL=3600000
-```
-
-## Configuration Validation
-
-The system includes comprehensive configuration validation:
-
-```typescript
-import { validateConfig } from '@sparc/memory-bank';
-
-try {
- const config = {
- backend: 'sqlite',
- storage: {
- path: './memory.db',
- options: {
- maxConnections: -1 // Invalid value
- }
- }
- };
-
- const validatedConfig = validateConfig(config);
-} catch (error) {
- console.error('Configuration validation failed:', error.message);
- // Error: maxConnections must be a positive integer
-}
-```
-
-## Configuration Profiles
-
-Pre-defined configuration profiles for common use cases:
-
-```typescript
-import {
- createDevelopmentConfig,
- createProductionConfig,
- createHighPerformanceConfig,
- createHighSecurityConfig
-} from '@sparc/memory-bank/profiles';
-
-// Development profile
-const devConfig = createDevelopmentConfig({
- storagePath: './dev-memory.db'
-});
-
-// Production profile
-const prodConfig = createProductionConfig({
- storagePath: '/var/lib/memory/prod.db',
- encryptionKey: process.env.ENCRYPTION_KEY
-});
-
-// High-performance profile
-const perfConfig = createHighPerformanceConfig({
- storagePath: './perf-memory.db',
- cacheSize: '1GB',
- maxConnections: 50
-});
-
-// High-security profile
-const secureConfig = createHighSecurityConfig({
- storagePath: './secure-memory.db',
- encryptionKey: process.env.ENCRYPTION_KEY,
- auditLogPath: './audit.log'
-});
-```
\ No newline at end of file
diff --git a/archive/legacy-memory-system/docs/deployment.md b/archive/legacy-memory-system/docs/deployment.md
deleted file mode 100644
index 1f70411fad..0000000000
--- a/archive/legacy-memory-system/docs/deployment.md
+++ /dev/null
@@ -1,782 +0,0 @@
-# Deployment Guide
-
-This guide covers deploying SPARC Memory Bank in various environments, from development to large-scale production.
-
-## Quick Start Deployment
-
-### Local Development
-
-```bash
-# Clone the repository
-git clone https://github.com/sparc/memory-bank.git
-cd memory-bank
-
-# Install dependencies
-npm install
-
-# Start with default configuration
-npm run dev
-```
-
-### Docker Deployment
-
-```dockerfile
-# Dockerfile
-FROM node:18-alpine
-
-WORKDIR /app
-
-# Install dependencies
-COPY package*.json ./
-RUN npm ci --only=production
-
-# Copy source code
-COPY . .
-
-# Create data directory
-RUN mkdir -p /app/data
-
-# Expose port
-EXPOSE 8080
-
-# Health check
-HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
- CMD curl -f http://localhost:8080/health || exit 1
-
-# Start the application
-CMD ["npm", "start"]
-```
-
-```yaml
-# docker-compose.yml
-version: '3.8'
-services:
- memory-bank:
- build: .
- ports:
- - "8080:8080"
- volumes:
- - ./data:/app/data
- - ./config:/app/config
- environment:
- - NODE_ENV=production
- - MEMORY_BACKEND=sqlite
- - MEMORY_STORAGE_PATH=/app/data/memory.db
- - MEMORY_CACHE_SIZE=500MB
- restart: unless-stopped
- healthcheck:
- test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
- interval: 30s
- timeout: 10s
- retries: 3
-```
-
-## Production Deployment
-
-### System Requirements
-
-#### Minimum Requirements
-- **CPU**: 2 cores (2.0 GHz)
-- **RAM**: 4 GB
-- **Storage**: 20 GB SSD
-- **Network**: 100 Mbps
-
-#### Recommended Requirements
-- **CPU**: 4+ cores (2.5+ GHz)
-- **RAM**: 8+ GB
-- **Storage**: 100+ GB NVMe SSD
-- **Network**: 1+ Gbps
-
-#### High-Performance Requirements
-- **CPU**: 8+ cores (3.0+ GHz)
-- **RAM**: 32+ GB
-- **Storage**: 500+ GB NVMe SSD with high IOPS
-- **Network**: 10+ Gbps
-
-### Database Optimization
-
-#### SQLite Production Configuration
-
-```typescript
-const productionConfig = {
- backend: 'sqlite',
- storage: {
- path: '/var/lib/memory/production.db',
- options: {
- // Performance settings
- journalMode: 'WAL',
- synchronous: 'NORMAL',
- cacheSize: 20000, // 20k pages ≈ 80MB
- mmapSize: 1073741824, // 1GB memory mapping
- tempStore: 'MEMORY',
-
- // Connection management
- maxConnections: 50,
- busyTimeout: 60000,
- idleTimeout: 300000,
-
- // WAL optimization
- enableWalCheckpoint: true,
- walCheckpointInterval: 300000, // 5 minutes
- walCheckpointPages: 10000,
-
- // Maintenance
- pragmaOptimize: true,
- optimizeInterval: 3600000, // 1 hour
- autoVacuum: 'INCREMENTAL',
-
- // Security
- foreignKeys: true,
- secureDelete: true
- }
- },
- cache: {
- enabled: true,
- maxSize: 2 * 1024 * 1024 * 1024, // 2GB
- strategy: 'adaptive',
- ttl: 3600000, // 1 hour
- compressionEnabled: true
- }
-};
-```
-
-#### PostgreSQL Integration (Custom Backend)
-
-```typescript
-// Custom PostgreSQL backend for enterprise deployment
-const postgresConfig = {
- backend: new PostgreSQLBackend({
- host: 'postgres.internal',
- port: 5432,
- database: 'memory_bank',
- username: process.env.DB_USERNAME,
- password: process.env.DB_PASSWORD,
- ssl: {
- rejectUnauthorized: false,
- ca: fs.readFileSync('./certs/ca.pem').toString(),
- cert: fs.readFileSync('./certs/client.pem').toString(),
- key: fs.readFileSync('./certs/client.key').toString()
- },
- pool: {
- min: 10,
- max: 100,
- acquireTimeoutMillis: 60000,
- createTimeoutMillis: 30000,
- destroyTimeoutMillis: 5000,
- idleTimeoutMillis: 30000
- }
- })
-};
-```
-
-### Kubernetes Deployment
-
-```yaml
-# k8s/namespace.yaml
-apiVersion: v1
-kind: Namespace
-metadata:
- name: memory-bank
- labels:
- name: memory-bank
-
----
-# k8s/configmap.yaml
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: memory-config
- namespace: memory-bank
-data:
- config.json: |
- {
- "backend": "sqlite",
- "storage": {
- "path": "/data/memory.db",
- "options": {
- "journalMode": "WAL",
- "synchronous": "NORMAL",
- "cacheSize": 10000,
- "maxConnections": 20
- }
- },
- "cache": {
- "enabled": true,
- "maxSize": 1073741824,
- "strategy": "lru"
- }
- }
-
----
-# k8s/pvc.yaml
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- name: memory-storage
- namespace: memory-bank
-spec:
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 100Gi
- storageClassName: fast-ssd
-
----
-# k8s/deployment.yaml
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: memory-bank
- namespace: memory-bank
- labels:
- app: memory-bank
-spec:
- replicas: 3
- selector:
- matchLabels:
- app: memory-bank
- template:
- metadata:
- labels:
- app: memory-bank
- spec:
- containers:
- - name: memory-bank
- image: sparc/memory-bank:latest
- ports:
- - containerPort: 8080
- env:
- - name: NODE_ENV
- value: "production"
- - name: CONFIG_PATH
- value: "/config/config.json"
- - name: OPENAI_API_KEY
- valueFrom:
- secretKeyRef:
- name: memory-secrets
- key: openai-api-key
- volumeMounts:
- - name: config-volume
- mountPath: /config
- - name: data-volume
- mountPath: /data
- resources:
- requests:
- memory: "2Gi"
- cpu: "1000m"
- limits:
- memory: "4Gi"
- cpu: "2000m"
- livenessProbe:
- httpGet:
- path: /health
- port: 8080
- initialDelaySeconds: 30
- periodSeconds: 10
- readinessProbe:
- httpGet:
- path: /ready
- port: 8080
- initialDelaySeconds: 5
- periodSeconds: 5
- volumes:
- - name: config-volume
- configMap:
- name: memory-config
- - name: data-volume
- persistentVolumeClaim:
- claimName: memory-storage
-
----
-# k8s/service.yaml
-apiVersion: v1
-kind: Service
-metadata:
- name: memory-bank-service
- namespace: memory-bank
-spec:
- selector:
- app: memory-bank
- ports:
- - protocol: TCP
- port: 80
- targetPort: 8080
- type: ClusterIP
-
----
-# k8s/ingress.yaml
-apiVersion: networking.k8s.io/v1
-kind: Ingress
-metadata:
- name: memory-bank-ingress
- namespace: memory-bank
- annotations:
- kubernetes.io/ingress.class: nginx
- cert-manager.io/cluster-issuer: letsencrypt-prod
- nginx.ingress.kubernetes.io/ssl-redirect: "true"
-spec:
- tls:
- - hosts:
- - memory.example.com
- secretName: memory-bank-tls
- rules:
- - host: memory.example.com
- http:
- paths:
- - path: /
- pathType: Prefix
- backend:
- service:
- name: memory-bank-service
- port:
- number: 80
-```
-
-### Load Balancing and High Availability
-
-#### Multi-Instance Deployment
-
-```yaml
-# docker-compose-ha.yml
-version: '3.8'
-services:
- memory-bank-1:
- build: .
- environment:
- - INSTANCE_ID=1
- - MEMORY_STORAGE_PATH=/data/memory-1.db
- volumes:
- - ./data:/data
- networks:
- - memory-network
-
- memory-bank-2:
- build: .
- environment:
- - INSTANCE_ID=2
- - MEMORY_STORAGE_PATH=/data/memory-2.db
- volumes:
- - ./data:/data
- networks:
- - memory-network
-
- memory-bank-3:
- build: .
- environment:
- - INSTANCE_ID=3
- - MEMORY_STORAGE_PATH=/data/memory-3.db
- volumes:
- - ./data:/data
- networks:
- - memory-network
-
- nginx:
- image: nginx:alpine
- ports:
- - "80:80"
- - "443:443"
- volumes:
- - ./nginx.conf:/etc/nginx/nginx.conf
- - ./ssl:/etc/ssl
- depends_on:
- - memory-bank-1
- - memory-bank-2
- - memory-bank-3
- networks:
- - memory-network
-
-networks:
- memory-network:
- driver: bridge
-```
-
-#### NGINX Load Balancer Configuration
-
-```nginx
-# nginx.conf
-events {
- worker_connections 1024;
-}
-
-http {
- upstream memory_backend {
- least_conn;
- server memory-bank-1:8080 max_fails=3 fail_timeout=30s;
- server memory-bank-2:8080 max_fails=3 fail_timeout=30s;
- server memory-bank-3:8080 max_fails=3 fail_timeout=30s;
- }
-
- # Health check endpoint
- upstream memory_health {
- server memory-bank-1:8080;
- server memory-bank-2:8080;
- server memory-bank-3:8080;
- }
-
- # SSL configuration
- ssl_certificate /etc/ssl/memory.crt;
- ssl_certificate_key /etc/ssl/memory.key;
- ssl_protocols TLSv1.2 TLSv1.3;
- ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384;
- ssl_prefer_server_ciphers off;
-
- # Rate limiting
- limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;
-
- server {
- listen 80;
- server_name memory.example.com;
- return 301 https://$server_name$request_uri;
- }
-
- server {
- listen 443 ssl http2;
- server_name memory.example.com;
-
- # Rate limiting
- limit_req zone=api burst=20 nodelay;
-
- # Proxy settings
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
-
- # Health check
- location /health {
- proxy_pass http://memory_health;
- access_log off;
- }
-
- # API endpoints
- location / {
- proxy_pass http://memory_backend;
- proxy_timeout 60s;
- proxy_read_timeout 60s;
- proxy_connect_timeout 60s;
-
- # WebSocket support
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- }
-
- # Security headers
- add_header X-Frame-Options DENY;
- add_header X-Content-Type-Options nosniff;
- add_header X-XSS-Protection "1; mode=block";
- add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
- }
-}
-```
-
-### Monitoring and Observability
-
-#### Prometheus Metrics
-
-```yaml
-# monitoring/prometheus.yml
-global:
- scrape_interval: 15s
- evaluation_interval: 15s
-
-scrape_configs:
- - job_name: 'memory-bank'
- static_configs:
- - targets: ['memory-bank-1:8080', 'memory-bank-2:8080', 'memory-bank-3:8080']
- metrics_path: /metrics
- scrape_interval: 10s
-
- - job_name: 'node-exporter'
- static_configs:
- - targets: ['node-exporter:9100']
-```
-
-#### Grafana Dashboard
-
-```json
-{
- "dashboard": {
- "title": "SPARC Memory Bank Metrics",
- "panels": [
- {
- "title": "Request Rate",
- "type": "graph",
- "targets": [
- {
- "expr": "rate(memory_requests_total[5m])",
- "legendFormat": "{{instance}}"
- }
- ]
- },
- {
- "title": "Cache Hit Rate",
- "type": "stat",
- "targets": [
- {
- "expr": "memory_cache_hit_rate",
- "legendFormat": "Hit Rate"
- }
- ]
- },
- {
- "title": "Storage Size",
- "type": "graph",
- "targets": [
- {
- "expr": "memory_storage_size_bytes",
- "legendFormat": "{{instance}}"
- }
- ]
- }
- ]
- }
-}
-```
-
-### Backup and Recovery
-
-#### Automated Backup Script
-
-```bash
-#!/bin/bash
-# backup.sh
-
-set -euo pipefail
-
-# Configuration
-BACKUP_DIR="/var/backups/memory-bank"
-REPOSITORY="s3:backup-bucket/memory-bank"
-RETENTION_DAYS=30
-DATA_DIR="/var/lib/memory"
-
-# Create backup directory
-mkdir -p "$BACKUP_DIR"
-
-# Generate timestamp
-TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
-BACKUP_NAME="memory-bank_$TIMESTAMP"
-
-# SQLite backup (if using SQLite)
-if [ -f "$DATA_DIR/memory.db" ]; then
- echo "Creating SQLite backup..."
- sqlite3 "$DATA_DIR/memory.db" ".backup $BACKUP_DIR/$BACKUP_NAME.db"
-fi
-
-# Compress backup
-echo "Compressing backup..."
-tar -czf "$BACKUP_DIR/$BACKUP_NAME.tar.gz" -C "$DATA_DIR" .
-
-# Upload to remote storage (using restic)
-echo "Uploading backup..."
-restic -r "$REPOSITORY" backup "$BACKUP_DIR/$BACKUP_NAME.tar.gz" \
- --tag "memory-bank" \
- --tag "$TIMESTAMP"
-
-# Cleanup old local backups
-find "$BACKUP_DIR" -name "*.tar.gz" -mtime +7 -delete
-
-# Cleanup old remote backups
-restic -r "$REPOSITORY" forget \
- --keep-daily 7 \
- --keep-weekly 4 \
- --keep-monthly 6 \
- --tag "memory-bank" \
- --prune
-
-echo "Backup completed: $BACKUP_NAME"
-```
-
-#### Recovery Procedure
-
-```bash
-#!/bin/bash
-# restore.sh
-
-set -euo pipefail
-
-BACKUP_ID="$1"
-REPOSITORY="s3:backup-bucket/memory-bank"
-DATA_DIR="/var/lib/memory"
-TEMP_DIR="/tmp/memory-restore"
-
-if [ -z "$BACKUP_ID" ]; then
- echo "Usage: $0 <backup_id>"
- echo "Available backups:"
- restic -r "$REPOSITORY" snapshots --tag "memory-bank"
- exit 1
-fi
-
-# Stop the service
-sudo systemctl stop memory-bank
-
-# Create temporary directory
-mkdir -p "$TEMP_DIR"
-
-# Restore backup
-echo "Restoring backup $BACKUP_ID..."
-restic -r "$REPOSITORY" restore "$BACKUP_ID" --target "$TEMP_DIR"
-
-# Extract backup
-echo "Extracting backup..."
-tar -xzf "$TEMP_DIR"/*.tar.gz -C "$TEMP_DIR"
-
-# Backup current data
-if [ -d "$DATA_DIR" ]; then
- echo "Backing up current data..."
- mv "$DATA_DIR" "${DATA_DIR}.backup.$(date +%Y%m%d_%H%M%S)"
-fi
-
-# Restore data
-echo "Restoring data..."
-mv "$TEMP_DIR" "$DATA_DIR"
-
-# Fix permissions
-chown -R memory-bank:memory-bank "$DATA_DIR"
-chmod -R 750 "$DATA_DIR"
-
-# Start the service
-sudo systemctl start memory-bank
-
-# Verify restoration
-echo "Verifying restoration..."
-sudo systemctl status memory-bank
-
-echo "Restoration completed successfully"
-```
-
-### Security Considerations
-
-#### SSL/TLS Configuration
-
-```bash
-# Generate SSL certificates
-openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \
- -subj "/C=US/ST=CA/L=SF/O=SPARC/CN=memory.example.com" \
- -keyout memory.key \
- -out memory.crt
-
-# Set proper permissions
-chmod 600 memory.key
-chmod 644 memory.crt
-```
-
-#### Firewall Configuration
-
-```bash
-# UFW firewall rules
-sudo ufw default deny incoming
-sudo ufw default allow outgoing
-sudo ufw allow ssh
-sudo ufw allow 80/tcp
-sudo ufw allow 443/tcp
-sudo ufw allow from 10.0.0.0/8 to any port 8080 # Internal API access
-sudo ufw enable
-```
-
-#### Environment Secrets
-
-```bash
-# Use HashiCorp Vault for secrets management
-vault kv put secret/memory-bank \
- openai_api_key="sk-..." \
- encryption_key="base64_encoded_key" \
- db_password="secure_password"
-
-# Retrieve secrets in deployment
-export OPENAI_API_KEY=$(vault kv get -field=openai_api_key secret/memory-bank)
-export ENCRYPTION_KEY=$(vault kv get -field=encryption_key secret/memory-bank)
-```
-
-### Performance Tuning
-
-#### Operating System Optimization
-
-```bash
-# /etc/sysctl.conf
-# Network optimization
-net.core.rmem_max = 134217728
-net.core.wmem_max = 134217728
-net.ipv4.tcp_rmem = 4096 65536 134217728
-net.ipv4.tcp_wmem = 4096 65536 134217728
-net.ipv4.tcp_congestion_control = bbr
-
-# File system optimization
-fs.file-max = 2097152
-fs.inotify.max_user_watches = 524288
-
-# Memory optimization
-vm.swappiness = 10
-vm.dirty_ratio = 15
-vm.dirty_background_ratio = 5
-
-# Apply changes
-sudo sysctl -p
-```
-
-#### Storage Optimization
-
-```bash
-# Mount options for database storage
-# /etc/fstab
-/dev/nvme0n1 /var/lib/memory ext4 noatime,data=writeback,barrier=0 0 2
-
-# Set I/O scheduler for NVMe
-echo none > /sys/block/nvme0n1/queue/scheduler
-```
-
-### Troubleshooting
-
-#### Common Issues
-
-```bash
-# Check service status
-sudo systemctl status memory-bank
-
-# View logs
-sudo journalctl -u memory-bank -f
-
-# Check disk space
-df -h /var/lib/memory
-
-# Check memory usage
-free -h
-
-# Check database integrity (SQLite)
-sqlite3 /var/lib/memory/memory.db "PRAGMA integrity_check;"
-
-# Check open file descriptors
-lsof -p $(pgrep memory-bank)
-
-# Monitor real-time performance
-top -p $(pgrep memory-bank)
-iotop -p $(pgrep memory-bank)
-```
-
-#### Performance Debugging
-
-```typescript
-// Enable debug logging
-const memory = new MemoryManager({
- // ... other config
- system: {
- logging: {
- level: 'debug',
- enableQueryProfiling: true,
- enableSlowQueryLog: true,
- slowQueryThreshold: 1000 // ms
- }
- }
-});
-
-// Monitor performance metrics
-setInterval(async () => {
- const stats = await memory.getStatistics();
- console.log('Performance Stats:', {
- averageQueryTime: stats.performance.averageQueryTime,
- cacheHitRate: stats.cacheStats.hitRate,
- totalItems: stats.totalItems
- });
-}, 60000); // Every minute
-```
\ No newline at end of file
diff --git a/archive/legacy-memory-system/docs/performance.md b/archive/legacy-memory-system/docs/performance.md
deleted file mode 100644
index baec220f1c..0000000000
--- a/archive/legacy-memory-system/docs/performance.md
+++ /dev/null
@@ -1,1018 +0,0 @@
-# Performance Guide
-
-This guide covers performance optimization, monitoring, and troubleshooting for the SPARC Memory Bank system.
-
-## Performance Characteristics
-
-### Backend Performance Comparison
-
-| Metric | SQLite | Markdown |
-|--------|--------|----------|
-| **Throughput** |
-| Store operations/sec | 10,000+ | 1,000+ |
-| Read operations/sec | 50,000+ | 5,000+ |
-| Query operations/sec | 25,000+ | 1,000+ |
-| **Latency (ms)** |
-| Single store | 0.1-1 | 1-5 |
-| Single read | 0.05-0.5 | 0.5-2 |
-| Simple query | 1-10 | 10-50 |
-| Complex query | 5-50 | 50-500 |
-| Vector search | 10-100 | 100-1000 |
-| **Scalability** |
-| Max items | 281 TB | Filesystem limit |
-| Memory usage | Low | Medium |
-| Storage overhead | 10-20% | 50-100% |
-
-### Performance by Data Size
-
-#### SQLite Performance
-
-```typescript
-// Performance test results for SQLite backend
-const performanceTests = {
- small: {
- itemCount: 1000,
- avgItemSize: '1KB',
- storeLatency: '0.1ms',
- queryLatency: '0.5ms',
- memoryUsage: '50MB'
- },
- medium: {
- itemCount: 100000,
- avgItemSize: '5KB',
- storeLatency: '0.5ms',
- queryLatency: '2ms',
- memoryUsage: '200MB'
- },
- large: {
- itemCount: 1000000,
- avgItemSize: '10KB',
- storeLatency: '1ms',
- queryLatency: '10ms',
- memoryUsage: '1GB'
- },
- enterprise: {
- itemCount: 10000000,
- avgItemSize: '20KB',
- storeLatency: '2ms',
- queryLatency: '25ms',
- memoryUsage: '4GB'
- }
-};
-```
-
-## Optimization Strategies
-
-### SQLite Optimization
-
-#### Configuration Tuning
-
-```typescript
-const highPerformanceConfig = {
- backend: 'sqlite',
- storage: {
- path: './performance.db',
- options: {
- // Memory and I/O optimization
- journalMode: 'WAL', // Faster concurrent access
- synchronous: 'NORMAL', // Balance safety and speed
- cacheSize: 20000, // 20k pages ≈ 80MB cache
- mmapSize: 2147483648, // 2GB memory mapping
- tempStore: 'MEMORY', // Store temp data in memory
-
- // Connection optimization
- maxConnections: 50, // Higher concurrency
- busyTimeout: 60000, // Longer wait for locks
- idleTimeout: 300000, // Keep connections longer
-
- // WAL optimization
- enableWalCheckpoint: true,
- walCheckpointInterval: 60000, // More frequent checkpoints
- walCheckpointPages: 5000, // Smaller checkpoint batches
-
- // Query optimization
- pragmaOptimize: true,
- optimizeInterval: 1800000, // 30 minutes
-
- // Performance monitoring
- logQueries: false, // Disable in production
- queryTimeout: 30000, // 30 second timeout
- explainQueryPlan: false // Disable unless debugging
- }
- },
- cache: {
- enabled: true,
- maxSize: 1073741824, // 1GB application cache
- strategy: 'adaptive', // Adapts to access patterns
- compressionEnabled: true, // Compress large items
- compressionThreshold: 1024 // Compress items > 1KB
- }
-};
-```
-
-#### Index Optimization
-
-```typescript
-// Custom indexes for specific query patterns
-const indexOptimizedConfig = {
- // ... base config
- indexing: {
- enabled: true,
- customIndexes: [
- {
- name: 'idx_category_namespace_updated',
- fields: ['category', 'namespace', 'updated'],
- type: 'btree'
- },
- {
- name: 'idx_metadata_status',
- fields: ['json_extract(metadata, "$.status")'],
- type: 'btree'
- },
- {
- name: 'idx_metadata_priority_created',
- fields: ['json_extract(metadata, "$.priority")', 'created'],
- type: 'btree'
- },
- {
- name: 'idx_tags_gin',
- fields: ['tags'],
- type: 'gin' // For array/JSON operations
- }
- ],
- vectorSearch: {
- enabled: true,
- algorithm: 'hnsw',
- hnsw: {
- m: 32, // More connections for better recall
- efConstruction: 400, // Higher quality index
- efSearch: 100, // Faster search
- maxM: 32,
- maxM0: 64
- }
- },
- fullTextSearch: {
- enabled: true,
- tokenizer: 'unicode61',
- stemming: true,
- fuzzySearch: true,
- fuzzyDistance: 1 // Lower distance for speed
- }
- }
-};
-```
-
-### Markdown Optimization
-
-#### Directory Structure Optimization
-
-```typescript
-const optimizedMarkdownConfig = {
- backend: 'markdown',
- storage: {
- path: './optimized-memory',
- options: {
- // Optimize directory structure
- useNamespaceDirectories: true,
- useCategoryDirectories: true,
- useTimeBasedDirectories: true,
- maxDirectoryDepth: 4, // Prevent deep nesting
-
- // File optimization
- fileNaming: 'timestamp', // Faster than slug generation
- maxFilenameLength: 50, // Shorter filenames
-
- // Content optimization
- frontmatterFormat: 'yaml', // Faster parsing than JSON
- contentFormat: 'markdown',
- includeTableOfContents: false, // Skip TOC generation
-
- // Caching optimization
- cacheDirectory: './.cache',
- cacheParsedFiles: true, // Cache parsed frontmatter
- watchForChanges: false, // Disable if no external edits
-
- // Index optimization
- rebuildIndexInterval: 300000, // 5 minutes
- incrementalUpdates: true, // Only update changed files
-
- // Git optimization
- gitEnabled: true,
- gitAutoCommit: false, // Manual commits for batching
-
- // Cleanup optimization
- enableGarbageCollection: true,
- garbageCollectionInterval: 86400000 // Daily
- }
- },
- cache: {
- enabled: true,
- maxSize: 268435456, // 256MB cache
- strategy: 'lru', // Simple and effective for files
- ttl: 1800000 // 30 minutes
- }
-};
-```
-
-### Cache Optimization
-
-#### Strategy Selection
-
-```typescript
-// Different cache strategies for different workloads
-const cacheConfigurations = {
- // Read-heavy workload
- readHeavy: {
- enabled: true,
- maxSize: 2147483648, // 2GB
- strategy: 'lru', // Least Recently Used
- ttl: 3600000, // 1 hour
- compressionEnabled: true,
- compressionThreshold: 512
- },
-
- // Write-heavy workload
- writeHeavy: {
- enabled: true,
- maxSize: 536870912, // 512MB (smaller cache)
- strategy: 'lfu', // Least Frequently Used
- ttl: 1800000, // 30 minutes (shorter TTL)
- compressionEnabled: false, // Faster writes
- lfu: {
- windowSize: 1000,
- decayFactor: 0.9
- }
- },
-
- // Mixed workload
- balanced: {
- enabled: true,
- maxSize: 1073741824, // 1GB
- strategy: 'adaptive', // Adapts to patterns
- ttl: 2700000, // 45 minutes
- compressionEnabled: true,
- adaptive: {
- learningRate: 0.1,
- performanceThreshold: 50 // ms
- }
- },
-
- // Memory-constrained environment
- lowMemory: {
- enabled: true,
- maxSize: 67108864, // 64MB
- strategy: 'fifo', // Simple and memory-efficient
- ttl: 900000, // 15 minutes
- compressionEnabled: true,
- compressionThreshold: 256 // Aggressive compression
- }
-};
-```
-
-#### Cache Warming
-
-```typescript
-// Pre-populate cache with frequently accessed data
-async function warmCache(memory: MemoryManager): Promise<void> {
- console.log('Warming cache...');
-
- // Load frequently accessed categories
- const hotCategories = ['task', 'implementation', 'research'];
-
- for (const category of hotCategories) {
- const items = await memory.query({
- category,
- limit: 100,
- sortBy: 'updated',
- sortOrder: 'desc'
- });
-
- console.log(`Loaded ${items.length} ${category} items`);
- }
-
- // Load recent items
- const recentItems = await memory.query({
- dateRange: {
- start: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000), // Last week
- field: 'updated'
- },
- limit: 500
- });
-
- console.log(`Cache warmed with ${recentItems.length} recent items`);
-}
-```
-
-## Performance Monitoring
-
-### Real-time Metrics
-
-```typescript
-class PerformanceMonitor {
- private metrics: Map<string, PerformanceMetric> = new Map();
-
- constructor(private memory: MemoryManager) {
- this.startMonitoring();
- }
-
- private startMonitoring(): void {
- // Collect metrics every 30 seconds
- setInterval(async () => {
- await this.collectMetrics();
- }, 30000);
- }
-
- private async collectMetrics(): Promise<void> {
- const stats = await this.memory.getStatistics();
-
- const metric: PerformanceMetric = {
- timestamp: new Date(),
- operations: {
- totalOperations: stats.operations.total,
- operationsPerSecond: this.calculateOPS(stats),
- averageLatency: stats.performance.averageQueryTime,
- p95Latency: stats.performance.p95QueryTime,
- errorRate: stats.operations.errors / stats.operations.total
- },
- cache: {
- hitRate: stats.cacheStats.hitRate,
- memoryUsage: stats.cacheStats.memoryUsage,
- evictions: stats.cacheStats.evictions
- },
- storage: {
- totalItems: stats.totalItems,
- storageSize: stats.storageSize,
- indexSize: stats.indexSize
- },
- memory: {
- heapUsed: process.memoryUsage().heapUsed,
- heapTotal: process.memoryUsage().heapTotal,
- external: process.memoryUsage().external
- }
- };
-
- this.metrics.set(metric.timestamp.toISOString(), metric);
-
- // Alert on performance issues
- this.checkAlerts(metric);
- }
-
- private checkAlerts(metric: PerformanceMetric): void {
- if (metric.operations.averageLatency > 100) {
- console.warn(`High latency detected: ${metric.operations.averageLatency}ms`);
- }
-
- if (metric.cache.hitRate < 0.8) {
- console.warn(`Low cache hit rate: ${metric.cache.hitRate.toFixed(2)}`);
- }
-
- if (metric.operations.errorRate > 0.01) {
- console.error(`High error rate: ${(metric.operations.errorRate * 100).toFixed(2)}%`);
- }
- }
-
- public getMetrics(since?: Date): PerformanceMetric[] {
- const cutoff = since || new Date(Date.now() - 60 * 60 * 1000); // Last hour
- return Array.from(this.metrics.values())
- .filter(m => m.timestamp >= cutoff)
- .sort((a, b) => a.timestamp.getTime() - b.timestamp.getTime());
- }
-}
-
-interface PerformanceMetric {
- timestamp: Date;
- operations: {
- totalOperations: number;
- operationsPerSecond: number;
- averageLatency: number;
- p95Latency: number;
- errorRate: number;
- };
- cache: {
- hitRate: number;
- memoryUsage: number;
- evictions: number;
- };
- storage: {
- totalItems: number;
- storageSize: number;
- indexSize: number;
- };
- memory: {
- heapUsed: number;
- heapTotal: number;
- external: number;
- };
-}
-```
-
-### Performance Profiling
-
-```typescript
-// Enable detailed profiling for performance analysis
-const profilingConfig = {
- backend: 'sqlite',
- storage: {
- path: './profiling.db',
- options: {
- logQueries: true,
- explainQueryPlan: true,
- queryTimeout: 10000
- }
- },
- system: {
- logging: {
- level: 'debug',
- enableQueryProfiling: true,
- enableSlowQueryLog: true,
- slowQueryThreshold: 50, // Log queries > 50ms
- enableMemoryProfiling: true
- }
- }
-};
-
-// Custom profiling wrapper
-class ProfiledMemoryManager extends MemoryManager {
- async store(data: Partial<MemoryItem>): Promise<MemoryItem> {
- const startTime = performance.now();
- try {
- const result = await super.store(data);
- const duration = performance.now() - startTime;
-
- if (duration > 10) { // Log slow operations
- console.log(`Slow store operation: ${duration.toFixed(2)}ms`);
- }
-
- return result;
- } catch (error) {
- const duration = performance.now() - startTime;
- console.error(`Store operation failed after ${duration.toFixed(2)}ms:`, error);
- throw error;
- }
- }
-
- async query(query: MemoryQuery): Promise<MemoryItem[]> {
- const startTime = performance.now();
- const queryStr = JSON.stringify(query);
-
- try {
- const result = await super.query(query);
- const duration = performance.now() - startTime;
-
- console.log(`Query completed: ${duration.toFixed(2)}ms, ${result.length} results`);
- if (duration > 100) {
- console.warn(`Slow query detected: ${queryStr}`);
- }
-
- return result;
- } catch (error) {
- const duration = performance.now() - startTime;
- console.error(`Query failed after ${duration.toFixed(2)}ms: ${queryStr}`, error);
- throw error;
- }
- }
-}
-```
-
-## Load Testing
-
-### Benchmark Scripts
-
-```typescript
-// Performance benchmark suite
-class MemoryBenchmark {
- constructor(private memory: MemoryManager) {}
-
- async runBenchmarks(): Promise<BenchmarkResults> {
- console.log('Starting performance benchmarks...');
-
- const results: BenchmarkResults = {
- store: await this.benchmarkStore(),
- retrieve: await this.benchmarkRetrieve(),
- query: await this.benchmarkQuery(),
- vectorSearch: await this.benchmarkVectorSearch(),
- batch: await this.benchmarkBatch()
- };
-
- this.printResults(results);
- return results;
- }
-
- private async benchmarkStore(): Promise<OperationBenchmark> {
- const iterations = 1000;
- const startTime = performance.now();
- const errors: Error[] = [];
-
- for (let i = 0; i < iterations; i++) {
- try {
- await this.memory.store({
- category: 'benchmark',
- content: `Benchmark item ${i}`,
- tags: ['benchmark', 'test'],
- metadata: { iteration: i }
- });
- } catch (error) {
- errors.push(error as Error);
- }
- }
-
- const duration = performance.now() - startTime;
-
- return {
- operation: 'store',
- iterations,
- duration,
- operationsPerSecond: iterations / (duration / 1000),
- averageLatency: duration / iterations,
- errors: errors.length,
- errorRate: errors.length / iterations
- };
- }
-
- private async benchmarkRetrieve(): Promise<OperationBenchmark> {
- // First, create items to retrieve
- const items: MemoryItem[] = [];
- for (let i = 0; i < 100; i++) {
- const item = await this.memory.store({
- category: 'retrieve-test',
- content: `Retrieve test item ${i}`,
- tags: ['retrieve', 'test']
- });
- items.push(item);
- }
-
- const iterations = 1000;
- const startTime = performance.now();
- const errors: Error[] = [];
-
- for (let i = 0; i < iterations; i++) {
- try {
- const randomItem = items[Math.floor(Math.random() * items.length)];
- await this.memory.retrieve(randomItem.id);
- } catch (error) {
- errors.push(error as Error);
- }
- }
-
- const duration = performance.now() - startTime;
-
- return {
- operation: 'retrieve',
- iterations,
- duration,
- operationsPerSecond: iterations / (duration / 1000),
- averageLatency: duration / iterations,
- errors: errors.length,
- errorRate: errors.length / iterations
- };
- }
-
- private async benchmarkQuery(): Promise<OperationBenchmark> {
- const iterations = 100;
- const startTime = performance.now();
- const errors: Error[] = [];
-
- const queries = [
- { category: 'benchmark' },
- { tags: ['test'] },
- { dateRange: { start: new Date(Date.now() - 86400000), field: 'created' as const } },
- { fullText: 'benchmark item' }
- ];
-
- for (let i = 0; i < iterations; i++) {
- try {
- const query = queries[i % queries.length];
- await this.memory.query(query);
- } catch (error) {
- errors.push(error as Error);
- }
- }
-
- const duration = performance.now() - startTime;
-
- return {
- operation: 'query',
- iterations,
- duration,
- operationsPerSecond: iterations / (duration / 1000),
- averageLatency: duration / iterations,
- errors: errors.length,
- errorRate: errors.length / iterations
- };
- }
-
- private async benchmarkVectorSearch(): Promise<OperationBenchmark> {
- const iterations = 50;
- const startTime = performance.now();
- const errors: Error[] = [];
-
- for (let i = 0; i < iterations; i++) {
- try {
- await this.memory.vectorSearch({
- text: 'performance optimization database',
- threshold: 0.7,
- limit: 10
- });
- } catch (error) {
- errors.push(error as Error);
- }
- }
-
- const duration = performance.now() - startTime;
-
- return {
- operation: 'vectorSearch',
- iterations,
- duration,
- operationsPerSecond: iterations / (duration / 1000),
- averageLatency: duration / iterations,
- errors: errors.length,
- errorRate: errors.length / iterations
- };
- }
-
- private async benchmarkBatch(): Promise<OperationBenchmark> {
- const batchSize = 100;
- const iterations = 10;
- const startTime = performance.now();
- const errors: Error[] = [];
-
- for (let i = 0; i < iterations; i++) {
- try {
- const items = Array.from({ length: batchSize }, (_, j) => ({
- category: 'batch-test',
- content: `Batch item ${i}-${j}`,
- tags: ['batch', 'test']
- }));
-
- await this.memory.storeBatch(items);
- } catch (error) {
- errors.push(error as Error);
- }
- }
-
- const duration = performance.now() - startTime;
- const totalOperations = iterations * batchSize;
-
- return {
- operation: 'batch',
- iterations: totalOperations,
- duration,
- operationsPerSecond: totalOperations / (duration / 1000),
- averageLatency: duration / totalOperations,
- errors: errors.length,
- errorRate: errors.length / iterations
- };
- }
-
- private printResults(results: BenchmarkResults): void {
- console.log('\n=== BENCHMARK RESULTS ===\n');
-
- Object.values(results).forEach(result => {
- console.log(`${result.operation.toUpperCase()}:`);
- console.log(` Operations/sec: ${result.operationsPerSecond.toFixed(0)}`);
- console.log(` Avg latency: ${result.averageLatency.toFixed(2)}ms`);
- console.log(` Error rate: ${(result.errorRate * 100).toFixed(2)}%`);
- console.log('');
- });
- }
-}
-
-interface OperationBenchmark {
- operation: string;
- iterations: number;
- duration: number;
- operationsPerSecond: number;
- averageLatency: number;
- errors: number;
- errorRate: number;
-}
-
-interface BenchmarkResults {
- store: OperationBenchmark;
- retrieve: OperationBenchmark;
- query: OperationBenchmark;
- vectorSearch: OperationBenchmark;
- batch: OperationBenchmark;
-}
-```
-
-### Stress Testing
-
-```typescript
-// Concurrent load testing
-class StressTest {
- constructor(private memory: MemoryManager) {}
-
- async runStressTest(options: StressTestOptions): Promise<StressTestResults> {
- console.log(`Starting stress test: ${options.concurrency} concurrent users, ${options.duration}ms duration`);
-
- const startTime = Date.now();
- const workers: Promise<WorkerResults>[] = [];
-
- // Spawn concurrent workers
- for (let i = 0; i < options.concurrency; i++) {
- workers.push(this.runWorker(i, options));
- }
-
- // Wait for all workers to complete
- const results = await Promise.all(workers);
- const endTime = Date.now();
-
- // Aggregate results
- const aggregated = this.aggregateResults(results, endTime - startTime);
- this.printStressResults(aggregated);
-
- return aggregated;
- }
-
- private async runWorker(workerId: number, options: StressTestOptions): Promise<WorkerResults> {
- const startTime = Date.now();
- const operations: OperationResult[] = [];
-
- while (Date.now() - startTime < options.duration) {
- const operationType = this.selectOperation(options.operationWeights);
- const operationStart = performance.now();
-
- try {
- await this.executeOperation(operationType, workerId);
- operations.push({
- type: operationType,
- duration: performance.now() - operationStart,
- success: true
- });
- } catch (error) {
- operations.push({
- type: operationType,
- duration: performance.now() - operationStart,
- success: false,
- error: error as Error
- });
- }
-
- // Optional delay between operations
- if (options.operationDelay > 0) {
- await new Promise(resolve => setTimeout(resolve, options.operationDelay));
- }
- }
-
- return {
- workerId,
- operations,
- duration: Date.now() - startTime
- };
- }
-
- private selectOperation(weights: Record<string, number>): string {
- const total = Object.values(weights).reduce((sum, weight) => sum + weight, 0);
- let random = Math.random() * total;
-
- for (const [operation, weight] of Object.entries(weights)) {
- random -= weight;
- if (random <= 0) {
- return operation;
- }
- }
-
- return Object.keys(weights)[0]; // Fallback
- }
-
- private async executeOperation(type: string, workerId: number): Promise<void> {
- switch (type) {
- case 'store':
- await this.memory.store({
- category: 'stress-test',
- content: `Stress test item from worker ${workerId}`,
- tags: ['stress', 'test'],
- metadata: { workerId }
- });
- break;
-
- case 'query':
- await this.memory.query({
- category: 'stress-test',
- limit: 10
- });
- break;
-
- case 'retrieve':
- // Retrieve a random item (simplified)
- const items = await this.memory.query({
- category: 'stress-test',
- limit: 1
- });
- if (items.length > 0) {
- await this.memory.retrieve(items[0].id);
- }
- break;
-
- default:
- throw new Error(`Unknown operation type: ${type}`);
- }
- }
-
- private aggregateResults(workerResults: WorkerResults[], totalDuration: number): StressTestResults {
- const allOperations = workerResults.flatMap(w => w.operations);
- const byType = new Map<string, OperationResult[]>();
-
- allOperations.forEach(op => {
- if (!byType.has(op.type)) {
- byType.set(op.type, []);
- }
- byType.get(op.type)!.push(op);
- });
-
- const typeStats = new Map<string, OperationStats>();
-
- byType.forEach((operations, type) => {
- const successful = operations.filter(op => op.success);
- const failed = operations.filter(op => !op.success);
- const durations = successful.map(op => op.duration);
-
- typeStats.set(type, {
- total: operations.length,
- successful: successful.length,
- failed: failed.length,
- successRate: successful.length / operations.length,
- averageLatency: durations.reduce((sum, d) => sum + d, 0) / durations.length,
- p95Latency: this.percentile(durations, 0.95),
- p99Latency: this.percentile(durations, 0.99),
- throughput: successful.length / (totalDuration / 1000)
- });
- });
-
- return {
- duration: totalDuration,
- workers: workerResults.length,
- totalOperations: allOperations.length,
- operationStats: Object.fromEntries(typeStats),
- overallThroughput: allOperations.length / (totalDuration / 1000),
- overallSuccessRate: allOperations.filter(op => op.success).length / allOperations.length
- };
- }
-
- private percentile(values: number[], p: number): number {
- const sorted = values.slice().sort((a, b) => a - b);
- const index = Math.ceil(sorted.length * p) - 1;
- return sorted[Math.max(0, index)] || 0;
- }
-
- private printStressResults(results: StressTestResults): void {
- console.log('\n=== STRESS TEST RESULTS ===\n');
- console.log(`Duration: ${results.duration}ms`);
- console.log(`Workers: ${results.workers}`);
- console.log(`Total operations: ${results.totalOperations}`);
- console.log(`Overall throughput: ${results.overallThroughput.toFixed(2)} ops/sec`);
- console.log(`Overall success rate: ${(results.overallSuccessRate * 100).toFixed(2)}%\n`);
-
- Object.entries(results.operationStats).forEach(([type, stats]) => {
- console.log(`${type.toUpperCase()}:`);
- console.log(` Throughput: ${stats.throughput.toFixed(2)} ops/sec`);
- console.log(` Success rate: ${(stats.successRate * 100).toFixed(2)}%`);
- console.log(` Avg latency: ${stats.averageLatency.toFixed(2)}ms`);
- console.log(` P95 latency: ${stats.p95Latency.toFixed(2)}ms`);
- console.log(` P99 latency: ${stats.p99Latency.toFixed(2)}ms`);
- console.log('');
- });
- }
-}
-
-interface StressTestOptions {
- concurrency: number;
- duration: number; // milliseconds
- operationWeights: Record<string, number>;
- operationDelay: number; // milliseconds between operations
-}
-
-interface OperationResult {
- type: string;
- duration: number;
- success: boolean;
- error?: Error;
-}
-
-interface WorkerResults {
- workerId: number;
- operations: OperationResult[];
- duration: number;
-}
-
-interface OperationStats {
- total: number;
- successful: number;
- failed: number;
- successRate: number;
- averageLatency: number;
- p95Latency: number;
- p99Latency: number;
- throughput: number;
-}
-
-interface StressTestResults {
- duration: number;
- workers: number;
- totalOperations: number;
- operationStats: Record<string, OperationStats>;
- overallThroughput: number;
- overallSuccessRate: number;
-}
-```
-
-## Performance Tuning Checklist
-
-### Database Optimization
-
-- [ ] **WAL Mode**: Enable for SQLite to improve concurrent access
-- [ ] **Cache Size**: Set appropriate cache size based on available memory
-- [ ] **Memory Mapping**: Enable mmap for large databases
-- [ ] **Connection Pooling**: Configure appropriate pool size
-- [ ] **Index Analysis**: Add indexes for frequently queried fields
-- [ ] **Query Optimization**: Use EXPLAIN QUERY PLAN to optimize slow queries
-- [ ] **Vacuum**: Schedule regular VACUUM operations for SQLite
-- [ ] **Statistics**: Update table statistics regularly
-
-### Application Cache
-
-- [ ] **Strategy Selection**: Choose appropriate cache strategy for workload
-- [ ] **Size Tuning**: Set cache size based on memory constraints
-- [ ] **TTL Configuration**: Configure appropriate time-to-live values
-- [ ] **Compression**: Enable compression for large items
-- [ ] **Preloading**: Implement cache warming for hot data
-- [ ] **Monitoring**: Track cache hit rates and eviction patterns
-
-### System Optimization
-
-- [ ] **Memory Allocation**: Monitor and optimize memory usage
-- [ ] **I/O Optimization**: Use fast storage (NVMe SSD)
-- [ ] **Network Tuning**: Optimize for distributed deployments
-- [ ] **CPU Usage**: Profile and optimize CPU-intensive operations
-- [ ] **Garbage Collection**: Tune GC settings for your runtime
-- [ ] **Concurrency**: Optimize concurrent operation limits
-
-### Monitoring Setup
-
-- [ ] **Metrics Collection**: Implement comprehensive metrics
-- [ ] **Alerting**: Set up alerts for performance degradation
-- [ ] **Logging**: Configure appropriate log levels
-- [ ] **Profiling**: Enable profiling for performance analysis
-- [ ] **Dashboards**: Create monitoring dashboards
-- [ ] **Benchmarking**: Establish performance baselines
-
-## Troubleshooting Performance Issues
-
-### Common Performance Problems
-
-#### Slow Queries
-
-```typescript
-// Identify slow queries
-const slowQueries = await memory.getStatistics().slowQueries;
-slowQueries.forEach(query => {
- console.log(`Slow query: ${query.sql}`);
- console.log(`Duration: ${query.duration}ms`);
- console.log(`Rows examined: ${query.rowsExamined}`);
-});
-
-// Optimize with indexes
-await memory.addIndex('category_namespace', ['category', 'namespace']);
-```
-
-#### High Memory Usage
-
-```typescript
-// Monitor memory usage
-const memoryUsage = process.memoryUsage();
-console.log(`Heap used: ${(memoryUsage.heapUsed / 1024 / 1024).toFixed(2)} MB`);
-console.log(`Heap total: ${(memoryUsage.heapTotal / 1024 / 1024).toFixed(2)} MB`);
-
-// Reduce cache size if needed
-await memory.updateConfig({
- cache: {
- maxSize: 256 * 1024 * 1024 // Reduce to 256MB
- }
-});
-```
-
-#### Low Cache Hit Rate
-
-```typescript
-// Analyze cache performance
-const cacheStats = await memory.getCacheStatistics();
-if (cacheStats.hitRate < 0.8) {
- console.log('Cache hit rate is low, consider:');
- console.log('- Increasing cache size');
- console.log('- Adjusting cache strategy');
- console.log('- Implementing cache warming');
-}
-```
-
-#### High Lock Contention
-
-```typescript
-// Monitor lock wait times
-const lockStats = await memory.getLockStatistics();
-if (lockStats.averageWaitTime > 10) {
- console.log('High lock contention detected');
- console.log('Consider increasing connection pool size');
-}
-```
\ No newline at end of file
diff --git a/archive/legacy-memory-system/docs/security.md b/archive/legacy-memory-system/docs/security.md
deleted file mode 100644
index c86af58598..0000000000
--- a/archive/legacy-memory-system/docs/security.md
+++ /dev/null
@@ -1,1221 +0,0 @@
-# Security Guide
-
-This guide covers security features, best practices, and configurations for the SPARC Memory Bank system.
-
-## Security Architecture
-
-### Defense in Depth
-
-The SPARC Memory Bank implements multiple layers of security:
-
-```
-┌─────────────────────────────────────────────┐
-│ Application Layer │
-│ • Input validation │
-│ • Rate limiting │
-│ • Authentication & authorization │
-└─────────────────────────────────────────────┘
-┌─────────────────────────────────────────────┐
-│ Data Layer │
-│ • Encryption at rest │
-│ • Data integrity checks │
-│ • Secure key management │
-└─────────────────────────────────────────────┘
-┌─────────────────────────────────────────────┐
-│ Storage Layer │
-│ • File system permissions │
-│ • Database access controls │
-│ • Audit logging │
-└─────────────────────────────────────────────┘
-┌─────────────────────────────────────────────┐
-│ Network Layer │
-│ • TLS encryption │
-│ • Certificate validation │
-│ • Network segmentation │
-└─────────────────────────────────────────────┘
-```
-
-## Encryption
-
-### Encryption at Rest
-
-The memory bank supports multiple encryption algorithms for data at rest:
-
-```typescript
-// AES-256-GCM encryption (recommended)
-const secureConfig = {
- backend: 'sqlite',
- storage: { path: './secure.db' },
- security: {
- encryption: {
- enabled: true,
- algorithm: 'aes-256-gcm', // Authenticated encryption
- keyDerivation: 'argon2', // Strong key derivation
- keyDerivationOptions: {
- memory: 65536, // 64MB memory cost
- iterations: 3, // Time cost
- parallelism: 1, // Parallelism
- saltLength: 32 // 256-bit salt
- },
- rotateKeys: true,
- keyRotationInterval: 30 * 24 * 60 * 60 * 1000 // 30 days
- }
- }
-};
-
-// Alternative: ChaCha20-Poly1305 for high-performance environments
-const highPerfConfig = {
- security: {
- encryption: {
- enabled: true,
- algorithm: 'chacha20-poly1305', // Fast authenticated encryption
- keyDerivation: 'scrypt',
- keyDerivationOptions: {
- memory: 32768, // 32MB memory cost
- iterations: 1, // Lower iteration count
- parallelism: 1,
- saltLength: 32
- }
- }
- }
-};
-```
-
-### Key Management
-
-```typescript
-// Environment-based key management
-class EnvironmentKeyManager implements KeyManager {
- async getKey(keyId: string): Promise<Buffer> {
- const key = process.env[`MEMORY_KEY_${keyId.toUpperCase()}`];
- if (!key) {
- throw new Error(`Key not found: ${keyId}`);
- }
- return Buffer.from(key, 'base64');
- }
-
- async rotateKey(keyId: string): Promise<Buffer> {
- const newKey = crypto.randomBytes(32);
- // Store new key securely (implementation depends on your key storage)
- await this.storeKey(keyId, newKey);
- return newKey;
- }
-}
-
-// HashiCorp Vault integration
-class VaultKeyManager implements KeyManager {
- constructor(private vaultClient: VaultClient) {}
-
- async getKey(keyId: string): Promise<Buffer> {
- const response = await this.vaultClient.read(`secret/memory-keys/${keyId}`);
- return Buffer.from(response.data.key, 'base64');
- }
-
- async rotateKey(keyId: string): Promise<Buffer> {
- const newKey = crypto.randomBytes(32);
- await this.vaultClient.write(`secret/memory-keys/${keyId}`, {
- key: newKey.toString('base64'),
- created: new Date().toISOString()
- });
- return newKey;
- }
-}
-
-// AWS KMS integration
-class KMSKeyManager implements KeyManager {
- constructor(private kmsClient: KMSClient) {}
-
- async getKey(keyId: string): Promise<Buffer> {
- const command = new DecryptCommand({
- CiphertextBlob: Buffer.from(keyId, 'base64')
- });
- const response = await this.kmsClient.send(command);
- return Buffer.from(response.Plaintext!);
- }
-
- async generateDataKey(): Promise<{ keyId: string; key: Buffer }> {
- const command = new GenerateDataKeyCommand({
- KeyId: 'alias/memory-bank-key',
- KeySpec: 'AES_256'
- });
- const response = await this.kmsClient.send(command);
-
- return {
- keyId: Buffer.from(response.CiphertextBlob!).toString('base64'),
- key: Buffer.from(response.Plaintext!)
- };
- }
-}
-```
-
-### Field-Level Encryption
-
-```typescript
-// Encrypt sensitive fields individually
-class FieldEncryption {
- constructor(private keyManager: KeyManager) {}
-
- async encryptSensitiveData(item: MemoryItem): Promise<MemoryItem> {
- const encryptedItem = { ...item };
-
- // Encrypt content if it contains sensitive data
- if (this.isSensitive(item.content)) {
- encryptedItem.content = await this.encrypt(item.content, 'content-key');
- encryptedItem.metadata = {
- ...item.metadata,
- encrypted: ['content']
- };
- }
-
- // Encrypt sensitive metadata fields
- if (item.metadata) {
- const sensitiveFields = ['ssn', 'creditCard', 'password', 'apiKey'];
- const encryptedMetadata = { ...item.metadata };
- const encryptedFields: string[] = [];
-
- for (const field of sensitiveFields) {
- if (encryptedMetadata[field]) {
- encryptedMetadata[field] = await this.encrypt(
- String(encryptedMetadata[field]),
- `metadata-${field}-key`
- );
- encryptedFields.push(field);
- }
- }
-
- if (encryptedFields.length > 0) {
- encryptedMetadata.encrypted = [
- ...(encryptedMetadata.encrypted || []),
- ...encryptedFields
- ];
- }
-
- encryptedItem.metadata = encryptedMetadata;
- }
-
- return encryptedItem;
- }
-
- private isSensitive(content: string): boolean {
- const sensitivePatterns = [
- /\b\d{3}-\d{2}-\d{4}\b/, // SSN pattern
- /\b\d{4}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}\b/, // Credit card pattern
- /(?:password|pwd|passwd)[:=]\s*\S+/i, // Password patterns
- /(?:api[_-]?key|token)[:=]\s*\S+/i // API key patterns
- ];
-
- return sensitivePatterns.some(pattern => pattern.test(content));
- }
-
- private async encrypt(data: string, keyId: string): Promise<string> {
- const key = await this.keyManager.getKey(keyId);
- const iv = crypto.randomBytes(12); // 96-bit IV for GCM
- const cipher = crypto.createCipher('aes-256-gcm', key, { iv });
-
- let encrypted = cipher.update(data, 'utf8', 'base64');
- encrypted += cipher.final('base64');
- const authTag = cipher.getAuthTag();
-
- // Combine IV, auth tag, and encrypted data
- const combined = Buffer.concat([iv, authTag, Buffer.from(encrypted, 'base64')]);
- return combined.toString('base64');
- }
-}
-```
-
-## Access Control
-
-### Authentication
-
-```typescript
-// JWT-based authentication
-interface AuthConfig {
- enabled: boolean;
- method: 'jwt' | 'certificate' | 'api-key' | 'custom';
- jwt?: {
- secret: string;
- algorithm: 'HS256' | 'RS256' | 'ES256';
- issuer: string;
- audience: string;
- expiresIn: string;
- clockTolerance: number;
- };
- certificate?: {
- ca: string;
- cert: string;
- key: string;
- passphrase?: string;
- };
- apiKey?: {
- headerName: string;
- prefix?: string;
- validation: (key: string) => Promise<boolean>;
- };
-}
-
-class JWTAuthenticator implements Authenticator {
- constructor(private config: AuthConfig['jwt']) {}
-
- async authenticate(token: string): Promise<AuthContext> {
- try {
- const payload = jwt.verify(token, this.config!.secret, {
- algorithms: [this.config!.algorithm],
- issuer: this.config!.issuer,
- audience: this.config!.audience,
- clockTolerance: this.config!.clockTolerance
- }) as JWTPayload;
-
- return {
- authenticated: true,
- agentId: payload.sub,
- roles: payload.roles || [],
- permissions: payload.permissions || [],
- namespace: payload.namespace,
- expiresAt: new Date(payload.exp * 1000)
- };
- } catch (error) {
- throw new SecurityError('Invalid token', 'INVALID_TOKEN', { error });
- }
- }
-
- async generateToken(agentId: string, options: TokenOptions): Promise<string> {
- const payload: JWTPayload = {
- sub: agentId,
- iss: this.config!.issuer,
- aud: this.config!.audience,
- iat: Math.floor(Date.now() / 1000),
- exp: Math.floor(Date.now() / 1000) + this.parseExpiration(this.config!.expiresIn),
- roles: options.roles || [],
- permissions: options.permissions || [],
- namespace: options.namespace
- };
-
- return jwt.sign(payload, this.config!.secret, {
- algorithm: this.config!.algorithm
- });
- }
-}
-
-// Certificate-based authentication
-class CertificateAuthenticator implements Authenticator {
- constructor(private config: AuthConfig['certificate']) {}
-
- async authenticate(certificate: X509Certificate): Promise<AuthContext> {
- // Verify certificate chain
- if (!this.verifyCertificateChain(certificate)) {
- throw new SecurityError('Invalid certificate chain', 'INVALID_CERTIFICATE');
- }
-
- // Extract agent information from certificate
- const subject = certificate.subject;
- const agentId = subject.getField('CN').value;
- const roles = this.extractRoles(certificate);
-
- return {
- authenticated: true,
- agentId,
- roles,
- permissions: this.resolvePermissions(roles),
- expiresAt: certificate.validTo
- };
- }
-
- private verifyCertificateChain(certificate: X509Certificate): boolean {
- // Implementation depends on your PKI setup
- const ca = fs.readFileSync(this.config!.ca);
- return certificate.verify(ca);
- }
-
- private extractRoles(certificate: X509Certificate): string[] {
- // Extract roles from certificate extensions or subject
- const organizationalUnit = certificate.subject.getField('OU')?.value;
- return organizationalUnit ? organizationalUnit.split(',') : [];
- }
-}
-```
-
-### Role-Based Access Control (RBAC)
-
-```typescript
-// Define roles and permissions
-interface Role {
- name: string;
- permissions: Permission[];
- description: string;
-}
-
-interface Permission {
- resource: string;
- actions: string[];
- conditions?: Condition[];
-}
-
-interface Condition {
- field: string;
- operator: 'equals' | 'in' | 'regex';
- value: any;
-}
-
-const predefinedRoles: Role[] = [
- {
- name: 'admin',
- description: 'Full system access',
- permissions: [
- {
- resource: '*',
- actions: ['*']
- }
- ]
- },
- {
- name: 'agent',
- description: 'Standard agent access',
- permissions: [
- {
- resource: 'memory',
- actions: ['read', 'write', 'delete'],
- conditions: [
- {
- field: 'namespace',
- operator: 'equals',
- value: '${auth.namespace}'
- }
- ]
- }
- ]
- },
- {
- name: 'reader',
- description: 'Read-only access',
- permissions: [
- {
- resource: 'memory',
- actions: ['read']
- }
- ]
- },
- {
- name: 'researcher',
- description: 'Research data access',
- permissions: [
- {
- resource: 'memory',
- actions: ['read', 'write'],
- conditions: [
- {
- field: 'category',
- operator: 'in',
- value: ['research', 'analysis', 'findings']
- }
- ]
- }
- ]
- }
-];
-
-class RBACAuthorizer implements Authorizer {
- constructor(private roles: Map<string, Role>) {}
-
- async authorize(
- auth: AuthContext,
- action: string,
- resource: MemoryItem | MemoryQuery
- ): Promise<boolean> {
- // Check if user has required roles
- for (const roleName of auth.roles) {
- const role = this.roles.get(roleName);
- if (!role) continue;
-
- for (const permission of role.permissions) {
- if (this.matchesPermission(permission, action, resource, auth)) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- private matchesPermission(
- permission: Permission,
- action: string,
- resource: any,
- auth: AuthContext
- ): boolean {
- // Check resource match
- if (permission.resource !== '*' && permission.resource !== 'memory') {
- return false;
- }
-
- // Check action match
- if (!permission.actions.includes('*') && !permission.actions.includes(action)) {
- return false;
- }
-
- // Check conditions
- if (permission.conditions) {
- return permission.conditions.every(condition =>
- this.evaluateCondition(condition, resource, auth)
- );
- }
-
- return true;
- }
-
- private evaluateCondition(
- condition: Condition,
- resource: any,
- auth: AuthContext
- ): boolean {
- let value = this.resolveValue(condition.value, auth);
- let resourceValue = this.getResourceValue(resource, condition.field);
-
- switch (condition.operator) {
- case 'equals':
- return resourceValue === value;
- case 'in':
- return Array.isArray(value) && value.includes(resourceValue);
- case 'regex':
- return new RegExp(value).test(String(resourceValue));
- default:
- return false;
- }
- }
-
- private resolveValue(value: any, auth: AuthContext): any {
- if (typeof value === 'string' && value.startsWith('${')) {
- const path = value.slice(2, -1); // Remove ${ and }
- return this.getNestedValue(auth, path);
- }
- return value;
- }
-
- private getNestedValue(obj: any, path: string): any {
- return path.split('.').reduce((current, key) => current?.[key], obj);
- }
-
- private getResourceValue(resource: any, field: string): any {
- return this.getNestedValue(resource, field);
- }
-}
-```
-
-### Namespace Isolation
-
-```typescript
-// Enforce namespace-based access control
-class NamespaceSecurityManager {
- constructor(
- private config: NamespaceConfig,
- private authorizer: Authorizer
- ) {}
-
- async enforceNamespaceAccess(
- auth: AuthContext,
- operation: string,
- target: MemoryItem | MemoryQuery
- ): Promise<void> {
- if (!this.config.enabled) return;
-
- const targetNamespace = this.extractNamespace(target);
-
- // Check if agent has access to the namespace
- if (!await this.hasNamespaceAccess(auth, targetNamespace, operation)) {
- throw new SecurityError(
- `Access denied to namespace: ${targetNamespace}`,
- 'NAMESPACE_ACCESS_DENIED',
- { namespace: targetNamespace, operation }
- );
- }
-
- // Apply namespace restrictions to queries
- if (operation === 'query' && target && typeof target === 'object') {
- this.restrictQueryToNamespaces(target as MemoryQuery, auth);
- }
- }
-
- private async hasNamespaceAccess(
- auth: AuthContext,
- namespace: string,
- operation: string
- ): Promise<boolean> {
- const permissions = this.config.permissions?.[namespace];
- if (!permissions) {
- // Use default namespace permissions
- return this.hasNamespaceAccess(auth, this.config.defaultNamespace, operation);
- }
-
- // Check public access
- if (operation === 'read' && permissions.public) {
- return true;
- }
-
- // Check specific permissions
- const requiredList = this.getRequiredPermissionList(permissions, operation);
- return requiredList.includes('*') || requiredList.includes(auth.agentId);
- }
-
- private getRequiredPermissionList(
- permissions: NamespacePermissions[string],
- operation: string
- ): string[] {
- switch (operation) {
- case 'read':
- case 'query':
- return permissions.read;
- case 'write':
- case 'store':
- case 'update':
- return permissions.write;
- case 'delete':
- case 'admin':
- return permissions.admin;
- default:
- return [];
- }
- }
-
- private extractNamespace(target: MemoryItem | MemoryQuery): string {
- if ('namespace' in target && target.namespace) {
- return target.namespace;
- }
- return this.config.defaultNamespace;
- }
-
- private restrictQueryToNamespaces(query: MemoryQuery, auth: AuthContext): void {
- const allowedNamespaces = this.getAllowedNamespaces(auth);
-
- if (query.namespace) {
- // Verify the requested namespace is allowed
- if (!allowedNamespaces.includes(query.namespace)) {
- throw new SecurityError(
- `Access denied to namespace: ${query.namespace}`,
- 'NAMESPACE_ACCESS_DENIED'
- );
- }
- } else if (query.namespaces) {
- // Filter to only allowed namespaces
- query.namespaces = query.namespaces.filter(ns => allowedNamespaces.includes(ns));
- } else {
- // Restrict to allowed namespaces
- query.namespaces = allowedNamespaces;
- }
- }
-
- private getAllowedNamespaces(auth: AuthContext): string[] {
- const allowed: string[] = [];
-
- if (this.config.permissions) {
- for (const [namespace, permissions] of Object.entries(this.config.permissions)) {
- if (permissions.public ||
- permissions.read.includes('*') ||
- permissions.read.includes(auth.agentId)) {
- allowed.push(namespace);
- }
- }
- }
-
- return allowed.length > 0 ? allowed : [this.config.defaultNamespace];
- }
-}
-```
-
-## Data Integrity
-
-### Checksums and Validation
-
-```typescript
-// Data integrity verification
-class IntegrityManager {
- constructor(private config: SecurityConfig['checksums']) {}
-
- async calculateChecksum(data: string | Buffer): Promise<string> {
- if (!this.config?.enabled) return '';
-
- const hash = crypto.createHash(this.config.algorithm);
- hash.update(data);
- return `${this.config.algorithm}:${hash.digest('hex')}`;
- }
-
- async verifyChecksum(data: string | Buffer, expectedChecksum: string): Promise<boolean> {
- if (!this.config?.enabled || !expectedChecksum) return true;
-
- const actualChecksum = await this.calculateChecksum(data);
- return actualChecksum === expectedChecksum;
- }
-
- async verifyItem(item: MemoryItem): Promise<IntegrityResult> {
- const result: IntegrityResult = {
- valid: true,
- errors: []
- };
-
- // Verify content checksum
- if (item.checksum && this.config?.verifyOnRead) {
- const contentValid = await this.verifyChecksum(item.content, item.checksum);
- if (!contentValid) {
- result.valid = false;
- result.errors.push('Content checksum mismatch');
-
- if (this.config.repairCorruption) {
- await this.attemptRepair(item);
- }
- }
- }
-
- // Verify metadata integrity
- if (item.metadata && item.vectorClock) {
- const metadataValid = this.verifyMetadataIntegrity(item);
- if (!metadataValid) {
- result.valid = false;
- result.errors.push('Metadata integrity check failed');
- }
- }
-
- return result;
- }
-
- private verifyMetadataIntegrity(item: MemoryItem): boolean {
- // Check required fields
- const requiredFields = ['id', 'category', 'content', 'created', 'updated'];
- for (const field of requiredFields) {
- if (!(field in item) || item[field as keyof MemoryItem] === null || item[field as keyof MemoryItem] === undefined) {
- return false;
- }
- }
-
- // Check timestamp consistency
- if (item.updated < item.created) {
- return false;
- }
-
- // Check version consistency
- if (item.version < 1) {
- return false;
- }
-
- return true;
- }
-
- private async attemptRepair(item: MemoryItem): Promise<void> {
- // Log corruption for investigation
- console.warn(`Data corruption detected for item ${item.id}`);
-
- // Attempt to reconstruct from backup or replica
- // Implementation depends on your backup/replication strategy
- }
-}
-
-interface IntegrityResult {
- valid: boolean;
- errors: string[];
-}
-```
-
-### Secure Deletion
-
-```typescript
-// Secure deletion implementation
-class SecureDeletion {
- constructor(private config: SecurityConfig) {}
-
- async secureDelete(backend: MemoryBackend, itemId: string): Promise<boolean> {
- const item = await backend.retrieve(itemId);
- if (!item) return false;
-
- try {
- // Overwrite sensitive data before deletion
- if (this.config.checksums?.enabled && this.config.secureDelete) {
- await this.overwriteData(backend, item);
- }
-
- // Perform actual deletion
- const deleted = await backend.delete(itemId);
-
- // Log secure deletion
- if (this.config.auditLog?.enabled) {
- await this.logSecureDeletion(itemId, item);
- }
-
- return deleted;
- } catch (error) {
- console.error(`Secure deletion failed for item ${itemId}:`, error);
- return false;
- }
- }
-
- private async overwriteData(backend: MemoryBackend, item: MemoryItem): Promise<void> {
- // Overwrite with random data multiple times
- const overwritePasses = 3;
-
- for (let pass = 0; pass < overwritePasses; pass++) {
- const randomContent = crypto.randomBytes(item.content.length).toString('base64');
- const overwriteItem: MemoryItem = {
- ...item,
- content: randomContent,
- checksum: await this.calculateChecksum(randomContent),
- updated: Date.now()
- };
-
- await backend.update(item.id, overwriteItem);
- }
- }
-
- private async logSecureDeletion(itemId: string, item: MemoryItem): Promise<void> {
- const auditEvent = {
- timestamp: new Date(),
- operation: 'secure_delete',
- itemId,
- category: item.category,
- namespace: item.namespace,
- agent: 'system' // Or extract from current context
- };
-
- // Write to audit log
- console.log('AUDIT:', JSON.stringify(auditEvent));
- }
-
- private async calculateChecksum(data: string): Promise<string> {
- const hash = crypto.createHash('sha256');
- hash.update(data);
- return `sha256:${hash.digest('hex')}`;
- }
-}
-```
-
-## Audit Logging
-
-### Comprehensive Audit Trail
-
-```typescript
-// Audit logging system
-class AuditLogger {
- constructor(
- private config: SecurityConfig['auditLog'],
- private storage: AuditStorage
- ) {}
-
- async logOperation(event: AuditEvent): Promise<void> {
- if (!this.config?.enabled) return;
-
- const enrichedEvent: EnrichedAuditEvent = {
- ...event,
- timestamp: new Date(),
- id: crypto.randomUUID(),
- sessionId: this.getCurrentSessionId(),
- level: this.determineLogLevel(event),
- checksum: await this.calculateEventChecksum(event)
- };
-
- // Include data payload if configured
- if (this.config.includeData && event.data) {
- enrichedEvent.data = this.sanitizeData(event.data);
- }
-
- await this.storage.write(enrichedEvent);
-
- // Real-time monitoring alerts
- if (this.isSecurityEvent(event)) {
- await this.sendSecurityAlert(enrichedEvent);
- }
- }
-
- private determineLogLevel(event: AuditEvent): 'info' | 'warning' | 'error' {
- if (event.operation.includes('delete') || event.operation.includes('admin')) {
- return 'warning';
- }
- if (event.success === false) {
- return 'error';
- }
- return 'info';
- }
-
- private sanitizeData(data: any): any {
- // Remove sensitive information from audit logs
- const sanitized = JSON.parse(JSON.stringify(data));
-
- const sensitiveFields = ['password', 'token', 'apiKey', 'secret'];
- const sanitizeObject = (obj: any) => {
- if (typeof obj !== 'object' || obj === null) return;
-
- for (const key of Object.keys(obj)) {
- if (sensitiveFields.some(field => key.toLowerCase().includes(field))) {
- obj[key] = '[REDACTED]';
- } else if (typeof obj[key] === 'object') {
- sanitizeObject(obj[key]);
- }
- }
- };
-
- sanitizeObject(sanitized);
- return sanitized;
- }
-
- private isSecurityEvent(event: AuditEvent): boolean {
- const securityOperations = [
- 'authentication_failed',
- 'authorization_denied',
- 'admin_operation',
- 'security_violation',
- 'data_corruption_detected'
- ];
-
- return securityOperations.includes(event.operation);
- }
-
- private async sendSecurityAlert(event: EnrichedAuditEvent): Promise<void> {
- // Implementation depends on your alerting system
- console.warn('SECURITY ALERT:', {
- operation: event.operation,
- agent: event.agentId,
- timestamp: event.timestamp,
- details: event.details
- });
- }
-
- private async calculateEventChecksum(event: AuditEvent): Promise<string> {
- const eventString = JSON.stringify(event, Object.keys(event).sort());
- const hash = crypto.createHash('sha256');
- hash.update(eventString);
- return hash.digest('hex');
- }
-
- private getCurrentSessionId(): string {
- // Implementation depends on your session management
- return crypto.randomUUID();
- }
-}
-
-interface AuditEvent {
- operation: string;
- agentId?: string;
- namespace?: string;
- itemId?: string;
- success: boolean;
- details?: Record<string, any>;
- data?: any;
-}
-
-interface EnrichedAuditEvent extends AuditEvent {
- id: string;
- timestamp: Date;
- sessionId: string;
- level: 'info' | 'warning' | 'error';
- checksum: string;
-}
-
-// File-based audit storage
-class FileAuditStorage implements AuditStorage {
- constructor(
- private logPath: string,
- private rotateSize: number = 100 * 1024 * 1024 // 100MB
- ) {}
-
- async write(event: EnrichedAuditEvent): Promise<void> {
- const logLine = JSON.stringify(event) + '\n';
-
- // Check if rotation is needed
- await this.checkRotation();
-
- // Append to current log file
- await fs.appendFile(this.logPath, logLine, { encoding: 'utf8' });
- }
-
- private async checkRotation(): Promise<void> {
- try {
- const stats = await fs.stat(this.logPath);
- if (stats.size >= this.rotateSize) {
- await this.rotateLog();
- }
- } catch (error) {
- // File doesn't exist yet, that's fine
- }
- }
-
- private async rotateLog(): Promise<void> {
- const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
- const rotatedPath = `${this.logPath}.${timestamp}`;
-
- await fs.rename(this.logPath, rotatedPath);
-
- // Compress old log file
- const gzip = createGzip();
- const source = createReadStream(rotatedPath);
- const destination = createWriteStream(`${rotatedPath}.gz`);
-
- await pipeline(source, gzip, destination);
- await fs.unlink(rotatedPath);
- }
-}
-```
-
-## Rate Limiting
-
-### Request Rate Limiting
-
-```typescript
-// Rate limiting implementation
-class RateLimiter {
- private buckets: Map<string, TokenBucket> = new Map();
-
- constructor(private config: SecurityConfig['rateLimiting']) {}
-
- async checkRateLimit(agentId: string, operation: string): Promise<RateLimitResult> {
- if (!this.config?.enabled) {
- return { allowed: true, remaining: Infinity, resetTime: null };
- }
-
- const bucketKey = `${agentId}:${operation}`;
- let bucket = this.buckets.get(bucketKey);
-
- if (!bucket) {
- bucket = new TokenBucket(
- this.getOperationLimit(operation),
- this.config.windowSize || 60000 // 1 minute default
- );
- this.buckets.set(bucketKey, bucket);
- }
-
- const allowed = bucket.consume();
-
- if (!allowed) {
- // Log rate limit violation
- console.warn(`Rate limit exceeded for agent ${agentId}, operation ${operation}`);
- }
-
- return {
- allowed,
- remaining: bucket.tokens,
- resetTime: bucket.resetTime
- };
- }
-
- private getOperationLimit(operation: string): number {
- // Different limits for different operations
- const operationLimits: Record<string, number> = {
- 'store': this.config?.perAgentLimit || 100,
- 'query': (this.config?.perAgentLimit || 100) * 2, // Queries can be more frequent
- 'retrieve': (this.config?.perAgentLimit || 100) * 5, // Retrievals are lighter
- 'delete': Math.floor((this.config?.perAgentLimit || 100) / 10) // Deletions are limited
- };
-
- return operationLimits[operation] || this.config?.perAgentLimit || 100;
- }
-}
-
-class TokenBucket {
- public tokens: number;
- public resetTime: Date;
-
- constructor(
- private capacity: number,
- private windowMs: number
- ) {
- this.tokens = capacity;
- this.resetTime = new Date(Date.now() + windowMs);
-
- // Schedule token refill
- this.scheduleRefill();
- }
-
- consume(): boolean {
- if (this.tokens > 0) {
- this.tokens--;
- return true;
- }
- return false;
- }
-
- private scheduleRefill(): void {
- const timeToRefill = this.resetTime.getTime() - Date.now();
-
- setTimeout(() => {
- this.tokens = this.capacity;
- this.resetTime = new Date(Date.now() + this.windowMs);
- this.scheduleRefill();
- }, timeToRefill);
- }
-}
-
-interface RateLimitResult {
- allowed: boolean;
- remaining: number;
- resetTime: Date | null;
-}
-```
-
-## Security Best Practices
-
-### Secure Configuration
-
-```typescript
-// Production security configuration template
-const productionSecurityConfig: MemoryConfig = {
- backend: 'sqlite',
- storage: {
- path: process.env.MEMORY_DB_PATH || '/var/lib/memory/production.db',
- options: {
- // Security-focused database settings
- foreignKeys: true,
- secureDelete: true,
- journalMode: 'WAL',
- synchronous: 'FULL' // Prioritize data integrity
- }
- },
- security: {
- encryption: {
- enabled: true,
- algorithm: 'aes-256-gcm',
- keyDerivation: 'argon2',
- keyDerivationOptions: {
- memory: 65536, // 64MB memory cost
- iterations: 3, // Time cost
- parallelism: 1, // Parallelism
- saltLength: 32 // 256-bit salt
- },
- rotateKeys: true,
- keyRotationInterval: 30 * 24 * 60 * 60 * 1000 // 30 days
- },
- checksums: {
- enabled: true,
- algorithm: 'blake3', // Fast and secure
- verifyOnRead: true,
- repairCorruption: false // Don't auto-repair in production
- },
- authentication: {
- enabled: true,
- method: 'certificate', // Most secure for production
- certificateConfig: {
- ca: process.env.MEMORY_CA_CERT_PATH!,
- cert: process.env.MEMORY_CLIENT_CERT_PATH!,
- key: process.env.MEMORY_CLIENT_KEY_PATH!
- }
- },
- auditLog: {
- enabled: true,
- level: 'standard',
- destination: 'file',
- logFile: '/var/log/memory/audit.log',
- rotateSize: 100 * 1024 * 1024, // 100MB
- retentionDays: 90,
- includeData: false // Don't include sensitive data
- },
- rateLimiting: {
- enabled: true,
- globalLimit: 10000, // 10k ops/sec globally
- perAgentLimit: 1000, // 1k ops/sec per agent
- burstAllowance: 100, // Allow bursts
- windowSize: 60000 // 1 minute window
- }
- },
- namespaces: {
- enabled: true,
- defaultNamespace: 'default',
- enforcePermissions: true,
- strictIsolation: true,
- allowGlobalSearch: false // Prevent cross-namespace data leaks
- }
-};
-```
-
-### Security Checklist
-
-#### Deployment Security
-
-- [ ] **Encryption**: Enable encryption at rest with strong algorithms
-- [ ] **Key Management**: Use secure key storage (Vault, KMS, etc.)
-- [ ] **Authentication**: Implement certificate-based auth for production
-- [ ] **Authorization**: Configure role-based access control
-- [ ] **Audit Logging**: Enable comprehensive audit trails
-- [ ] **Rate Limiting**: Implement request rate limiting
-- [ ] **Network Security**: Use TLS for all communications
-- [ ] **File Permissions**: Restrict file system permissions
-
-#### Operational Security
-
-- [ ] **Regular Updates**: Keep dependencies updated
-- [ ] **Security Scanning**: Regular vulnerability scans
-- [ ] **Monitoring**: Real-time security monitoring
-- [ ] **Backup Security**: Encrypt and secure backups
-- [ ] **Incident Response**: Have incident response procedures
-- [ ] **Key Rotation**: Regular key rotation schedules
-- [ ] **Access Reviews**: Regular access permission reviews
-- [ ] **Security Training**: Team security awareness
-
-#### Development Security
-
-- [ ] **Secure Coding**: Follow secure coding practices
-- [ ] **Input Validation**: Validate all inputs
-- [ ] **Error Handling**: Don't leak sensitive information
-- [ ] **Testing**: Include security in testing procedures
-- [ ] **Code Review**: Security-focused code reviews
-- [ ] **Dependency Scanning**: Scan for vulnerable dependencies
-- [ ] **Secret Management**: Never commit secrets
-- [ ] **Least Privilege**: Follow principle of least privilege
-
-### Common Security Vulnerabilities
-
-#### Prevention Strategies
-
-```typescript
-// Input validation to prevent injection attacks
-class InputValidator {
- static validateMemoryItem(item: Partial<MemoryItem>): ValidationResult {
- const errors: string[] = [];
-
- // Validate required fields
- if (!item.category || typeof item.category !== 'string') {
- errors.push('Category is required and must be a string');
- }
-
- if (!item.content || typeof item.content !== 'string') {
- errors.push('Content is required and must be a string');
- }
-
- // Validate content length to prevent DoS
- if (item.content && item.content.length > 1024 * 1024) { // 1MB limit
- errors.push('Content too large (max 1MB)');
- }
-
- // Validate tags
- if (item.tags) {
- if (!Array.isArray(item.tags)) {
- errors.push('Tags must be an array');
- } else if (item.tags.length > 100) {
- errors.push('Too many tags (max 100)');
- } else if (item.tags.some(tag => typeof tag !== 'string')) {
- errors.push('All tags must be strings');
- }
- }
-
- // Validate namespace
- if (item.namespace && !/^[a-zA-Z0-9_-]+$/.test(item.namespace)) {
- errors.push('Invalid namespace format');
- }
-
- // Validate metadata
- if (item.metadata) {
- if (typeof item.metadata !== 'object') {
- errors.push('Metadata must be an object');
- } else {
- const metadataSize = JSON.stringify(item.metadata).length;
- if (metadataSize > 64 * 1024) { // 64KB limit
- errors.push('Metadata too large (max 64KB)');
- }
- }
- }
-
- return {
- valid: errors.length === 0,
- errors
- };
- }
-}
-
-interface ValidationResult {
- valid: boolean;
- errors: string[];
-}
-```
-
-This comprehensive security guide covers all major aspects of securing the SPARC Memory Bank system, from encryption and access control to audit logging and best practices. The implementation provides multiple layers of security to protect against various threats and vulnerabilities.
\ No newline at end of file
diff --git a/archive/legacy-memory-system/docs/troubleshooting.md b/archive/legacy-memory-system/docs/troubleshooting.md
deleted file mode 100644
index e7f7a74735..0000000000
--- a/archive/legacy-memory-system/docs/troubleshooting.md
+++ /dev/null
@@ -1,1155 +0,0 @@
-# Troubleshooting Guide
-
-This guide helps diagnose and resolve common issues with the SPARC Memory Bank system.
-
-## Quick Diagnostics
-
-### Health Check Script
-
-```typescript
-// System health check utility
-class HealthChecker {
- constructor(private memory: MemoryManager) {}
-
- async runHealthCheck(): Promise<HealthReport> {
- console.log('Running SPARC Memory Bank health check...\n');
-
- const report: HealthReport = {
- timestamp: new Date(),
- overall: 'healthy',
- checks: []
- };
-
- const checks = [
- this.checkConnection,
- this.checkStorage,
- this.checkCache,
- this.checkIndexes,
- this.checkPermissions,
- this.checkPerformance,
- this.checkSecurity
- ];
-
- for (const check of checks) {
- try {
- const result = await check.call(this);
- report.checks.push(result);
-
- if (result.status === 'error') {
- report.overall = 'unhealthy';
- } else if (result.status === 'warning' && report.overall === 'healthy') {
- report.overall = 'degraded';
- }
- } catch (error) {
- report.checks.push({
- name: check.name,
- status: 'error',
- message: `Health check failed: ${error.message}`,
- details: { error: error.stack }
- });
- report.overall = 'unhealthy';
- }
- }
-
- this.printHealthReport(report);
- return report;
- }
-
- private async checkConnection(): Promise<HealthCheckResult> {
- try {
- await this.memory.getStatistics();
- return {
- name: 'Connection',
- status: 'ok',
- message: 'Successfully connected to memory backend'
- };
- } catch (error) {
- return {
- name: 'Connection',
- status: 'error',
- message: 'Failed to connect to memory backend',
- details: { error: error.message }
- };
- }
- }
-
- private async checkStorage(): Promise<HealthCheckResult> {
- try {
- const stats = await this.memory.getStatistics();
- const storageUsage = stats.storageSize / (1024 * 1024 * 1024); // GB
-
- if (storageUsage > 100) { // > 100GB
- return {
- name: 'Storage',
- status: 'warning',
- message: `High storage usage: ${storageUsage.toFixed(2)} GB`,
- details: { storageSize: stats.storageSize }
- };
- }
-
- return {
- name: 'Storage',
- status: 'ok',
- message: `Storage usage: ${storageUsage.toFixed(2)} GB`,
- details: { storageSize: stats.storageSize }
- };
- } catch (error) {
- return {
- name: 'Storage',
- status: 'error',
- message: 'Failed to check storage status',
- details: { error: error.message }
- };
- }
- }
-
- private async checkCache(): Promise<HealthCheckResult> {
- try {
- const stats = await this.memory.getStatistics();
- const hitRate = stats.cacheStats.hitRate;
-
- if (hitRate < 0.5) {
- return {
- name: 'Cache',
- status: 'warning',
- message: `Low cache hit rate: ${(hitRate * 100).toFixed(1)}%`,
- details: stats.cacheStats
- };
- }
-
- return {
- name: 'Cache',
- status: 'ok',
- message: `Cache hit rate: ${(hitRate * 100).toFixed(1)}%`,
- details: stats.cacheStats
- };
- } catch (error) {
- return {
- name: 'Cache',
- status: 'error',
- message: 'Failed to check cache status',
- details: { error: error.message }
- };
- }
- }
-
- private async checkIndexes(): Promise<HealthCheckResult> {
- try {
- // Test basic query performance
- const startTime = performance.now();
- await this.memory.query({ limit: 1 });
- const queryTime = performance.now() - startTime;
-
- if (queryTime > 1000) { // > 1 second
- return {
- name: 'Indexes',
- status: 'warning',
- message: `Slow query performance: ${queryTime.toFixed(0)}ms`,
- details: { queryTime }
- };
- }
-
- return {
- name: 'Indexes',
- status: 'ok',
- message: `Query performance: ${queryTime.toFixed(0)}ms`,
- details: { queryTime }
- };
- } catch (error) {
- return {
- name: 'Indexes',
- status: 'error',
- message: 'Failed to test index performance',
- details: { error: error.message }
- };
- }
- }
-
- private async checkPermissions(): Promise<HealthCheckResult> {
- try {
- // Test basic operations
- const testItem = await this.memory.store({
- category: 'health-check',
- content: 'Test item for health check',
- tags: ['test', 'health-check']
- });
-
- const retrieved = await this.memory.retrieve(testItem.id);
- if (!retrieved) {
- throw new Error('Failed to retrieve test item');
- }
-
- await this.memory.delete(testItem.id);
-
- return {
- name: 'Permissions',
- status: 'ok',
- message: 'All basic operations working correctly'
- };
- } catch (error) {
- return {
- name: 'Permissions',
- status: 'error',
- message: 'Permission or operation error',
- details: { error: error.message }
- };
- }
- }
-
- private async checkPerformance(): Promise<HealthCheckResult> {
- try {
- const stats = await this.memory.getStatistics();
- const avgQueryTime = stats.performance.averageQueryTime;
-
- if (avgQueryTime > 100) { // > 100ms
- return {
- name: 'Performance',
- status: 'warning',
- message: `High average query time: ${avgQueryTime.toFixed(0)}ms`,
- details: stats.performance
- };
- }
-
- return {
- name: 'Performance',
- status: 'ok',
- message: `Average query time: ${avgQueryTime.toFixed(0)}ms`,
- details: stats.performance
- };
- } catch (error) {
- return {
- name: 'Performance',
- status: 'error',
- message: 'Failed to check performance metrics',
- details: { error: error.message }
- };
- }
- }
-
- private async checkSecurity(): Promise<HealthCheckResult> {
- try {
- // Check if encryption is enabled for production
- const isProduction = process.env.NODE_ENV === 'production';
- const config = await this.memory.getConfig();
-
- if (isProduction && !config.security?.encryption?.enabled) {
- return {
- name: 'Security',
- status: 'warning',
- message: 'Encryption not enabled in production environment',
- details: { encryption: false }
- };
- }
-
- return {
- name: 'Security',
- status: 'ok',
- message: 'Security configuration appears correct',
- details: {
- encryption: config.security?.encryption?.enabled || false,
- authentication: config.security?.authentication?.enabled || false
- }
- };
- } catch (error) {
- return {
- name: 'Security',
- status: 'error',
- message: 'Failed to check security configuration',
- details: { error: error.message }
- };
- }
- }
-
- private printHealthReport(report: HealthReport): void {
- console.log(`=== HEALTH CHECK REPORT ===`);
- console.log(`Timestamp: ${report.timestamp.toISOString()}`);
- console.log(`Overall Status: ${report.overall.toUpperCase()}\n`);
-
- report.checks.forEach(check => {
- const statusIcon = this.getStatusIcon(check.status);
- console.log(`${statusIcon} ${check.name}: ${check.message}`);
-
- if (check.details && check.status !== 'ok') {
- console.log(` Details: ${JSON.stringify(check.details, null, 2)}`);
- }
- });
-
- console.log('\n' + '='.repeat(30));
- }
-
- private getStatusIcon(status: string): string {
- switch (status) {
- case 'ok': return '✅';
- case 'warning': return '⚠️';
- case 'error': return '❌';
- default: return '❓';
- }
- }
-}
-
-interface HealthReport {
- timestamp: Date;
- overall: 'healthy' | 'degraded' | 'unhealthy';
- checks: HealthCheckResult[];
-}
-
-interface HealthCheckResult {
- name: string;
- status: 'ok' | 'warning' | 'error';
- message: string;
- details?: Record<string, any>;
-}
-```
-
-## Common Issues and Solutions
-
-### Installation and Setup Issues
-
-#### Issue: Module Import Errors
-
-```bash
-Error: Cannot find module '@sparc/memory-bank'
-```
-
-**Solution:**
-```bash
-# For npm projects
-npm install @sparc/memory-bank
-
-# For Deno projects
-# Ensure correct import URL
-import { MemoryManager } from 'https://deno.land/x/sparc_memory@latest/mod.ts';
-
-# Check deno.json imports configuration
-{
- "imports": {
- "@sparc/memory": "https://deno.land/x/sparc_memory@latest/mod.ts"
- }
-}
-```
-
-#### Issue: Database Initialization Fails
-
-```bash
-Error: SQLITE_CANTOPEN: unable to open database file
-```
-
-**Solution:**
-```typescript
-// Ensure directory exists
-import { ensureDir } from 'https://deno.land/[email protected]/fs/mod.ts';
-import { dirname } from 'https://deno.land/[email protected]/path/mod.ts';
-
-const dbPath = './data/memory.db';
-await ensureDir(dirname(dbPath));
-
-// Check file permissions
-const memory = new MemoryManager({
- backend: 'sqlite',
- storage: {
- path: dbPath,
- options: {
- // Ensure proper permissions
- busyTimeout: 30000,
- maxConnections: 1 // Start with single connection
- }
- }
-});
-```
-
-#### Issue: Permission Denied on File System
-
-```bash
-Error: EACCES: permission denied, open '/var/lib/memory/memory.db'
-```
-
-**Solution:**
-```bash
-# Fix file permissions
-sudo chown -R $USER:$USER /var/lib/memory
-sudo chmod -R 755 /var/lib/memory
-
-# Or use user directory
-mkdir -p ~/.cache/memory
-# Update config to use user directory
-```
-
-### Runtime Errors
-
-#### Issue: Memory Out of Bounds
-
-```bash
-JavaScript heap out of memory
-```
-
-**Solution:**
-```typescript
-// Reduce cache size
-const memory = new MemoryManager({
- backend: 'sqlite',
- storage: { path: './memory.db' },
- cache: {
- enabled: true,
- maxSize: 128 * 1024 * 1024, // Reduce to 128MB
- strategy: 'lru'
- }
-});
-
-// Use pagination for large queries
-const largeCategoryItems = await memory.query({
- category: 'large-category',
- limit: 100, // Paginate results
- offset: 0
-});
-
-// Process in batches
-for (let offset = 0; offset < 10000; offset += 100) {
- const batch = await memory.query({
- category: 'processing',
- limit: 100,
- offset
- });
-
- // Process batch
- await processBatch(batch);
-}
-```
-
-#### Issue: Database Locked
-
-```bash
-Error: SQLITE_BUSY: database is locked
-```
-
-**Solution:**
-```typescript
-// Increase busy timeout
-const memory = new MemoryManager({
- backend: 'sqlite',
- storage: {
- path: './memory.db',
- options: {
- busyTimeout: 60000, // 60 seconds
- journalMode: 'WAL', // Better concurrency
- maxConnections: 10, // Connection pooling
- retryAttempts: 5 // Retry on busy
- }
- }
-});
-
-// Use WAL mode for better concurrency
-// WAL mode allows multiple readers with one writer
-```
-
-#### Issue: Slow Query Performance
-
-```bash
-Query taking over 10 seconds to complete
-```
-
-**Solution:**
-```typescript
-// Add indexes for frequently queried fields
-const optimizedConfig = {
- backend: 'sqlite',
- storage: {
- path: './memory.db',
- options: {
- pragmaOptimize: true,
- optimizeInterval: 3600000 // Optimize every hour
- }
- },
- indexing: {
- enabled: true,
- customIndexes: [
- 'category', // Index category field
- 'namespace', // Index namespace field
- 'created', // Index created timestamp
- 'metadata.status' // Index JSON fields
- ]
- }
-};
-
-// Use more specific queries
-const specific = await memory.query({
- category: 'task', // Use indexed field
- namespace: 'project-a', // Use indexed field
- limit: 50, // Limit results
- sortBy: 'created', // Use indexed sort field
- dateRange: { // Use date range instead of full scan
- start: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
- field: 'created'
- }
-});
-```
-
-### Cache Issues
-
-#### Issue: Low Cache Hit Rate
-
-```typescript
-// Check cache statistics
-const stats = await memory.getStatistics();
-console.log(`Cache hit rate: ${(stats.cacheStats.hitRate * 100).toFixed(1)}%`);
-
-if (stats.cacheStats.hitRate < 0.7) {
- // Solutions:
-
- // 1. Increase cache size
- await memory.updateConfig({
- cache: {
- maxSize: 512 * 1024 * 1024 // Increase to 512MB
- }
- });
-
- // 2. Change cache strategy
- await memory.updateConfig({
- cache: {
- strategy: 'adaptive' // Adapts to access patterns
- }
- });
-
- // 3. Implement cache warming
- const hotCategories = ['task', 'implementation', 'research'];
- for (const category of hotCategories) {
- await memory.query({ category, limit: 100 });
- }
-}
-```
-
-#### Issue: Cache Memory Leaks
-
-```typescript
-// Monitor cache memory usage
-const monitorCache = setInterval(async () => {
- const stats = await memory.getStatistics();
- const memoryUsage = process.memoryUsage();
-
- console.log({
- cacheSize: stats.cacheStats.memoryUsage,
- heapUsed: memoryUsage.heapUsed,
- heapTotal: memoryUsage.heapTotal
- });
-
- // Detect memory growth
- if (memoryUsage.heapUsed > 1024 * 1024 * 1024) { // > 1GB
- console.warn('High memory usage detected');
-
- // Force cache cleanup
- await memory.clearCache();
-
- // Force garbage collection if available
- if (global.gc) {
- global.gc();
- }
- }
-}, 30000); // Check every 30 seconds
-
-// Clear monitoring when done
-// clearInterval(monitorCache);
-```
-
-### Vector Search Issues
-
-#### Issue: Embedding Service Timeouts
-
-```bash
-Error: Request timeout calling embedding service
-```
-
-**Solution:**
-```typescript
-// Configure robust embedding service
-const robustConfig = {
- indexing: {
- enabled: true,
- vectorSearch: {
- enabled: true,
- embeddingService: {
- provider: 'openai',
- openai: {
- apiKey: process.env.OPENAI_API_KEY,
- timeout: 30000, // 30 second timeout
- retries: 3, // Retry failed requests
- retryDelay: 1000, // 1 second between retries
- requestsPerMinute: 500, // Rate limiting
- batchSize: 50 // Process in smaller batches
- }
- },
- // Fallback to local embeddings if API fails
- fallbackService: {
- provider: 'local',
- local: {
- endpoint: 'http://localhost:8080/embeddings',
- timeout: 10000
- }
- }
- }
- }
-};
-
-// Implement retry logic for embedding generation
-async function generateEmbeddingWithRetry(text: string, maxRetries = 3): Promise<number[]> {
- let lastError: Error;
-
- for (let attempt = 1; attempt <= maxRetries; attempt++) {
- try {
- return await memory.generateEmbedding(text);
- } catch (error) {
- lastError = error as Error;
- console.warn(`Embedding attempt ${attempt} failed:`, error.message);
-
- if (attempt < maxRetries) {
- const delay = Math.pow(2, attempt) * 1000; // Exponential backoff
- await new Promise(resolve => setTimeout(resolve, delay));
- }
- }
- }
-
- throw lastError!;
-}
-```
-
-#### Issue: Vector Search Returns No Results
-
-```typescript
-// Debug vector search issues
-async function debugVectorSearch(query: string): Promise<void> {
- console.log(`Debugging vector search for: "${query}"`);
-
- // Check if embeddings exist
- const stats = await memory.getStatistics();
- console.log(`Total items with embeddings: ${stats.embeddingStats.totalEmbeddings}`);
-
- if (stats.embeddingStats.totalEmbeddings === 0) {
- console.log('No embeddings found. Generating embeddings for existing items...');
-
- // Generate embeddings for existing items
- const items = await memory.query({ limit: 100 });
- for (const item of items) {
- if (!item.embedding) {
- try {
- await memory.generateEmbedding(item.content);
- await memory.update(item.id, { embedding: item.embedding });
- } catch (error) {
- console.warn(`Failed to generate embedding for item ${item.id}:`, error);
- }
- }
- }
- }
-
- // Test with different thresholds
- const thresholds = [0.9, 0.8, 0.7, 0.6, 0.5];
-
- for (const threshold of thresholds) {
- const results = await memory.vectorSearch({
- text: query,
- threshold,
- limit: 5
- });
-
- console.log(`Threshold ${threshold}: ${results.length} results`);
- if (results.length > 0) {
- console.log(`Best match: ${results[0].similarity.toFixed(3)} - ${results[0].item.content.substring(0, 100)}...`);
- }
- }
-}
-
-// Check embedding dimensions
-async function validateEmbeddings(): Promise<void> {
- const sampleItem = await memory.query({ limit: 1 });
-
- if (sampleItem.length > 0 && sampleItem[0].embedding) {
- const dimensions = sampleItem[0].embedding.length;
- console.log(`Embedding dimensions: ${dimensions}`);
-
- // Ensure all embeddings have consistent dimensions
- const inconsistentItems = await memory.query({
- // Custom query to find items with different embedding sizes
- customWhere: `LENGTH(embedding) != ${dimensions * 8}` // 8 bytes per float64
- });
-
- if (inconsistentItems.length > 0) {
- console.warn(`Found ${inconsistentItems.length} items with inconsistent embedding dimensions`);
- }
- }
-}
-```
-
-### Replication and Sync Issues
-
-#### Issue: Conflict Resolution Failures
-
-```typescript
-// Handle CRDT conflicts manually
-class ConflictResolver {
- async resolveConflict(
- localItem: MemoryItem,
- remoteItem: MemoryItem
- ): Promise<MemoryItem> {
- console.log(`Resolving conflict for item ${localItem.id}`);
-
- // Compare vector clocks
- const localClock = localItem.vectorClock;
- const remoteClock = remoteItem.vectorClock;
-
- // Determine which item is more recent
- const localIsNewer = this.isVectorClockNewer(localClock, remoteClock);
- const remoteIsNewer = this.isVectorClockNewer(remoteClock, localClock);
-
- if (localIsNewer && !remoteIsNewer) {
- return localItem; // Local wins
- } else if (remoteIsNewer && !localIsNewer) {
- return remoteItem; // Remote wins
- } else {
- // Concurrent update - merge
- return this.mergeItems(localItem, remoteItem);
- }
- }
-
- private isVectorClockNewer(clock1: VectorClock, clock2: VectorClock): boolean {
- let hasGreater = false;
-
- // Check all agents in both clocks
- const allAgents = new Set([...Object.keys(clock1), ...Object.keys(clock2)]);
-
- for (const agent of allAgents) {
- const time1 = clock1[agent] || 0;
- const time2 = clock2[agent] || 0;
-
- if (time1 < time2) {
- return false; // clock1 is not newer
- } else if (time1 > time2) {
- hasGreater = true;
- }
- }
-
- return hasGreater;
- }
-
- private mergeItems(item1: MemoryItem, item2: MemoryItem): MemoryItem {
- // Use Last Writer Wins for content (based on updated timestamp)
- const newerItem = item1.updated > item2.updated ? item1 : item2;
- const olderItem = item1.updated > item2.updated ? item2 : item1;
-
- // Merge tags (union)
- const mergedTags = Array.from(new Set([...item1.tags, ...item2.tags]));
-
- // Merge metadata (newer item's metadata takes precedence)
- const mergedMetadata = {
- ...olderItem.metadata,
- ...newerItem.metadata
- };
-
- // Merge vector clocks
- const mergedClock: VectorClock = {};
- const allAgents = new Set([
- ...Object.keys(item1.vectorClock),
- ...Object.keys(item2.vectorClock)
- ]);
-
- for (const agent of allAgents) {
- mergedClock[agent] = Math.max(
- item1.vectorClock[agent] || 0,
- item2.vectorClock[agent] || 0
- );
- }
-
- return {
- ...newerItem,
- tags: mergedTags,
- metadata: mergedMetadata,
- vectorClock: mergedClock,
- version: Math.max(item1.version, item2.version) + 1
- };
- }
-}
-```
-
-### Network and Connectivity Issues
-
-#### Issue: Connection Timeouts
-
-```typescript
-// Implement connection resilience
-class ResilientMemoryManager extends MemoryManager {
- private maxRetries = 3;
- private baseDelay = 1000; // 1 second
-
- async store(data: Partial<MemoryItem>): Promise<MemoryItem> {
- return this.withRetry(() => super.store(data));
- }
-
- async query(query: MemoryQuery): Promise<MemoryItem[]> {
- return this.withRetry(() => super.query(query));
- }
-
- private async withRetry<T>(operation: () => Promise<T>): Promise<T> {
- let lastError: Error;
-
- for (let attempt = 1; attempt <= this.maxRetries; attempt++) {
- try {
- return await operation();
- } catch (error) {
- lastError = error as Error;
-
- if (this.isRetryableError(error)) {
- const delay = this.baseDelay * Math.pow(2, attempt - 1);
- console.warn(`Attempt ${attempt} failed, retrying in ${delay}ms:`, error.message);
- await new Promise(resolve => setTimeout(resolve, delay));
- } else {
- throw error; // Don't retry non-retryable errors
- }
- }
- }
-
- throw lastError!;
- }
-
- private isRetryableError(error: any): boolean {
- const retryableErrors = [
- 'ECONNRESET',
- 'ECONNREFUSED',
- 'ETIMEDOUT',
- 'SQLITE_BUSY',
- 'SQLITE_LOCKED'
- ];
-
- return retryableErrors.some(code =>
- error.code === code || error.message.includes(code)
- );
- }
-}
-```
-
-## Diagnostic Tools
-
-### Log Analysis
-
-```typescript
-// Log analyzer for debugging
-class LogAnalyzer {
- async analyzeMemoryLogs(logPath: string): Promise<LogAnalysis> {
- const logContent = await Deno.readTextFile(logPath);
- const lines = logContent.split('\n').filter(line => line.trim());
-
- const analysis: LogAnalysis = {
- totalLines: lines.length,
- errors: [],
- warnings: [],
- performance: {
- slowQueries: [],
- highMemoryUsage: [],
- cacheIssues: []
- },
- patterns: new Map()
- };
-
- for (const line of lines) {
- try {
- const entry = JSON.parse(line);
- this.analyzeLine(entry, analysis);
- } catch {
- // Skip non-JSON lines
- }
- }
-
- return analysis;
- }
-
- private analyzeLine(entry: any, analysis: LogAnalysis): void {
- // Track error patterns
- if (entry.level === 'error') {
- analysis.errors.push({
- timestamp: entry.timestamp,
- message: entry.message,
- details: entry.details
- });
- }
-
- // Track warning patterns
- if (entry.level === 'warn') {
- analysis.warnings.push({
- timestamp: entry.timestamp,
- message: entry.message,
- details: entry.details
- });
- }
-
- // Analyze performance issues
- if (entry.operation && entry.duration) {
- if (entry.duration > 1000) { // > 1 second
- analysis.performance.slowQueries.push({
- operation: entry.operation,
- duration: entry.duration,
- timestamp: entry.timestamp
- });
- }
- }
-
- // Track patterns
- const pattern = this.extractPattern(entry);
- if (pattern) {
- const count = analysis.patterns.get(pattern) || 0;
- analysis.patterns.set(pattern, count + 1);
- }
- }
-
- private extractPattern(entry: any): string | null {
- if (entry.error) {
- return `ERROR: ${entry.error.type || 'Unknown'}`;
- }
- if (entry.operation) {
- return `OPERATION: ${entry.operation}`;
- }
- return null;
- }
-}
-
-interface LogAnalysis {
- totalLines: number;
- errors: LogEntry[];
- warnings: LogEntry[];
- performance: {
- slowQueries: PerformanceIssue[];
- highMemoryUsage: PerformanceIssue[];
- cacheIssues: PerformanceIssue[];
- };
- patterns: Map<string, number>;
-}
-
-interface LogEntry {
- timestamp: string;
- message: string;
- details?: any;
-}
-
-interface PerformanceIssue {
- operation: string;
- duration?: number;
- timestamp: string;
-}
-```
-
-### Performance Profiler
-
-```typescript
-// Performance profiling utility
-class PerformanceProfiler {
- private profiles: Map<string, ProfileData> = new Map();
-
- async profileOperation<T>(
- name: string,
- operation: () => Promise<T>
- ): Promise<T> {
- const startTime = performance.now();
- const startMemory = process.memoryUsage();
-
- try {
- const result = await operation();
-
- const endTime = performance.now();
- const endMemory = process.memoryUsage();
-
- this.recordProfile(name, {
- duration: endTime - startTime,
- memoryDelta: endMemory.heapUsed - startMemory.heapUsed,
- success: true
- });
-
- return result;
- } catch (error) {
- const endTime = performance.now();
-
- this.recordProfile(name, {
- duration: endTime - startTime,
- memoryDelta: 0,
- success: false,
- error: error.message
- });
-
- throw error;
- }
- }
-
- private recordProfile(name: string, data: ProfileMeasurement): void {
- let profile = this.profiles.get(name);
-
- if (!profile) {
- profile = {
- name,
- count: 0,
- totalDuration: 0,
- totalMemoryDelta: 0,
- minDuration: Infinity,
- maxDuration: 0,
- errors: 0
- };
- this.profiles.set(name, profile);
- }
-
- profile.count++;
- profile.totalDuration += data.duration;
- profile.totalMemoryDelta += data.memoryDelta;
- profile.minDuration = Math.min(profile.minDuration, data.duration);
- profile.maxDuration = Math.max(profile.maxDuration, data.duration);
-
- if (!data.success) {
- profile.errors++;
- }
- }
-
- getProfileReport(): ProfileReport {
- const profiles = Array.from(this.profiles.values()).map(profile => ({
- ...profile,
- avgDuration: profile.totalDuration / profile.count,
- avgMemoryDelta: profile.totalMemoryDelta / profile.count,
- errorRate: profile.errors / profile.count
- }));
-
- return {
- profiles: profiles.sort((a, b) => b.avgDuration - a.avgDuration),
- summary: {
- totalOperations: profiles.reduce((sum, p) => sum + p.count, 0),
- totalErrors: profiles.reduce((sum, p) => sum + p.errors, 0),
- avgDuration: profiles.reduce((sum, p) => sum + p.avgDuration, 0) / profiles.length
- }
- };
- }
-
- printProfileReport(): void {
- const report = this.getProfileReport();
-
- console.log('\n=== PERFORMANCE PROFILE REPORT ===\n');
- console.log(`Total operations: ${report.summary.totalOperations}`);
- console.log(`Total errors: ${report.summary.totalErrors}`);
- console.log(`Average duration: ${report.summary.avgDuration.toFixed(2)}ms\n`);
-
- console.log('Top operations by average duration:');
- report.profiles.slice(0, 10).forEach((profile, index) => {
- console.log(`${index + 1}. ${profile.name}`);
- console.log(` Avg: ${profile.avgDuration.toFixed(2)}ms, Count: ${profile.count}, Errors: ${profile.errorRate.toFixed(2)}%`);
- });
- }
-}
-
-interface ProfileMeasurement {
- duration: number;
- memoryDelta: number;
- success: boolean;
- error?: string;
-}
-
-interface ProfileData {
- name: string;
- count: number;
- totalDuration: number;
- totalMemoryDelta: number;
- minDuration: number;
- maxDuration: number;
- errors: number;
-}
-
-interface ProfileReport {
- profiles: (ProfileData & {
- avgDuration: number;
- avgMemoryDelta: number;
- errorRate: number;
- })[];
- summary: {
- totalOperations: number;
- totalErrors: number;
- avgDuration: number;
- };
-}
-```
-
-## Getting Help
-
-### Debug Mode
-
-```typescript
-// Enable comprehensive debugging
-const debugConfig = {
- backend: 'sqlite',
- storage: {
- path: './debug.db',
- options: {
- logQueries: true,
- explainQueryPlan: true,
- queryTimeout: 30000
- }
- },
- system: {
- logging: {
- level: 'debug',
- enableQueryProfiling: true,
- enableSlowQueryLog: true,
- slowQueryThreshold: 10, // Log queries > 10ms
- enableMemoryProfiling: true,
- enableTracing: true
- }
- }
-};
-
-const debugMemory = new MemoryManager(debugConfig);
-
-// Enable verbose error reporting
-debugMemory.on('error', (error) => {
- console.error('Memory Manager Error:', {
- message: error.message,
- stack: error.stack,
- code: error.code,
- details: error.details
- });
-});
-
-debugMemory.on('warning', (warning) => {
- console.warn('Memory Manager Warning:', warning);
-});
-```
-
-### Support Information
-
-When reporting issues, please include:
-
-1. **Environment Information:**
- ```bash
- deno --version
- # or
- node --version
- npm --version
- ```
-
-2. **Configuration:**
- ```typescript
- const config = await memory.getConfig();
- console.log(JSON.stringify(config, null, 2));
- ```
-
-3. **System Statistics:**
- ```typescript
- const stats = await memory.getStatistics();
- console.log(JSON.stringify(stats, null, 2));
- ```
-
-4. **Health Check Results:**
- ```typescript
- const healthChecker = new HealthChecker(memory);
- const report = await healthChecker.runHealthCheck();
- ```
-
-5. **Recent Log Entries:**
- ```typescript
- // Include recent error logs and stack traces
- ```
-
-### Community Resources
-
-- **GitHub Issues**: Report bugs and feature requests
-- **Documentation**: Complete API documentation
-- **Examples**: Working code examples
-- **Discord/Slack**: Community chat for quick help
-- **Stack Overflow**: Tag your questions with `sparc-memory-bank`
-
-This troubleshooting guide should help you diagnose and resolve most common issues with the SPARC Memory Bank system. For issues not covered here, please refer to the community resources or file a detailed bug report.
\ No newline at end of file
diff --git a/archive/legacy-memory-system/docs/usage.md b/archive/legacy-memory-system/docs/usage.md
deleted file mode 100644
index 8baaecfcdb..0000000000
--- a/archive/legacy-memory-system/docs/usage.md
+++ /dev/null
@@ -1,629 +0,0 @@
-# Usage Guide
-
-## Getting Started
-
-### Installation
-
-```bash
-# Using npm
-npm install @sparc/memory-bank
-
-# Using deno
-import { MemoryManager } from 'https://deno.land/x/sparc_memory@latest/mod.ts';
-```
-
-### Basic Setup
-
-```typescript
-import { MemoryManager } from '@sparc/memory-bank';
-
-// Create memory manager with SQLite backend
-const memory = new MemoryManager({
- backend: 'sqlite',
- storage: {
- path: './data/memory.db'
- },
- cache: {
- enabled: true,
- maxSize: 100 * 1024 * 1024, // 100MB
- strategy: 'lru'
- },
- indexing: {
- enabled: true,
- vectorSearch: true,
- fullTextSearch: true
- }
-});
-
-// Initialize the system
-await memory.initialize();
-
-// Use the memory system
-const item = await memory.store({
- category: 'task',
- content: 'Implement user authentication system',
- tags: ['auth', 'security', 'backend']
-});
-
-console.log(`Stored item: ${item.id}`);
-```
-
-## Core Operations
-
-### Storing Information
-
-```typescript
-// Simple storage
-const task = await memory.store({
- category: 'task',
- content: 'Design database schema for user management',
- tags: ['database', 'users', 'schema']
-});
-
-// Storage with metadata
-const research = await memory.store({
- category: 'research',
- content: 'Analysis of authentication patterns in modern web applications',
- tags: ['auth', 'web', 'security', 'patterns'],
- metadata: {
- source: 'IEEE Computer Society',
- author: 'Dr. Smith',
- confidence: 0.9,
- relevance: 'high',
- dateAnalyzed: new Date('2024-01-15')
- }
-});
-
-// Storage with namespace isolation
-const projectItem = await memory.store({
- category: 'implementation',
- content: 'Implemented OAuth 2.0 flow with PKCE',
- tags: ['oauth', 'security', 'implementation'],
- namespace: 'project-alpha',
- metadata: {
- project: 'project-alpha',
- sprint: 'sprint-3',
- story: 'US-123',
- assignee: '[email protected]'
- }
-});
-```
-
-### Retrieving Information
-
-```typescript
-// Retrieve by ID
-const item = await memory.retrieve('item-12345');
-if (item) {
- console.log(item.content);
-}
-
-// Batch retrieval
-const items = await memory.retrieveBatch(['id1', 'id2', 'id3']);
-const validItems = items.filter(item => item !== null);
-```
-
-### Querying and Search
-
-#### Basic Queries
-
-```typescript
-// Find all tasks
-const tasks = await memory.query({
- category: 'task'
-});
-
-// Find items with specific tags
-const authItems = await memory.query({
- tags: ['auth', 'security'] // Must have ALL tags
-});
-
-// Find items with any of the specified tags
-const webItems = await memory.query({
- tagsAny: ['web', 'mobile', 'api'] // Must have ANY tag
-});
-```
-
-#### Advanced Queries
-
-```typescript
-// Complex query with multiple criteria
-const results = await memory.query({
- categories: ['task', 'implementation'],
- tags: ['auth'],
- fullText: 'OAuth authentication',
- dateRange: {
- start: new Date('2024-01-01'),
- end: new Date('2024-12-31'),
- field: 'updated'
- },
- metadata: {
- priority: 'high',
- status: 'completed'
- },
- limit: 20,
- sortBy: 'updated',
- sortOrder: 'desc'
-});
-
-console.log(`Found ${results.length} matching items`);
-```
-
-#### Full-Text Search
-
-```typescript
-// Simple full-text search
-const searchResults = await memory.fullTextSearch('authentication security');
-
-// Advanced full-text search with options
-const advancedResults = await memory.fullTextSearch('user management', {
- categories: ['task', 'research'],
- highlight: true,
- stemming: true,
- fuzzy: true,
- limit: 10
-});
-```
-
-#### Vector Similarity Search
-
-```typescript
-// Semantic similarity search
-const similarItems = await memory.vectorSearch({
- text: 'user authentication and security protocols',
- threshold: 0.7,
- limit: 5,
- categories: ['research', 'implementation']
-});
-
-for (const result of similarItems) {
- console.log(`${result.item.content} (similarity: ${result.similarity.toFixed(3)})`);
-}
-
-// Search using existing item as reference
-const referenceItem = await memory.retrieve('existing-item-id');
-if (referenceItem?.embedding) {
- const relatedItems = await memory.vectorSearch({
- embedding: referenceItem.embedding,
- threshold: 0.6,
- excludeIds: [referenceItem.id] // Exclude the reference item itself
- });
-}
-```
-
-### Updating Information
-
-```typescript
-// Simple update
-const updatedItem = await memory.update('item-123', {
- content: 'Updated implementation notes for OAuth 2.0',
- tags: ['oauth', 'security', 'completed']
-});
-
-// Update with metadata changes
-const taskUpdate = await memory.update('task-456', {
- metadata: {
- ...existingItem.metadata,
- status: 'completed',
- completedAt: new Date(),
- reviewer: '[email protected]'
- }
-});
-
-// Conditional update (only if version matches)
-try {
- const updated = await memory.update('item-789', {
- content: 'New content',
- expectedVersion: currentItem.version // Prevents lost updates
- });
-} catch (error) {
- if (error.code === 'VERSION_CONFLICT') {
- // Handle conflict - reload and retry
- const latest = await memory.retrieve('item-789');
- // Merge changes and retry...
- }
-}
-```
-
-### Deleting Information
-
-```typescript
-// Delete single item
-const deleted = await memory.delete('item-123');
-if (deleted) {
- console.log('Item deleted successfully');
-}
-
-// Batch deletion
-const deletedItems = await memory.deleteBatch(['id1', 'id2', 'id3']);
-const successCount = deletedItems.filter(success => success).length;
-console.log(`Deleted ${successCount} items`);
-
-// Conditional deletion with query
-const oldItems = await memory.query({
- dateRange: {
- end: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000), // 30 days ago
- field: 'updated'
- },
- metadata: {
- status: 'archived'
- }
-});
-
-for (const item of oldItems) {
- await memory.delete(item.id);
-}
-```
-
-## Advanced Usage Patterns
-
-### Multi-Agent Collaboration
-
-```typescript
-// Agent A stores information
-const agentA = new MemoryManager({
- backend: 'sqlite',
- storage: { path: './shared-memory.db' },
- replication: {
- enabled: true,
- agentId: 'agent-a',
- peers: ['agent-b', 'agent-c']
- }
-});
-
-const taskFromA = await agentA.store({
- category: 'task',
- content: 'Research authentication best practices',
- tags: ['research', 'auth'],
- metadata: {
- assignedBy: 'agent-a',
- priority: 'high'
- }
-});
-
-// Agent B retrieves and updates
-const agentB = new MemoryManager({
- backend: 'sqlite',
- storage: { path: './shared-memory.db' },
- replication: {
- enabled: true,
- agentId: 'agent-b',
- peers: ['agent-a', 'agent-c']
- }
-});
-
-const task = await agentB.retrieve(taskFromA.id);
-if (task) {
- const updated = await agentB.update(task.id, {
- content: task.content + '\n\nCompleted literature review of OAuth 2.1 specifications.',
- metadata: {
- ...task.metadata,
- status: 'in-progress',
- lastWorkedBy: 'agent-b',
- progress: 0.3
- }
- });
-}
-```
-
-### Namespace Isolation
-
-```typescript
-// Setup memory manager with namespace support
-const memory = new MemoryManager({
- backend: 'sqlite',
- storage: { path: './multi-tenant.db' },
- namespaces: {
- enabled: true,
- defaultNamespace: 'default',
- permissions: {
- 'project-a': {
- read: ['agent-1', 'agent-2'],
- write: ['agent-1'],
- admin: ['agent-1']
- },
- 'project-b': {
- read: ['agent-2', 'agent-3'],
- write: ['agent-2', 'agent-3'],
- admin: ['agent-2']
- }
- }
- }
-});
-
-// Store in specific namespace
-const projectATask = await memory.store({
- category: 'task',
- content: 'Implement user registration',
- tags: ['registration', 'users'],
- namespace: 'project-a'
-});
-
-// Query within namespace
-const projectATasks = await memory.query({
- category: 'task',
- namespace: 'project-a'
-});
-
-// Cross-namespace search (if permissions allow)
-const allTasks = await memory.query({
- category: 'task',
- namespaces: ['project-a', 'project-b'] // Search across multiple namespaces
-});
-```
-
-### Knowledge Graphs and Relationships
-
-```typescript
-// Store related items with references
-const parentTask = await memory.store({
- category: 'epic',
- content: 'User Management System',
- tags: ['epic', 'users', 'system'],
- metadata: {
- type: 'epic',
- estimatedEffort: '4 weeks',
- priority: 'high'
- }
-});
-
-const subtask1 = await memory.store({
- category: 'task',
- content: 'Design user database schema',
- tags: ['database', 'schema', 'users'],
- metadata: {
- type: 'task',
- parentId: parentTask.id,
- estimatedHours: 8,
- status: 'todo'
- }
-});
-
-const subtask2 = await memory.store({
- category: 'task',
- content: 'Implement user registration API',
- tags: ['api', 'registration', 'backend'],
- metadata: {
- type: 'task',
- parentId: parentTask.id,
- dependsOn: [subtask1.id],
- estimatedHours: 16,
- status: 'todo'
- }
-});
-
-// Query related items
-const subtasks = await memory.query({
- metadata: {
- parentId: parentTask.id
- }
-});
-
-// Find dependency chain
-const dependencies = await memory.query({
- metadata: {
- dependsOn: subtask1.id
- }
-});
-```
-
-### Temporal Queries and History
-
-```typescript
-// Track progress over time
-const progressUpdates = await memory.query({
- category: 'progress-update',
- metadata: {
- taskId: 'task-123'
- },
- sortBy: 'created',
- sortOrder: 'asc'
-});
-
-// Find recent activity
-const recentActivity = await memory.query({
- dateRange: {
- start: new Date(Date.now() - 24 * 60 * 60 * 1000), // Last 24 hours
- field: 'created'
- },
- sortBy: 'created',
- sortOrder: 'desc',
- limit: 50
-});
-
-// Track changes to specific items
-const itemHistory = await memory.query({
- metadata: {
- originalId: 'task-456', // Track versions of the same logical item
- type: 'version'
- },
- sortBy: 'created',
- sortOrder: 'asc'
-});
-```
-
-### Performance Optimization
-
-#### Batch Operations
-
-```typescript
-// Efficient bulk storage
-const itemsToStore = [
- { category: 'task', content: 'Task 1', tags: ['tag1'] },
- { category: 'task', content: 'Task 2', tags: ['tag2'] },
- { category: 'research', content: 'Finding 1', tags: ['research'] }
-];
-
-const storedItems = await memory.storeBatch(itemsToStore);
-console.log(`Stored ${storedItems.length} items in batch`);
-```
-
-#### Caching Strategies
-
-```typescript
-// Configure cache for different access patterns
-const readHeavyMemory = new MemoryManager({
- backend: 'sqlite',
- storage: { path: './read-heavy.db' },
- cache: {
- enabled: true,
- maxSize: 500 * 1024 * 1024, // 500MB cache
- strategy: 'lru', // Good for read-heavy workloads
- ttl: 60 * 60 * 1000 // 1 hour TTL
- }
-});
-
-// Query with cache hint
-const cachedResults = await memory.query({
- category: 'frequently-accessed',
- useCache: true, // Prefer cached results
- limit: 100
-});
-```
-
-#### Index Optimization
-
-```typescript
-// Optimize for specific query patterns
-const optimizedMemory = new MemoryManager({
- backend: 'sqlite',
- storage: { path: './optimized.db' },
- indexing: {
- enabled: true,
- vectorSearch: true,
- fullTextSearch: true,
- customIndexes: [
- 'category', // Index frequently queried fields
- 'metadata.status',
- 'metadata.priority',
- 'created'
- ]
- }
-});
-```
-
-## Error Handling
-
-```typescript
-import { MemoryError } from '@sparc/memory-bank';
-
-try {
- const item = await memory.store({
- category: 'task',
- content: 'Some content'
- });
-} catch (error) {
- if (error instanceof MemoryError) {
- switch (error.code) {
- case 'VALIDATION_ERROR':
- console.error('Invalid data:', error.details);
- break;
- case 'STORAGE_ERROR':
- console.error('Storage backend error:', error.message);
- break;
- case 'PERMISSION_DENIED':
- console.error('Access denied:', error.details);
- break;
- default:
- console.error('Memory operation failed:', error.message);
- }
- } else {
- console.error('Unexpected error:', error);
- }
-}
-```
-
-## Best Practices
-
-### Data Design
-
-1. **Use meaningful categories**: Choose descriptive, consistent category names
-2. **Tag strategically**: Use tags for faceted search, avoid over-tagging
-3. **Structure metadata**: Keep metadata flat and searchable
-4. **Consistent naming**: Use consistent naming conventions across agents
-
-```typescript
-// Good: Structured and consistent
-const goodItem = await memory.store({
- category: 'implementation', // Clear category
- content: 'Implemented JWT token validation middleware',
- tags: ['jwt', 'middleware', 'auth', 'validation'], // Specific, searchable tags
- metadata: {
- component: 'auth-service',
- language: 'typescript',
- complexity: 'medium',
- testCoverage: 0.85,
- codeReviewStatus: 'approved',
- deployedVersion: '1.2.3'
- }
-});
-
-// Avoid: Vague and inconsistent
-const badItem = await memory.store({
- category: 'stuff', // Too vague
- content: 'did some work', // Not descriptive
- tags: ['work', 'done', 'tuesday'], // Not useful for search
- metadata: {
- misc: 'random data',
- nested: {
- deep: {
- data: 'hard to query' // Deeply nested data
- }
- }
- }
-});
-```
-
-### Performance
-
-1. **Use batch operations** for bulk data
-2. **Configure cache** appropriately for your access patterns
-3. **Limit query results** to avoid memory issues
-4. **Use vector search** for semantic queries
-5. **Monitor performance** with statistics
-
-```typescript
-// Monitor and optimize
-const stats = await memory.getStatistics();
-if (stats.cacheStats.hitRate < 0.8) {
- console.warn('Consider increasing cache size or adjusting strategy');
-}
-
-if (stats.performance.averageQueryTime > 100) {
- console.warn('Queries are slow, consider adding indexes');
-}
-```
-
-### Security
-
-1. **Use namespaces** for multi-tenant scenarios
-2. **Enable encryption** for sensitive data
-3. **Validate inputs** before storing
-4. **Monitor access** with audit logs
-
-```typescript
-// Secure configuration
-const secureMemory = new MemoryManager({
- backend: 'sqlite',
- storage: { path: './secure.db' },
- security: {
- encryption: {
- enabled: true,
- algorithm: 'aes-256-gcm',
- keyDerivation: 'pbkdf2'
- },
- checksums: true,
- auditLog: true
- },
- namespaces: {
- enabled: true,
- permissions: {
- 'sensitive': {
- read: ['admin-agent'],
- write: ['admin-agent'],
- admin: ['admin-agent']
- }
- }
- }
-});
-```
\ No newline at end of file
diff --git a/archive/legacy-memory-system/examples/usage-example.ts b/archive/legacy-memory-system/examples/usage-example.ts
deleted file mode 100644
index 029d3a0037..0000000000
--- a/archive/legacy-memory-system/examples/usage-example.ts
+++ /dev/null
@@ -1,368 +0,0 @@
-/**
- * SPARC Memory Bank - Usage Examples
- * Demonstrates the complete functionality of the memory system
- */
-
-import {
- MemoryManager,
- MemoryItem,
- MemoryQuery,
- ImportExportManager,
- NamespaceManager
-} from '../src';
-
-async function main() {
- console.log('🧠 SPARC Memory Bank - Usage Examples\n');
-
- // 1. Initialize Memory Manager with SQLite backend
- console.log('1. Initializing Memory Manager...');
- const memoryManager = new MemoryManager({
- backend: 'sqlite',
- backendConfig: {
- path: './claude-flow-memory.db',
- wal: true
- },
- cacheConfig: {
- maxSize: 1000,
- ttl: 3600000, // 1 hour
- strategy: 'lru'
- },
- enableIndexing: true,
- enableNamespaces: true,
- replicationConfig: {
- mode: 'peer-to-peer',
- nodes: [
- { id: 'node1', url: 'http://localhost:3001' },
- { id: 'node2', url: 'http://localhost:3002' }
- ],
- syncInterval: 60000 // 1 minute
- }
- });
-
- await memoryManager.initialize();
- console.log('✅ Memory Manager initialized\n');
-
- // 2. Store different types of memory items
- console.log('2. Storing memory items...');
-
- // Agent calibration values
- await memoryManager.store({
- category: 'calibration',
- key: 'react-performance',
- value: {
- bundleSize: { max: 200000, optimal: 150000 },
- renderTime: { max: 16, optimal: 8 },
- memoryUsage: { max: 50000000, optimal: 30000000 }
- },
- metadata: {
- tags: ['react', 'performance', 'frontend'],
- confidence: 0.95,
- source: 'performance-testing'
- }
- });
-
- // TDD patterns
- await memoryManager.store({
- category: 'test-pattern',
- key: 'london-school-mocking',
- value: {
- pattern: 'Mock all collaborators',
- example: `
- describe('UserService', () => {
- let userService;
- let mockRepository;
-
- beforeEach(() => {
- mockRepository = jest.fn();
- userService = new UserService(mockRepository);
- });
-
- it('should save user', async () => {
- mockRepository.save = jest.fn().mockResolvedValue({ id: 1 });
- await userService.createUser({ name: 'Alice' });
- expect(mockRepository.save).toHaveBeenCalled();
- });
- });
- `,
- benefits: ['Fast tests', 'Isolated units', 'Clear boundaries'],
- drawbacks: ['More setup', 'Brittle to refactoring']
- },
- metadata: {
- tags: ['tdd', 'london-school', 'testing'],
- language: 'javascript'
- }
- });
-
- // Architectural decisions
- await memoryManager.store({
- category: 'architecture',
- key: 'adr-001-event-sourcing',
- value: {
- title: 'Use Event Sourcing for Audit Trail',
- status: 'accepted',
- context: 'Need complete audit trail of all system changes',
- decision: 'Implement event sourcing pattern',
- consequences: {
- positive: ['Complete audit trail', 'Time travel debugging', 'Event replay'],
- negative: ['Increased complexity', 'Storage requirements']
- }
- },
- metadata: {
- tags: ['architecture', 'event-sourcing', 'audit'],
- date: '2025-01-06',
- author: 'claude-architect'
- }
- });
-
- console.log('✅ Memory items stored\n');
-
- // 3. Query memory items
- console.log('3. Querying memory items...');
-
- // Query by category
- const calibrationItems = await memoryManager.query({
- categories: ['calibration']
- });
- console.log(`Found ${calibrationItems.length} calibration items`);
-
- // Query by tags
- const testingPatterns = await memoryManager.query({
- tags: ['testing']
- });
- console.log(`Found ${testingPatterns.length} testing patterns`);
-
- // Query with custom filter
- const recentDecisions = await memoryManager.query({
- categories: ['architecture'],
- filter: (item) => {
- const date = new Date(item.metadata?.date || 0);
- const thirtyDaysAgo = new Date();
- thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30);
- return date > thirtyDaysAgo;
- }
- });
- console.log(`Found ${recentDecisions.length} recent architectural decisions\n`);
-
- // 4. Namespace management
- console.log('4. Managing namespaces...');
-
- // Create project-specific namespace
- const projectNamespace = await memoryManager.store({
- category: 'project',
- key: 'ultrasonic-steganography',
- value: {
- name: 'Ultrasonic Steganography',
- description: 'Audio steganography using ultrasonic frequencies',
- status: 'in-progress',
- team: ['alice', 'bob', 'charlie']
- }
- }, 'ultrasonic-project');
-
- console.log('✅ Project namespace created\n');
-
- // 5. Vector search for semantic queries
- console.log('5. Vector search example...');
-
- // Store items with vector embeddings
- const indexer = (memoryManager as any).indexer;
-
- const doc1 = 'React performance optimization techniques for large applications';
- const embedding1 = await indexer.generateEmbedding(doc1);
-
- await memoryManager.store({
- category: 'knowledge',
- key: 'react-perf-guide',
- value: doc1,
- vectorEmbedding: embedding1,
- metadata: {
- type: 'guide',
- topic: 'performance'
- }
- });
-
- const doc2 = 'Testing strategies for microservices architecture';
- const embedding2 = await indexer.generateEmbedding(doc2);
-
- await memoryManager.store({
- category: 'knowledge',
- key: 'microservices-testing',
- value: doc2,
- vectorEmbedding: embedding2,
- metadata: {
- type: 'guide',
- topic: 'testing'
- }
- });
-
- // Search for similar documents
- const searchQuery = 'How to optimize React application performance';
- const searchEmbedding = await indexer.generateEmbedding(searchQuery);
-
- const similarDocs = await memoryManager.query({
- vectorSearch: {
- embedding: searchEmbedding,
- topK: 5,
- threshold: 0.7
- }
- });
-
- console.log(`Found ${similarDocs.length} similar documents\n`);
-
- // 6. Import/Export functionality
- console.log('6. Import/Export example...');
-
- const exportManager = new ImportExportManager();
-
- // Export to JSON
- const snapshot = await memoryManager.export({
- categories: ['calibration', 'test-pattern'],
- format: 'json'
- });
-
- console.log('✅ Exported snapshot to JSON');
-
- // Export to Markdown
- const markdownExport = await memoryManager.export({
- categories: ['architecture'],
- format: 'markdown'
- });
-
- console.log('✅ Exported architectural decisions to Markdown\n');
-
- // 7. Time-travel queries
- console.log('7. Time-travel query example...');
-
- const oneHourAgo = Date.now() - 3600000;
-
- const historicalItems = await memoryManager.query({
- asOf: oneHourAgo
- });
-
- console.log(`Found ${historicalItems.length} items from 1 hour ago\n`);
-
- // 8. Memory statistics
- console.log('8. Memory statistics...');
-
- const stats = await memoryManager.getStats();
- console.log('Memory Stats:', {
- totalItems: stats.backend.totalItems,
- categories: stats.backend.categories,
- cacheHitRate: stats.cache.hitRate,
- cacheSize: stats.cache.itemCount
- });
- console.log('');
-
- // 9. Conflict resolution example
- console.log('9. CRDT conflict resolution...');
-
- // Simulate concurrent updates
- const item1 = {
- id: 'shared-config',
- category: 'config',
- key: 'app-settings',
- value: { theme: 'light', language: 'en' },
- metadata: { timestamp: Date.now() - 1000 }
- };
-
- const item2 = {
- id: 'shared-config',
- category: 'config',
- key: 'app-settings',
- value: { theme: 'dark', notifications: true },
- metadata: { timestamp: Date.now() }
- };
-
- await memoryManager.store(item1);
- const resolved = await memoryManager.store(item2);
-
- console.log('Resolved conflict:', resolved.value);
- console.log('✅ Conflicts resolved using CRDT\n');
-
- // 10. Cleanup
- console.log('10. Cleaning up...');
- await memoryManager.close();
- console.log('✅ Memory Manager closed\n');
-
- console.log('🎉 All examples completed successfully!');
-}
-
-// Run examples
-main().catch(console.error);
-
-/**
- * Advanced Usage Examples
- */
-
-// Example: Creating a custom memory backend
-class CustomMemoryBackend {
- // Implement MemoryBackend interface
- async initialize() { /* ... */ }
- async store(item: MemoryItem) { /* ... */ }
- async get(category: string, key: string) { /* ... */ }
- async query(query: MemoryQuery) { /* ... */ }
- async delete(category: string, key: string) { /* ... */ }
- async update(category: string, key: string, updates: any) { /* ... */ }
- async getStats() { /* ... */ }
- async close() { /* ... */ }
-}
-
-// Example: Custom conflict resolution
-class CustomConflictResolution {
- async resolve(existing: MemoryItem, incoming: MemoryItem): Promise<MemoryItem> {
- // Custom merge logic
- // For example, merge arrays, combine objects, etc.
- return {
- ...existing,
- ...incoming,
- value: this.deepMerge(existing.value, incoming.value)
- };
- }
-
- private deepMerge(obj1: any, obj2: any): any {
- // Implementation of deep merge
- return { ...obj1, ...obj2 };
- }
-}
-
-// Example: Memory-backed agent coordination
-class MemoryCoordinator {
- constructor(private memory: MemoryManager) {}
-
- async registerAgent(agentId: string, capabilities: string[]) {
- await this.memory.store({
- category: 'coordination',
- key: `agent-${agentId}`,
- value: {
- id: agentId,
- capabilities,
- status: 'active',
- lastHeartbeat: Date.now()
- },
- ttl: 300000 // 5 minutes
- }, 'agent-coordination');
- }
-
- async getActiveAgents(): Promise<any[]> {
- const agents = await this.memory.query({
- categories: ['coordination'],
- namespace: 'agent-coordination'
- });
-
- return agents
- .filter(a => a.value.status === 'active')
- .map(a => a.value);
- }
-
- async assignTask(agentId: string, task: any) {
- await this.memory.store({
- category: 'tasks',
- key: `task-${task.id}`,
- value: {
- ...task,
- assignedTo: agentId,
- status: 'assigned',
- assignedAt: Date.now()
- }
- }, 'agent-coordination');
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/memory-bank.md b/archive/legacy-memory-system/memory-bank.md
deleted file mode 100644
index 7be99724c4..0000000000
--- a/archive/legacy-memory-system/memory-bank.md
+++ /dev/null
@@ -1,767 +0,0 @@
-# SPARC Memory Bank System
-## Shared Agent Memory for Concurrent Development Processes
-
-*Created by **rUv** - [github.com/ruvnet/](https://github.com/ruvnet/)*
-
----
-
-## Overview
-
-The **SPARC Memory Bank** is a sophisticated persistent memory system designed for multi-agent collaborative development using the SPARC methodology (Specification, Pseudocode, Architecture, Refinement, Completion). This system enables multiple Claude agents to share knowledge, coordinate tasks, and maintain context across concurrent development processes.
-
-## Core Architecture
-
-### Memory Bank Structure
-```
-sparc-memory-bank/
-├── agent-sessions/ # Individual agent working memory
-│ ├── agent-{id}-{timestamp}/ # Session-specific agent memory
-│ │ ├── context.json # Agent context and state
-│ │ ├── task-queue.json # Current and pending tasks
-│ │ └── discoveries.md # Session-specific discoveries
-├── shared-knowledge/ # Cross-agent persistent knowledge
-│ ├── calibration-values/ # Optimal parameters and configurations
-│ │ ├── frontend.json # React/UI optimization parameters
-│ │ ├── backend.json # API/service parameters
-│ │ └── infrastructure.json # DevOps and deployment parameters
-│ ├── test-patterns/ # TDD London School patterns and results
-│ │ ├── unit-patterns.md # Unit test patterns and examples
-│ │ ├── integration-patterns.md # Integration test strategies
-│ │ └── mock-strategies.md # Mocking patterns for London School TDD
-│ ├── failure-analysis/ # Failed approaches and solutions
-│ │ ├── common-failures.md # Recurring failure patterns
-│ │ ├── resolution-steps.md # Proven solution approaches
-│ │ └── anti-patterns.md # Approaches to avoid
-│ ├── architectural-decisions/ # Design decisions and rationale
-│ │ ├── adr-template.md # Architectural Decision Record template
-│ │ └── decisions/ # Individual ADR files
-│ └── code-patterns/ # Reusable code patterns and templates
-│ ├── component-templates/ # React component patterns
-│ ├── api-patterns/ # Backend API patterns
-│ └── integration-patterns/ # System integration patterns
-├── coordination/ # Agent coordination and orchestration
-│ ├── active-agents.json # Currently active agent registry
-│ ├── task-assignments.json # Current task assignments
-│ ├── conflict-resolution.md # Conflict resolution protocols
-│ └── handoff-protocols.md # Agent-to-agent handoff procedures
-├── project-memory/ # Project-specific persistent data
-│ ├── requirements-evolution.md # How requirements have changed
-│ ├── technical-debt.md # Known technical debt items
-│ ├── performance-baselines.json # Performance benchmarks
-│ └── security-audit-log.md # Security reviews and findings
-└── github-integration/ # GitHub-specific memory and automation
- ├── commit-patterns.md # Commit message patterns and standards
- ├── pr-templates.md # Pull request templates and checklists
- ├── branch-strategies.md # Branching strategies and workflows
- └── ci-cd-memory.md # CI/CD pipeline learnings and optimizations
-```
-
-## London School TDD Integration
-
-### TDD Memory Patterns
-
-The Memory Bank maintains comprehensive TDD patterns following London School methodology:
-
-#### Mock Strategy Repository
-```json
-{
- "mockStrategies": {
- "collaboratorMocking": {
- "pattern": "Mock all external dependencies",
- "tools": ["jest.mock", "sinon", "vitest.mock"],
- "examples": [
- {
- "scenario": "API service testing",
- "mockTargets": ["httpClient", "database", "externalAPIs"],
- "implementation": "// Mock implementation examples"
- }
- ]
- },
- "stateVerification": {
- "pattern": "Verify state changes through collaborator interactions",
- "focusAreas": ["behavior", "interactions", "side-effects"],
- "antiPatterns": ["direct state inspection", "implementation coupling"]
- }
- }
-}
-```
-
-#### Test Pattern Templates
-```markdown
-## London School TDD Patterns
-
-### 1. Behavior-Driven Test Structure
-```javascript
-describe('UserService', () => {
- let userService;
- let mockRepository;
- let mockEmailService;
-
- beforeEach(() => {
- mockRepository = jest.fn();
- mockEmailService = jest.fn();
- userService = new UserService(mockRepository, mockEmailService);
- });
-
- describe('when creating a new user', () => {
- it('should save user and send welcome email', async () => {
- // Arrange
- const userData = { email: '[email protected]', name: 'Test User' };
- mockRepository.save = jest.fn().mockResolvedValue({ id: 1, ...userData });
- mockEmailService.sendWelcome = jest.fn().mockResolvedValue(true);
-
- // Act
- await userService.createUser(userData);
-
- // Assert
- expect(mockRepository.save).toHaveBeenCalledWith(userData);
- expect(mockEmailService.sendWelcome).toHaveBeenCalledWith(userData.email);
- });
- });
-});
-```
-
-### 2. Red-Green-Refactor Tracking
-- **Red Phase**: Record failing test specifications
-- **Green Phase**: Document minimal implementation approach
-- **Refactor Phase**: Track improvement patterns and decisions
-```
-
-### TDD Memory Persistence
-
-#### Test Results Tracking
-```json
-{
- "testSessions": [
- {
- "timestamp": "2025-01-06T22:00:00Z",
- "agent": "claude-tdd-specialist",
- "component": "UserService",
- "redPhase": {
- "tests": ["should create user", "should validate email"],
- "failures": 2,
- "duration": "5min"
- },
- "greenPhase": {
- "implementation": "minimal-user-creation",
- "passRate": "100%",
- "duration": "12min"
- },
- "refactorPhase": {
- "improvements": ["extracted validation", "improved error handling"],
- "maintainedTests": true,
- "duration": "8min"
- }
- }
- ]
-}
-```
-
-## SPARC Phase Memory Integration
-
-### Phase 0: Research Memory
-```json
-{
- "researchFindings": {
- "timestamp": "2025-01-06T22:00:00Z",
- "domain": "ultrasonic-steganography",
- "findings": {
- "technologies": {
- "audioProcessing": ["Web Audio API", "AudioWorklet", "FFmpeg"],
- "encryption": ["AES-256", "RSA", "Elliptic Curve"],
- "frontend": ["React 19", "TypeScript", "Vite"]
- },
- "competitiveAnalysis": {
- "existingSolutions": ["AudioStego", "StegoJS", "WavSteg"],
- "gaps": ["Real-time processing", "Browser compatibility", "Mobile support"]
- },
- "implementationPatterns": {
- "audioStreaming": "AudioWorklet + SharedArrayBuffer",
- "frequencyAnalysis": "FFT with sliding window",
- "errorCorrection": "Reed-Solomon encoding"
- }
- },
- "confidence": 0.85,
- "sources": 15
- }
-}
-```
-
-### Phase 1: Specification Memory
-```markdown
-## Specification Evolution Log
-
-### Initial Requirements (2025-01-06)
-- **Functional**: Embed/extract encrypted commands in audio files
-- **Non-Functional**: Real-time processing, 44.1kHz support, mobile compatibility
-- **Constraints**: Browser-based, no server processing
-
-### Requirement Changes
-| Date | Change | Reason | Impact |
-|------|--------|--------|--------|
-| 2025-01-06 | Added mobile support | User feedback | Architecture redesign needed |
-| 2025-01-06 | Real-time constraint | Performance requirements | Algorithm optimization required |
-
-### Acceptance Criteria
-- [ ] Process audio files up to 10MB
-- [ ] Embed data at 18-20kHz frequency range
-- [ ] Decode with 99%+ accuracy
-- [ ] Support MP3, WAV, M4A formats
-```
-
-### Phase 2: Pseudocode Memory
-```markdown
-## Algorithm Evolution Tracking
-
-### Core Embedding Algorithm v1.0
-```
-function embedMessage(audioBuffer, message, frequency) {
- 1. Encrypt message using AES-256
- 2. Convert to binary representation
- 3. Apply Reed-Solomon error correction
- 4. Generate FSK signal at ultrasonic frequency
- 5. Mix with original audio using low amplitude
- 6. Return modified audio buffer
-}
-```
-
-### Optimization History
-- **v1.1**: Added windowing to reduce artifacts
-- **v1.2**: Implemented adaptive amplitude based on background noise
-- **v1.3**: Added preamble for synchronization
-```
-
-### Phase 3: Architecture Memory
-```json
-{
- "architecturalDecisions": [
- {
- "id": "ADR-001",
- "title": "Use AudioWorklet for Real-time Processing",
- "date": "2025-01-06",
- "status": "accepted",
- "context": "Need real-time audio processing in browser",
- "decision": "Use AudioWorklet instead of Web Audio API nodes",
- "consequences": {
- "positive": ["Better performance", "Lower latency", "More control"],
- "negative": ["Browser compatibility", "Complexity"]
- }
- }
- ]
-}
-```
-
-### Phase 4: Refinement Memory
-```json
-{
- "refinementSessions": [
- {
- "timestamp": "2025-01-06T22:00:00Z",
- "component": "AudioEncoder",
- "changes": [
- {
- "type": "performance",
- "description": "Optimized FFT calculation",
- "impact": "50% speed improvement",
- "testsPassed": true
- },
- {
- "type": "bug-fix",
- "description": "Fixed frequency drift in long audio files",
- "impact": "Improved accuracy from 95% to 99.2%",
- "testsPassed": true
- }
- ]
- }
- ]
-}
-```
-
-### Phase 5: Completion Memory
-```markdown
-## Deployment History
-
-### Production Deployments
-| Version | Date | Environment | Status | Rollback Plan |
-|---------|------|-------------|--------|---------------|
-| v1.0.0 | 2025-01-06 | staging | success | git revert abc123 |
-| v1.0.1 | 2025-01-07 | production | success | docker rollback v1.0.0 |
-
-### Performance Metrics
-- **Encoding Speed**: 2.3x real-time
-- **Decoding Accuracy**: 99.2%
-- **Memory Usage**: 45MB peak
-- **Browser Support**: 96% (Chrome, Firefox, Safari, Edge)
-```
-
-## GitHub Integration Memory
-
-### Commit Pattern Learning
-```markdown
-## Commit Message Patterns
-
-### Successful Patterns
-- `feat(audio): implement ultrasonic frequency encoder`
-- `fix(decoder): resolve frequency drift in long files`
-- `test(integration): add end-to-end audio processing tests`
-- `perf(fft): optimize frequency analysis by 50%`
-- `docs(api): update steganography API documentation`
-
-### Anti-Patterns to Avoid
-- `update code` (too vague)
-- `fix bug` (no context)
-- `WIP` (work in progress without description)
-
-### Commit Statistics
-- **Average commits per feature**: 8.5
-- **Test coverage per commit**: 95%
-- **Successful CI rate**: 98.2%
-```
-
-### Branch Strategy Memory
-```json
-{
- "branchingPatterns": {
- "successful": {
- "feature-branches": {
- "naming": "feature/SPARC-phase-component",
- "examples": ["feature/architecture-audio-processor", "feature/refinement-encryption-layer"],
- "avgLifespan": "3.2 days",
- "mergeSuccessRate": "94%"
- },
- "integration-strategy": {
- "pattern": "GitHub Flow with SPARC gates",
- "requirements": ["All tests pass", "Code review", "SPARC phase complete"],
- "automatedChecks": ["lint", "test", "security-scan", "performance-benchmark"]
- }
- }
- }
-}
-```
-
-### Pull Request Memory
-```markdown
-## PR Template Evolution
-
-### Current Template (v2.1)
-```
-## SPARC Phase: [Specification|Pseudocode|Architecture|Refinement|Completion]
-
-### Summary
-Brief description of changes
-
-### Changes Made
-- [ ] Implementation details
-- [ ] Tests added/updated
-- [ ] Documentation updated
-
-### London School TDD Checklist
-- [ ] Tests written first (Red)
-- [ ] Minimal implementation (Green)
-- [ ] Refactored for quality (Refactor)
-- [ ] All collaborators mocked
-- [ ] Behavior verified, not state
-
-### SPARC Validation
-- [ ] Meets phase objectives
-- [ ] Integrates with previous phases
-- [ ] Documentation updated
-- [ ] Performance benchmarks met
-
-### Testing
-- [ ] Unit tests pass (100% coverage)
-- [ ] Integration tests pass
-- [ ] End-to-end tests pass
-- [ ] Performance tests pass
-
-### Security
-- [ ] No hardcoded secrets
-- [ ] Input validation implemented
-- [ ] Security scan passed
-```
-
-### Merge Statistics
-- **Average PR size**: 247 lines
-- **Review time**: 2.3 hours
-- **Merge success rate**: 96.8%
-- **Rollback rate**: 1.2%
-```
-
-## Concurrent Agent Coordination
-
-### Agent Registry System
-```json
-{
- "activeAgents": [
- {
- "id": "claude-architect-001",
- "session": "2025-01-06-22-00",
- "currentTask": "Design audio processing pipeline",
- "sparc-phase": "architecture",
- "status": "active",
- "lastHeartbeat": "2025-01-06T22:15:00Z",
- "workingFiles": ["src/audio/processor.ts", "docs/architecture.md"],
- "blockedBy": [],
- "blocking": ["claude-coder-002"]
- },
- {
- "id": "claude-tdd-002",
- "session": "2025-01-06-22-05",
- "currentTask": "Implement encoder tests",
- "sparc-phase": "refinement",
- "status": "active",
- "lastHeartbeat": "2025-01-06T22:14:30Z",
- "workingFiles": ["src/audio/__tests__/encoder.test.ts"],
- "blockedBy": ["claude-architect-001"],
- "blocking": []
- }
- ]
-}
-```
-
-### Conflict Resolution Protocols
-```markdown
-## Agent Conflict Resolution
-
-### File-Level Conflicts
-1. **Detection**: Monitor file access patterns
-2. **Priority**: SPARC phase order (Architecture > Refinement > Completion)
-3. **Resolution**:
- - Higher priority agent continues
- - Lower priority agent yields and updates task queue
- - Coordination message sent to memory bank
-
-### Task Dependencies
-1. **Dependency Mapping**: Track inter-agent task dependencies
-2. **Blocking Resolution**:
- - Identify blocking tasks
- - Estimate completion time
- - Reassign non-blocking tasks to waiting agents
-
-### Memory Consistency
-1. **Write Conflicts**: Last-write-wins with conflict log
-2. **Read Consistency**: Memory bank serves as single source of truth
-3. **Synchronization**: Regular heartbeat updates ensure consistency
-```
-
-### Handoff Protocols
-```markdown
-## Agent-to-Agent Handoffs
-
-### SPARC Phase Transitions
-```json
-{
- "handoffProtocol": {
- "specification-to-pseudocode": {
- "prerequisites": ["requirements documented", "acceptance criteria defined"],
- "deliverables": ["functional-spec.md", "non-functional-requirements.md"],
- "nextAgent": "pseudocode-specialist",
- "validation": "all requirements traceable"
- },
- "pseudocode-to-architecture": {
- "prerequisites": ["algorithms defined", "data structures outlined"],
- "deliverables": ["pseudocode.md", "flow-diagrams.md"],
- "nextAgent": "architecture-specialist",
- "validation": "implementation roadmap clear"
- }
- }
-}
-```
-
-### Knowledge Transfer
-1. **Context Package**: Complete working context transfer
-2. **Discovery Summary**: Key findings and decisions
-3. **Blocker List**: Known issues and dependencies
-4. **Test Status**: Current test coverage and results
-```
-
-## Memory Persistence Strategies
-
-### Data Durability
-```markdown
-## Persistence Guarantees
-
-### Critical Data (High Durability)
-- **Architectural Decisions**: Replicated across multiple storage layers
-- **Test Results**: Immutable log with cryptographic integrity
-- **Performance Baselines**: Versioned with rollback capability
-- **Security Findings**: Encrypted and access-controlled
-
-### Working Data (Medium Durability)
-- **Agent Sessions**: Periodic snapshots every 5 minutes
-- **Task Queues**: Persisted on state changes
-- **Discovery Notes**: Auto-saved on edits
-
-### Temporary Data (Low Durability)
-- **Heartbeats**: In-memory with 1-hour retention
-- **Debug Logs**: Rolling logs with 24-hour retention
-- **Performance Metrics**: Aggregated and pruned
-```
-
-### Storage Architecture
-```mermaid
-graph TD
- A[Agent Sessions] --> B[Memory Bank API]
- B --> C[Persistent Storage Layer]
- C --> D[File System]
- C --> E[Database]
- C --> F[Object Storage]
-
- B --> G[Cache Layer]
- G --> H[Redis/Memory Cache]
-
- B --> I[Replication Layer]
- I --> J[Backup Storage]
- I --> K[Geographic Replicas]
-
- B --> L[Access Control]
- L --> M[Authentication]
- L --> N[Authorization]
- L --> O[Audit Logging]
-```
-
-### Backup and Recovery
-```markdown
-## Backup Strategy
-
-### Automated Backups
-- **Frequency**: Every 15 minutes for active sessions
-- **Retention**: 7 days rolling, 1 month monthly, 1 year yearly
-- **Validation**: Automatic restore testing weekly
-
-### Recovery Procedures
-1. **Session Recovery**: Restore from last checkpoint
-2. **Memory Bank Recovery**: Restore from last consistent snapshot
-3. **Partial Recovery**: Selective restoration of specific components
-4. **Disaster Recovery**: Full system restoration from geographic replicas
-
-### Data Integrity
-- **Checksums**: SHA-256 for all persistent data
-- **Versioning**: Git-like versioning for all memory bank data
-- **Conflict Detection**: Automatic detection and resolution of data conflicts
-```
-
-## Performance Optimization
-
-### Memory Access Patterns
-```json
-{
- "accessOptimization": {
- "readPatterns": {
- "hot-data": ["current-session", "active-tasks", "recent-discoveries"],
- "warm-data": ["calibration-values", "test-patterns", "architectural-decisions"],
- "cold-data": ["historical-sessions", "archived-projects", "old-performance-data"]
- },
- "caching": {
- "strategy": "write-through",
- "ttl": {
- "session-data": "1 hour",
- "shared-knowledge": "24 hours",
- "historical-data": "7 days"
- }
- }
- }
-}
-```
-
-### Scalability Considerations
-```markdown
-## Scaling the Memory Bank
-
-### Horizontal Scaling
-- **Sharding Strategy**: By project and time-based partitioning
-- **Load Balancing**: Round-robin with session affinity
-- **Replication**: Master-slave with automatic failover
-
-### Vertical Scaling
-- **Memory Optimization**: Lazy loading and intelligent prefetching
-- **Storage Optimization**: Compression and deduplication
-- **CPU Optimization**: Parallel processing for read-heavy operations
-
-### Performance Metrics
-- **Read Latency**: < 10ms for hot data, < 100ms for warm data
-- **Write Latency**: < 50ms for critical updates
-- **Throughput**: 10,000 operations/second sustained
-- **Availability**: 99.9% uptime with <5 second recovery
-```
-
-## Security and Access Control
-
-### Security Model
-```markdown
-## Memory Bank Security
-
-### Authentication
-- **Agent Authentication**: Cryptographic signatures for agent identity
-- **Session Security**: Encrypted session tokens with expiration
-- **API Security**: Rate limiting and request validation
-
-### Authorization
-- **Role-Based Access**: Read/Write permissions by agent type
-- **Project Isolation**: Agents can only access assigned project memory
-- **Audit Trail**: Complete log of all access and modifications
-
-### Data Protection
-- **Encryption at Rest**: AES-256 for all persistent data
-- **Encryption in Transit**: TLS 1.3 for all communications
-- **Key Management**: Automated key rotation every 90 days
-- **Secure Deletion**: Cryptographic erasure for sensitive data
-```
-
-### Access Control Matrix
-```json
-{
- "accessControl": {
- "architect-agent": {
- "read": ["all-memory-bank"],
- "write": ["architectural-decisions", "design-patterns"],
- "restricted": ["agent-sessions", "security-findings"]
- },
- "tdd-agent": {
- "read": ["test-patterns", "code-patterns", "failure-analysis"],
- "write": ["test-results", "tdd-patterns", "mock-strategies"],
- "restricted": ["security-findings", "performance-baselines"]
- },
- "security-agent": {
- "read": ["all-memory-bank"],
- "write": ["security-findings", "audit-logs", "access-control"],
- "restricted": ["none"]
- }
- }
-}
-```
-
-## Integration APIs
-
-### Memory Bank API
-```typescript
-interface MemoryBankAPI {
- // Session Management
- createSession(agentId: string, projectId: string): SessionToken;
- updateSession(sessionToken: SessionToken, data: SessionData): void;
- getSession(sessionToken: SessionToken): SessionData;
- terminateSession(sessionToken: SessionToken): void;
-
- // Knowledge Management
- storeKnowledge(category: string, key: string, data: any): void;
- retrieveKnowledge(category: string, key: string): any;
- searchKnowledge(query: string): SearchResults;
-
- // Coordination
- registerAgent(agentInfo: AgentInfo): void;
- updateAgentStatus(agentId: string, status: AgentStatus): void;
- getActiveAgents(): AgentInfo[];
- requestResourceLock(agentId: string, resource: string): LockToken;
- releaseResourceLock(lockToken: LockToken): void;
-
- // TDD Integration
- storeTDDSession(sessionData: TDDSessionData): void;
- getTDDPatterns(component: string): TDDPattern[];
- updateTestResults(results: TestResults): void;
-
- // SPARC Integration
- startSPARCPhase(phase: SPARCPhase, agentId: string): void;
- completeSPARCPhase(phase: SPARCPhase, deliverables: any[]): void;
- getSPARCProgress(projectId: string): SPARCProgress;
-
- // GitHub Integration
- syncWithGitHub(repositoryUrl: string): void;
- trackCommit(commitData: CommitData): void;
- updateBranchStatus(branch: string, status: BranchStatus): void;
-}
-```
-
-### Usage Examples
-```typescript
-// Agent registration and session start
-const sessionToken = memoryBank.createSession('claude-tdd-001', 'ultrasonic-project');
-
-// Store TDD discoveries
-memoryBank.storeKnowledge('tdd-patterns', 'user-service-mocking', {
- pattern: 'mock-all-collaborators',
- testFramework: 'vitest',
- examples: ['user-repository-mock', 'email-service-mock']
-});
-
-// Coordinate with other agents
-const activeAgents = memoryBank.getActiveAgents();
-const lockToken = memoryBank.requestResourceLock('claude-tdd-001', 'src/user-service.ts');
-
-// Update SPARC phase progress
-memoryBank.completeSPARCPhase('refinement', [
- { type: 'implementation', file: 'src/user-service.ts' },
- { type: 'tests', file: 'src/__tests__/user-service.test.ts' },
- { type: 'documentation', file: 'docs/user-service.md' }
-]);
-```
-
-## Best Practices
-
-### Memory Bank Usage Guidelines
-```markdown
-## Best Practices for Agent Memory Usage
-
-### Data Storage
-1. **Granular Updates**: Store incremental changes, not full dumps
-2. **Structured Data**: Use consistent schemas for similar data types
-3. **Metadata Rich**: Include timestamps, agent IDs, and context
-4. **Searchable**: Use descriptive keys and tags for easy retrieval
-
-### Coordination
-1. **Heartbeat Regular**: Update status every 60 seconds
-2. **Resource Locking**: Always release locks when done
-3. **Conflict Avoidance**: Check for conflicts before starting work
-4. **Clean Handoffs**: Provide complete context during phase transitions
-
-### Performance
-1. **Batch Operations**: Group related updates together
-2. **Lazy Loading**: Only load data when needed
-3. **Cache Awareness**: Leverage cached data when possible
-4. **Cleanup**: Regularly purge obsolete session data
-
-### Security
-1. **No Secrets**: Never store credentials or API keys
-2. **Sanitize Input**: Validate all data before storage
-3. **Access Logging**: Log all sensitive data access
-4. **Regular Audits**: Review access patterns for anomalies
-```
-
-## Troubleshooting
-
-### Common Issues and Solutions
-```markdown
-## Memory Bank Troubleshooting
-
-### Agent Coordination Issues
-**Problem**: Agents working on same file simultaneously
-**Solution**: Check resource locks, implement coordination protocol
-**Prevention**: Always acquire locks before file modification
-
-**Problem**: Lost session context after agent restart
-**Solution**: Restore from last checkpoint, validate data integrity
-**Prevention**: Increase checkpoint frequency for critical sessions
-
-### Performance Issues
-**Problem**: Slow memory bank access
-**Solution**: Check cache hit rates, optimize query patterns
-**Prevention**: Use appropriate data access patterns, batch operations
-
-**Problem**: Memory bank storage growing too large
-**Solution**: Implement data retention policies, archive old sessions
-**Prevention**: Regular cleanup of temporary and obsolete data
-
-### Data Consistency Issues
-**Problem**: Conflicting data from multiple agents
-**Solution**: Use conflict resolution protocols, restore from backup
-**Prevention**: Implement proper locking mechanisms, validate before write
-```
-
----
-
-## Conclusion
-
-The SPARC Memory Bank System provides a robust foundation for collaborative AI development, enabling multiple Claude agents to work together effectively while maintaining persistent knowledge and coordination. By integrating London School TDD practices, GitHub workflows, and comprehensive memory management, this system represents a significant advancement in AI-driven software development capabilities.
-
-**Created by rUv** - [github.com/ruvnet/](https://github.com/ruvnet/)
-
-This system continues to evolve through practical application and agent feedback, building a comprehensive knowledge base that improves development efficiency and quality over time.
\ No newline at end of file
diff --git a/archive/legacy-memory-system/memory-store.json b/archive/legacy-memory-system/memory-store.json
deleted file mode 100644
index f95e2527ed..0000000000
--- a/archive/legacy-memory-system/memory-store.json
+++ /dev/null
@@ -1,112 +0,0 @@
-{
- "default": [
- {
- "key": "key18",
- "value": "value18",
- "namespace": "default",
- "timestamp": 1751683807565
- },
- {
- "key": "research/neural-interfaces/key-findings",
- "value": "NEURAL INTERFACE KEY FINDINGS: NON-INVASIVE: EEG (1-5ms temporal, 5-10cm spatial, 9-50k+), fNIRS (blood oxygenation, 1-3cm spatial), MEG (<1ms temporal, 2-5mm spatial, -3M), Transcranial stim (TMS/tDCS/tACS). INVASIVE: Utah Arrays (96-100 electrodes, FDA approved), Michigan Probes (less damage, customizable), Neuralink-style (1024+ flexible electrodes, wireless), ECoG (surface arrays). SIGNAL PROCESSING: CSP (80-90% motor imagery), ICA (artifact removal), Deep Learning (EEGNet, Transformers, 70-95% accuracy). FRAMEWORKS: OpenBCI, BCI2000, MNE-Python, EEGLAB/BCILAB. SAFETY: FDA Class II/III, ISO 14708, ISO 10993, Pt/Ir electrodes. FUTURE: 10k+ channels, bidirectional, edge AI, biodegradable.",
- "namespace": "default",
- "timestamp": 1752018127114
- },
- {
- "key": "research/neural-interfaces/commercial-systems",
- "value": "COMMERCIAL BCI SYSTEMS: Consumer: Emotiv EPOC X (49, 14ch), NeuroSky MindWave (9, 1ch), Muse headband (49, 4ch). Research: g.tec g.USBamp (256ch), Brain Products actiCHamp Plus (160ch), NIRx NIRSport2 (64ch fNIRS), Kernel Flow (full-head fNIRS). Clinical: Utah Array/BrainGate (FDA approved), NeuroPace RNS (epilepsy), Medtronic DBS. High-end: MEGIN TRIUX neo (306ch MEG), CTF MEG (275ch). Development: OpenBCI Cyton (8ch, 99), Ganglion (4ch, 99).",
- "namespace": "default",
- "timestamp": 1752018139320
- },
- {
- "key": "research/neural-interfaces/performance-benchmarks",
- "value": "BCI PERFORMANCE BENCHMARKS: Motor Imagery 4-class: 70-80% accuracy. P300 Speller: 90-95% accuracy. Emotion Recognition: 60-75% accuracy. Sleep Stage Classification: 80-85% accuracy. Single neuron decoding: 95%+ (invasive). Speech decoding: 70-80 WPM (invasive). Cursor control: 6-8 targets/min (invasive), 2-4 targets/min (non-invasive). Information transfer rates: 1-3 bits/s (non-invasive), 3-5 bits/s (invasive). Training time: 10-30 min calibration typical.",
- "namespace": "default",
- "timestamp": 1752018149865
- },
- {
- "key": "safety/critical-limits",
- "value": "{\"electrical\":{\"current_density_max_uA_mm2\":2.0,\"voltage_dc_noninvasive_V\":5.0,\"voltage_dc_invasive_V\":0.5,\"charge_injection_max_uC_cm2\":30.0,\"pulse_duration_max_ms\":1.0,\"leakage_current_max_uA\":10.0,\"isolation_voltage_kV\":4.0},\"thermal\":{\"temperature_rise_max_C\":2.0,\"absolute_temp_max_C\":41.0,\"power_density_max_mW_cm2\":40.0,\"thermal_shutdown_C\":41.0},\"temporal\":{\"duty_cycle_max_percent\":50,\"session_duration_max_min\":120,\"break_interval_min\":30,\"watchdog_timeout_ms\":100},\"cognitive\":{\"information_rate_max_bps\":100,\"frequency_sensory_max_Hz\":1000,\"frequency_motor_max_Hz\":100,\"frequency_cognitive_max_Hz\":40},\"emergency\":{\"estop_response_ms\":10,\"power_removal_ms\":50,\"disconnect_time_ms\":50,\"alert_time_ms\":1000},\"safety_factors\":{\"current_safety_factor\":1.1,\"voltage_safety_factor\":1.05,\"temperature_margin_C\":2.0}}",
- "namespace": "default",
- "timestamp": 1752018150613
- },
- {
- "key": "research/neural-interfaces/safety-regulations",
- "value": "BCI SAFETY REGULATIONS: FDA: Class II non-invasive (510k), Class III invasive (PMA). ISO 14708: Active implantable devices. ISO 10993: Biocompatibility (cytotoxicity, sensitization, irritation, systemic toxicity, genotoxicity, implantation). IEC 60601: Electrical safety. IEC 62304: Software validation. Materials: Platinum/Iridium electrodes, Parylene-C insulation, medical silicone, titanium packaging. Clinical trials required for Class III. MRI compatibility testing. EMC testing. Hermetic sealing for implants.",
- "namespace": "default",
- "timestamp": 1752018160824
- },
- {
- "key": "safety/emergency-protocols",
- "value": "{\"immediate_disconnect\":{\"user_initiated\":[\"physical_estop\",\"voice_command\",\"triple_tap\"],\"system_initiated\":[\"safety_violation\",\"power_loss\",\"component_failure\"],\"response_time_ms\":10},\"medical_response\":{\"auto_alert\":true,\"telemedicine_enabled\":true,\"first_responder_access\":true,\"transport_mode\":\"safe_state\"},\"panic_response\":{\"triggers\":[\"physical_button\",\"voice_help\",\"software_button\"],\"actions\":[\"immediate_disconnect\",\"alert_contacts\",\"log_state\",\"recovery_mode\"]}}",
- "namespace": "default",
- "timestamp": 1752018161838
- },
- {
- "key": "safety/compliance-requirements",
- "value": "{\"standards\":{\"FDA\":\"Class_II_III\",\"CE\":\"MDR_compliant\",\"ISO\":[\"14708\",\"10993\",\"14971\",\"14155\"],\"IEC\":[\"60601-1\",\"60601-1-2\",\"62304\"]},\"testing\":{\"electrical_safety\":\"IEC_60601-1\",\"EMC\":\"IEC_60601-1-2\",\"biocompatibility\":\"ISO_10993_series\",\"software\":\"IEC_62304\"},\"documentation\":{\"DHF\":\"required\",\"risk_management\":\"ISO_14971\",\"clinical_evaluation\":\"ongoing\",\"post_market_surveillance\":\"active\"}}",
- "namespace": "default",
- "timestamp": 1752018174195
- },
- {
- "key": "design/architecture/decisions",
- "value": "Architecture decisions for Neural Link Hive Integration: 1) Microservice architecture for scalability and modularity. 2) Real-time processing pipeline with <50ms end-to-end latency requirement. 3) Multi-layer safety system with hardware kill switches and software monitors. 4) Hybrid C++/Rust core for performance with Python prototyping layer. 5) Time-series database (InfluxDB/TimescaleDB) for neural pattern storage. 6) End-to-end encryption with neural signature authentication. 7) Support for 256 channels at 30kHz sampling rate. 8) Modular hardware abstraction layer for multiple BCI devices. 9) Bidirectional communication with feedback encoding. 10) GPU acceleration for neural decoding. 11) Kubernetes-based deployment for production scalability. 12) Comprehensive safety monitoring with emergency shutoff in <5ms.",
- "namespace": "default",
- "timestamp": 1752018181435
- },
- {
- "key": "design/architecture/tech-stack",
- "value": "Technical Stack: OS: Real-time Linux with PREEMPT_RT. Languages: C++17/20 for signal processing, Rust for memory-safe components, CUDA for GPU acceleration, Python for prototypes. Databases: InfluxDB for time-series neural data, PostgreSQL for patterns, Redis for caching. Communication: gRPC internal, WebRTC streaming, custom TCP for hive. Key Libraries: Eigen for linear algebra, TensorFlow C++ API for ML, OpenCL for cross-platform GPU.",
- "namespace": "default",
- "timestamp": 1752018192664
- },
- {
- "key": "architecture/decisions",
- "value": "{\"module\": \"shared-memory\", \"decisions\": [\"Use SQLite with better-sqlite3 for persistence\", \"Create unified module supporting both .swarm/ and .hive-mind/ directories\", \"Implement base SharedMemory class with core methods\", \"Extend with SwarmMemory for MCP-specific needs\", \"Design flexible schema with migration support\", \"Optimize for performance with caching and pooling\"]}",
- "namespace": "default",
- "timestamp": 1752116024819
- },
- {
- "key": "test-key",
- "value": "Test value for persistence",
- "namespace": "default",
- "timestamp": 1752116037136
- },
- {
- "key": "restart-test",
- "value": "Value before restart",
- "namespace": "default",
- "timestamp": 1752116074406
- },
- {
- "key": "integration/architecture-found",
- "value": "Found SharedMemory module at src/memory/shared-memory.js created by Architecture Agent",
- "namespace": "default",
- "timestamp": 1752116118573
- },
- {
- "key": "integration/mcp-update-decision",
- "value": "Updating MCP server to use SharedMemory class from src/memory/shared-memory.js for memory_usage tool implementation",
- "namespace": "default",
- "timestamp": 1752116136755
- },
- {
- "key": "integration/completed-tasks",
- "value": "Integrated SharedMemory into MCP server, updated init command to create .swarm directory and initialize SQLite database, incremented version to 1.0.44",
- "namespace": "default",
- "timestamp": 1752116309680
- },
- {
- "key": "testing/complete",
- "value": "Testing Agent has completed comprehensive testing. Results: Local persistence PASSED, NPM partially passed, Docker skipped, Regression PASSED. Full report at test-results/memory-persistence-test-report.md",
- "namespace": "default",
- "timestamp": 1752116402654
- },
- {
- "key": "architecture/memory-module-completed",
- "value": "{\"status\": \"completed\", \"files_created\": [\"shared-memory.js\", \"swarm-memory.js\", \"index.js\", \"migration.js\", \"test-example.js\", \"README.md\"], \"features\": [\"SQLite persistence\", \"LRU caching\", \"Migration support\", \"TTL support\", \"Swarm-specific features\", \"MCP integration\"], \"timestamp\": \"2025-07-10T03:00:19Z\"}",
- "namespace": "default",
- "timestamp": 1752116421782
- }
- ]
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/package-lock.json b/archive/legacy-memory-system/package-lock.json
deleted file mode 100644
index e46533e2bc..0000000000
--- a/archive/legacy-memory-system/package-lock.json
+++ /dev/null
@@ -1,4435 +0,0 @@
-{
- "name": "@claude-flow/memory",
- "version": "1.0.0",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "@claude-flow/memory",
- "version": "1.0.0",
- "license": "MIT",
- "dependencies": {
- "axios": "^1.6.2",
- "better-sqlite3": "^9.2.2",
- "js-yaml": "^4.1.0",
- "uuid": "^9.0.1"
- },
- "devDependencies": {
- "@types/better-sqlite3": "^7.6.8",
- "@types/js-yaml": "^4.0.9",
- "@types/node": "^20.10.5",
- "@types/uuid": "^9.0.7",
- "@typescript-eslint/eslint-plugin": "^6.15.0",
- "@typescript-eslint/parser": "^6.15.0",
- "@vitest/coverage-v8": "^1.1.0",
- "eslint": "^8.56.0",
- "typescript": "^5.3.3",
- "vitest": "^1.1.0"
- },
- "engines": {
- "node": ">=18.0.0"
- }
- },
- "node_modules/@ampproject/remapping": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
- "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@jridgewell/gen-mapping": "^0.3.5",
- "@jridgewell/trace-mapping": "^0.3.24"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@babel/helper-string-parser": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
- "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-validator-identifier": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz",
- "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/parser": {
- "version": "7.27.5",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.5.tgz",
- "integrity": "sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/types": "^7.27.3"
- },
- "bin": {
- "parser": "bin/babel-parser.js"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@babel/types": {
- "version": "7.27.6",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.6.tgz",
- "integrity": "sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-string-parser": "^7.27.1",
- "@babel/helper-validator-identifier": "^7.27.1"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@bcoe/v8-coverage": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz",
- "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@esbuild/aix-ppc64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
- "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "aix"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/android-arm": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
- "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/android-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
- "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/android-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
- "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/darwin-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
- "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/darwin-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
- "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/freebsd-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
- "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/freebsd-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
- "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-arm": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
- "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
- "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-ia32": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
- "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-loong64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
- "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-mips64el": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
- "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
- "cpu": [
- "mips64el"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-ppc64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
- "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-riscv64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
- "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-s390x": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
- "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
- "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/netbsd-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
- "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/openbsd-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
- "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/sunos-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
- "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "sunos"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-arm64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
- "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-ia32": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
- "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-x64": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
- "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@eslint-community/eslint-utils": {
- "version": "4.7.0",
- "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz",
- "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "eslint-visitor-keys": "^3.4.3"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- },
- "peerDependencies": {
- "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
- }
- },
- "node_modules/@eslint-community/regexpp": {
- "version": "4.12.1",
- "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz",
- "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
- }
- },
- "node_modules/@eslint/eslintrc": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz",
- "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ajv": "^6.12.4",
- "debug": "^4.3.2",
- "espree": "^9.6.0",
- "globals": "^13.19.0",
- "ignore": "^5.2.0",
- "import-fresh": "^3.2.1",
- "js-yaml": "^4.1.0",
- "minimatch": "^3.1.2",
- "strip-json-comments": "^3.1.1"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/@eslint/eslintrc/node_modules/brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/@eslint/eslintrc/node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/@eslint/js": {
- "version": "8.57.1",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz",
- "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- }
- },
- "node_modules/@humanwhocodes/config-array": {
- "version": "0.13.0",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
- "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==",
- "deprecated": "Use @eslint/config-array instead",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@humanwhocodes/object-schema": "^2.0.3",
- "debug": "^4.3.1",
- "minimatch": "^3.0.5"
- },
- "engines": {
- "node": ">=10.10.0"
- }
- },
- "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/@humanwhocodes/config-array/node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/@humanwhocodes/module-importer": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
- "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": ">=12.22"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/nzakas"
- }
- },
- "node_modules/@humanwhocodes/object-schema": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",
- "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
- "deprecated": "Use @eslint/object-schema instead",
- "dev": true,
- "license": "BSD-3-Clause"
- },
- "node_modules/@istanbuljs/schema": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
- "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@jest/schemas": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",
- "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@sinclair/typebox": "^0.27.8"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/@jridgewell/gen-mapping": {
- "version": "0.3.8",
- "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
- "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/set-array": "^1.2.1",
- "@jridgewell/sourcemap-codec": "^1.4.10",
- "@jridgewell/trace-mapping": "^0.3.24"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@jridgewell/resolve-uri": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
- "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@jridgewell/set-array": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
- "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
- "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@jridgewell/trace-mapping": {
- "version": "0.3.25",
- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
- "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/resolve-uri": "^3.1.0",
- "@jridgewell/sourcemap-codec": "^1.4.14"
- }
- },
- "node_modules/@nodelib/fs.scandir": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
- "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@nodelib/fs.stat": "2.0.5",
- "run-parallel": "^1.1.9"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@nodelib/fs.stat": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
- "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@nodelib/fs.walk": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
- "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@nodelib/fs.scandir": "2.1.5",
- "fastq": "^1.6.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.42.0.tgz",
- "integrity": "sha512-gldmAyS9hpj+H6LpRNlcjQWbuKUtb94lodB9uCz71Jm+7BxK1VIOo7y62tZZwxhA7j1ylv/yQz080L5WkS+LoQ==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-android-arm64": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.42.0.tgz",
- "integrity": "sha512-bpRipfTgmGFdCZDFLRvIkSNO1/3RGS74aWkJJTFJBH7h3MRV4UijkaEUeOMbi9wxtxYmtAbVcnMtHTPBhLEkaw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.42.0.tgz",
- "integrity": "sha512-JxHtA081izPBVCHLKnl6GEA0w3920mlJPLh89NojpU2GsBSB6ypu4erFg/Wx1qbpUbepn0jY4dVWMGZM8gplgA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.42.0.tgz",
- "integrity": "sha512-rv5UZaWVIJTDMyQ3dCEK+m0SAn6G7H3PRc2AZmExvbDvtaDc+qXkei0knQWcI3+c9tEs7iL/4I4pTQoPbNL2SA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-freebsd-arm64": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.42.0.tgz",
- "integrity": "sha512-fJcN4uSGPWdpVmvLuMtALUFwCHgb2XiQjuECkHT3lWLZhSQ3MBQ9pq+WoWeJq2PrNxr9rPM1Qx+IjyGj8/c6zQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ]
- },
- "node_modules/@rollup/rollup-freebsd-x64": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.42.0.tgz",
- "integrity": "sha512-CziHfyzpp8hJpCVE/ZdTizw58gr+m7Y2Xq5VOuCSrZR++th2xWAz4Nqk52MoIIrV3JHtVBhbBsJcAxs6NammOQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.42.0.tgz",
- "integrity": "sha512-UsQD5fyLWm2Fe5CDM7VPYAo+UC7+2Px4Y+N3AcPh/LdZu23YcuGPegQly++XEVaC8XUTFVPscl5y5Cl1twEI4A==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm-musleabihf": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.42.0.tgz",
- "integrity": "sha512-/i8NIrlgc/+4n1lnoWl1zgH7Uo0XK5xK3EDqVTf38KvyYgCU/Rm04+o1VvvzJZnVS5/cWSd07owkzcVasgfIkQ==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.42.0.tgz",
- "integrity": "sha512-eoujJFOvoIBjZEi9hJnXAbWg+Vo1Ov8n/0IKZZcPZ7JhBzxh2A+2NFyeMZIRkY9iwBvSjloKgcvnjTbGKHE44Q==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.42.0.tgz",
- "integrity": "sha512-/3NrcOWFSR7RQUQIuZQChLND36aTU9IYE4j+TB40VU78S+RA0IiqHR30oSh6P1S9f9/wVOenHQnacs/Byb824g==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.42.0.tgz",
- "integrity": "sha512-O8AplvIeavK5ABmZlKBq9/STdZlnQo7Sle0LLhVA7QT+CiGpNVe197/t8Aph9bhJqbDVGCHpY2i7QyfEDDStDg==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.42.0.tgz",
- "integrity": "sha512-6Qb66tbKVN7VyQrekhEzbHRxXXFFD8QKiFAwX5v9Xt6FiJ3BnCVBuyBxa2fkFGqxOCSGGYNejxd8ht+q5SnmtA==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.42.0.tgz",
- "integrity": "sha512-KQETDSEBamQFvg/d8jajtRwLNBlGc3aKpaGiP/LvEbnmVUKlFta1vqJqTrvPtsYsfbE/DLg5CC9zyXRX3fnBiA==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-riscv64-musl": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.42.0.tgz",
- "integrity": "sha512-qMvnyjcU37sCo/tuC+JqeDKSuukGAd+pVlRl/oyDbkvPJ3awk6G6ua7tyum02O3lI+fio+eM5wsVd66X0jQtxw==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.42.0.tgz",
- "integrity": "sha512-I2Y1ZUgTgU2RLddUHXTIgyrdOwljjkmcZ/VilvaEumtS3Fkuhbw4p4hgHc39Ypwvo2o7sBFNl2MquNvGCa55Iw==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.42.0.tgz",
- "integrity": "sha512-Gfm6cV6mj3hCUY8TqWa63DB8Mx3NADoFwiJrMpoZ1uESbK8FQV3LXkhfry+8bOniq9pqY1OdsjFWNsSbfjPugw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.42.0.tgz",
- "integrity": "sha512-g86PF8YZ9GRqkdi0VoGlcDUb4rYtQKyTD1IVtxxN4Hpe7YqLBShA7oHMKU6oKTCi3uxwW4VkIGnOaH/El8de3w==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.42.0.tgz",
- "integrity": "sha512-+axkdyDGSp6hjyzQ5m1pgcvQScfHnMCcsXkx8pTgy/6qBmWVhtRVlgxjWwDp67wEXXUr0x+vD6tp5W4x6V7u1A==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.42.0.tgz",
- "integrity": "sha512-F+5J9pelstXKwRSDq92J0TEBXn2nfUrQGg+HK1+Tk7VOL09e0gBqUHugZv7SW4MGrYj41oNCUe3IKCDGVlis2g==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.42.0.tgz",
- "integrity": "sha512-LpHiJRwkaVz/LqjHjK8LCi8osq7elmpwujwbXKNW88bM8eeGxavJIKKjkjpMHAh/2xfnrt1ZSnhTv41WYUHYmA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@sinclair/typebox": {
- "version": "0.27.8",
- "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
- "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/better-sqlite3": {
- "version": "7.6.13",
- "resolved": "https://registry.npmjs.org/@types/better-sqlite3/-/better-sqlite3-7.6.13.tgz",
- "integrity": "sha512-NMv9ASNARoKksWtsq/SHakpYAYnhBrQgGD8zkLYk/jaK8jUGn08CfEdTRgYhMypUQAfzSP8W6gNLe0q19/t4VA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/estree": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
- "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/js-yaml": {
- "version": "4.0.9",
- "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz",
- "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/json-schema": {
- "version": "7.0.15",
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
- "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/node": {
- "version": "20.19.0",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.0.tgz",
- "integrity": "sha512-hfrc+1tud1xcdVTABC2JiomZJEklMcXYNTVtZLAeqTVWD+qL5jkHKT+1lOtqDdGxt+mB53DTtiz673vfjU8D1Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "undici-types": "~6.21.0"
- }
- },
- "node_modules/@types/semver": {
- "version": "7.7.0",
- "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz",
- "integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/uuid": {
- "version": "9.0.8",
- "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz",
- "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@typescript-eslint/eslint-plugin": {
- "version": "6.21.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz",
- "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@eslint-community/regexpp": "^4.5.1",
- "@typescript-eslint/scope-manager": "6.21.0",
- "@typescript-eslint/type-utils": "6.21.0",
- "@typescript-eslint/utils": "6.21.0",
- "@typescript-eslint/visitor-keys": "6.21.0",
- "debug": "^4.3.4",
- "graphemer": "^1.4.0",
- "ignore": "^5.2.4",
- "natural-compare": "^1.4.0",
- "semver": "^7.5.4",
- "ts-api-utils": "^1.0.1"
- },
- "engines": {
- "node": "^16.0.0 || >=18.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha",
- "eslint": "^7.0.0 || ^8.0.0"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
- }
- },
- "node_modules/@typescript-eslint/parser": {
- "version": "6.21.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz",
- "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "@typescript-eslint/scope-manager": "6.21.0",
- "@typescript-eslint/types": "6.21.0",
- "@typescript-eslint/typescript-estree": "6.21.0",
- "@typescript-eslint/visitor-keys": "6.21.0",
- "debug": "^4.3.4"
- },
- "engines": {
- "node": "^16.0.0 || >=18.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "eslint": "^7.0.0 || ^8.0.0"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
- }
- },
- "node_modules/@typescript-eslint/scope-manager": {
- "version": "6.21.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz",
- "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@typescript-eslint/types": "6.21.0",
- "@typescript-eslint/visitor-keys": "6.21.0"
- },
- "engines": {
- "node": "^16.0.0 || >=18.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- }
- },
- "node_modules/@typescript-eslint/type-utils": {
- "version": "6.21.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz",
- "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@typescript-eslint/typescript-estree": "6.21.0",
- "@typescript-eslint/utils": "6.21.0",
- "debug": "^4.3.4",
- "ts-api-utils": "^1.0.1"
- },
- "engines": {
- "node": "^16.0.0 || >=18.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "eslint": "^7.0.0 || ^8.0.0"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
- }
- },
- "node_modules/@typescript-eslint/types": {
- "version": "6.21.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz",
- "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^16.0.0 || >=18.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- }
- },
- "node_modules/@typescript-eslint/typescript-estree": {
- "version": "6.21.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz",
- "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "@typescript-eslint/types": "6.21.0",
- "@typescript-eslint/visitor-keys": "6.21.0",
- "debug": "^4.3.4",
- "globby": "^11.1.0",
- "is-glob": "^4.0.3",
- "minimatch": "9.0.3",
- "semver": "^7.5.4",
- "ts-api-utils": "^1.0.1"
- },
- "engines": {
- "node": "^16.0.0 || >=18.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
- }
- },
- "node_modules/@typescript-eslint/utils": {
- "version": "6.21.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz",
- "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@eslint-community/eslint-utils": "^4.4.0",
- "@types/json-schema": "^7.0.12",
- "@types/semver": "^7.5.0",
- "@typescript-eslint/scope-manager": "6.21.0",
- "@typescript-eslint/types": "6.21.0",
- "@typescript-eslint/typescript-estree": "6.21.0",
- "semver": "^7.5.4"
- },
- "engines": {
- "node": "^16.0.0 || >=18.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "eslint": "^7.0.0 || ^8.0.0"
- }
- },
- "node_modules/@typescript-eslint/visitor-keys": {
- "version": "6.21.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz",
- "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@typescript-eslint/types": "6.21.0",
- "eslint-visitor-keys": "^3.4.1"
- },
- "engines": {
- "node": "^16.0.0 || >=18.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- }
- },
- "node_modules/@ungap/structured-clone": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz",
- "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/@vitest/coverage-v8": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-1.6.1.tgz",
- "integrity": "sha512-6YeRZwuO4oTGKxD3bijok756oktHSIm3eczVVzNe3scqzuhLwltIF3S9ZL/vwOVIpURmU6SnZhziXXAfw8/Qlw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@ampproject/remapping": "^2.2.1",
- "@bcoe/v8-coverage": "^0.2.3",
- "debug": "^4.3.4",
- "istanbul-lib-coverage": "^3.2.2",
- "istanbul-lib-report": "^3.0.1",
- "istanbul-lib-source-maps": "^5.0.4",
- "istanbul-reports": "^3.1.6",
- "magic-string": "^0.30.5",
- "magicast": "^0.3.3",
- "picocolors": "^1.0.0",
- "std-env": "^3.5.0",
- "strip-literal": "^2.0.0",
- "test-exclude": "^6.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- },
- "peerDependencies": {
- "vitest": "1.6.1"
- }
- },
- "node_modules/@vitest/expect": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.1.tgz",
- "integrity": "sha512-jXL+9+ZNIJKruofqXuuTClf44eSpcHlgj3CiuNihUF3Ioujtmc0zIa3UJOW5RjDK1YLBJZnWBlPuqhYycLioog==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@vitest/spy": "1.6.1",
- "@vitest/utils": "1.6.1",
- "chai": "^4.3.10"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
- "node_modules/@vitest/runner": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.1.tgz",
- "integrity": "sha512-3nSnYXkVkf3mXFfE7vVyPmi3Sazhb/2cfZGGs0JRzFsPFvAMBEcrweV1V1GsrstdXeKCTXlJbvnQwGWgEIHmOA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@vitest/utils": "1.6.1",
- "p-limit": "^5.0.0",
- "pathe": "^1.1.1"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
- "node_modules/@vitest/runner/node_modules/p-limit": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz",
- "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "yocto-queue": "^1.0.0"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/@vitest/runner/node_modules/yocto-queue": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz",
- "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12.20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/@vitest/snapshot": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.1.tgz",
- "integrity": "sha512-WvidQuWAzU2p95u8GAKlRMqMyN1yOJkGHnx3M1PL9Raf7AQ1kwLKg04ADlCa3+OXUZE7BceOhVZiuWAbzCKcUQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "magic-string": "^0.30.5",
- "pathe": "^1.1.1",
- "pretty-format": "^29.7.0"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
- "node_modules/@vitest/spy": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.1.tgz",
- "integrity": "sha512-MGcMmpGkZebsMZhbQKkAf9CX5zGvjkBTqf8Zx3ApYWXr3wG+QvEu2eXWfnIIWYSJExIp4V9FCKDEeygzkYrXMw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "tinyspy": "^2.2.0"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
- "node_modules/@vitest/utils": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.1.tgz",
- "integrity": "sha512-jOrrUvXM4Av9ZWiG1EajNto0u96kWAhJ1LmPmJhXXQx/32MecEKd10pOLYgS2BQx1TgkGhloPU1ArDW2vvaY6g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "diff-sequences": "^29.6.3",
- "estree-walker": "^3.0.3",
- "loupe": "^2.3.7",
- "pretty-format": "^29.7.0"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
- "node_modules/acorn": {
- "version": "8.15.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
- "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
- "dev": true,
- "license": "MIT",
- "bin": {
- "acorn": "bin/acorn"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/acorn-jsx": {
- "version": "5.3.2",
- "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
- "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
- "dev": true,
- "license": "MIT",
- "peerDependencies": {
- "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
- }
- },
- "node_modules/acorn-walk": {
- "version": "8.3.4",
- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",
- "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "acorn": "^8.11.0"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/ajv": {
- "version": "6.12.6",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
- "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "fast-deep-equal": "^3.1.1",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
- }
- },
- "node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/argparse": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
- "license": "Python-2.0"
- },
- "node_modules/array-union": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
- "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/assertion-error": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
- "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "*"
- }
- },
- "node_modules/asynckit": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
- "license": "MIT"
- },
- "node_modules/axios": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz",
- "integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==",
- "license": "MIT",
- "dependencies": {
- "follow-redirects": "^1.15.6",
- "form-data": "^4.0.0",
- "proxy-from-env": "^1.1.0"
- }
- },
- "node_modules/balanced-match": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/base64-js": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
- "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
- "node_modules/better-sqlite3": {
- "version": "9.6.0",
- "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-9.6.0.tgz",
- "integrity": "sha512-yR5HATnqeYNVnkaUTf4bOP2dJSnyhP4puJN/QPRyx4YkBEEUxib422n2XzPqDEHjQQqazoYoADdAm5vE15+dAQ==",
- "hasInstallScript": true,
- "license": "MIT",
- "dependencies": {
- "bindings": "^1.5.0",
- "prebuild-install": "^7.1.1"
- }
- },
- "node_modules/bindings": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
- "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
- "license": "MIT",
- "dependencies": {
- "file-uri-to-path": "1.0.0"
- }
- },
- "node_modules/bl": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
- "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
- "license": "MIT",
- "dependencies": {
- "buffer": "^5.5.0",
- "inherits": "^2.0.4",
- "readable-stream": "^3.4.0"
- }
- },
- "node_modules/brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0"
- }
- },
- "node_modules/braces": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
- "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "fill-range": "^7.1.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/buffer": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
- "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "base64-js": "^1.3.1",
- "ieee754": "^1.1.13"
- }
- },
- "node_modules/cac": {
- "version": "6.7.14",
- "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",
- "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/call-bind-apply-helpers": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
- "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0",
- "function-bind": "^1.1.2"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/callsites": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
- "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/chai": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz",
- "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "assertion-error": "^1.1.0",
- "check-error": "^1.0.3",
- "deep-eql": "^4.1.3",
- "get-func-name": "^2.0.2",
- "loupe": "^2.3.6",
- "pathval": "^1.1.1",
- "type-detect": "^4.1.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/check-error": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz",
- "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "get-func-name": "^2.0.2"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/chownr": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
- "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
- "license": "ISC"
- },
- "node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/combined-stream": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
- "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
- "license": "MIT",
- "dependencies": {
- "delayed-stream": "~1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/confbox": {
- "version": "0.1.8",
- "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz",
- "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/cross-spawn": {
- "version": "7.0.6",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
- "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "path-key": "^3.1.0",
- "shebang-command": "^2.0.0",
- "which": "^2.0.1"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/debug": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
- "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ms": "^2.1.3"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/decompress-response": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
- "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
- "license": "MIT",
- "dependencies": {
- "mimic-response": "^3.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/deep-eql": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz",
- "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "type-detect": "^4.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/deep-extend": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
- "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
- "license": "MIT",
- "engines": {
- "node": ">=4.0.0"
- }
- },
- "node_modules/deep-is": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
- "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/delayed-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
- "license": "MIT",
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/detect-libc": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz",
- "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/diff-sequences": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz",
- "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/dir-glob": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
- "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "path-type": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/doctrine": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
- "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "esutils": "^2.0.2"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/dunder-proto": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
- "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
- "license": "MIT",
- "dependencies": {
- "call-bind-apply-helpers": "^1.0.1",
- "es-errors": "^1.3.0",
- "gopd": "^1.2.0"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/end-of-stream": {
- "version": "1.4.4",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
- "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
- "license": "MIT",
- "dependencies": {
- "once": "^1.4.0"
- }
- },
- "node_modules/es-define-property": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
- "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/es-errors": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
- "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/es-object-atoms": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
- "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/es-set-tostringtag": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
- "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0",
- "get-intrinsic": "^1.2.6",
- "has-tostringtag": "^1.0.2",
- "hasown": "^2.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/esbuild": {
- "version": "0.21.5",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
- "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "bin": {
- "esbuild": "bin/esbuild"
- },
- "engines": {
- "node": ">=12"
- },
- "optionalDependencies": {
- "@esbuild/aix-ppc64": "0.21.5",
- "@esbuild/android-arm": "0.21.5",
- "@esbuild/android-arm64": "0.21.5",
- "@esbuild/android-x64": "0.21.5",
- "@esbuild/darwin-arm64": "0.21.5",
- "@esbuild/darwin-x64": "0.21.5",
- "@esbuild/freebsd-arm64": "0.21.5",
- "@esbuild/freebsd-x64": "0.21.5",
- "@esbuild/linux-arm": "0.21.5",
- "@esbuild/linux-arm64": "0.21.5",
- "@esbuild/linux-ia32": "0.21.5",
- "@esbuild/linux-loong64": "0.21.5",
- "@esbuild/linux-mips64el": "0.21.5",
- "@esbuild/linux-ppc64": "0.21.5",
- "@esbuild/linux-riscv64": "0.21.5",
- "@esbuild/linux-s390x": "0.21.5",
- "@esbuild/linux-x64": "0.21.5",
- "@esbuild/netbsd-x64": "0.21.5",
- "@esbuild/openbsd-x64": "0.21.5",
- "@esbuild/sunos-x64": "0.21.5",
- "@esbuild/win32-arm64": "0.21.5",
- "@esbuild/win32-ia32": "0.21.5",
- "@esbuild/win32-x64": "0.21.5"
- }
- },
- "node_modules/escape-string-regexp": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eslint": {
- "version": "8.57.1",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz",
- "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==",
- "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@eslint-community/eslint-utils": "^4.2.0",
- "@eslint-community/regexpp": "^4.6.1",
- "@eslint/eslintrc": "^2.1.4",
- "@eslint/js": "8.57.1",
- "@humanwhocodes/config-array": "^0.13.0",
- "@humanwhocodes/module-importer": "^1.0.1",
- "@nodelib/fs.walk": "^1.2.8",
- "@ungap/structured-clone": "^1.2.0",
- "ajv": "^6.12.4",
- "chalk": "^4.0.0",
- "cross-spawn": "^7.0.2",
- "debug": "^4.3.2",
- "doctrine": "^3.0.0",
- "escape-string-regexp": "^4.0.0",
- "eslint-scope": "^7.2.2",
- "eslint-visitor-keys": "^3.4.3",
- "espree": "^9.6.1",
- "esquery": "^1.4.2",
- "esutils": "^2.0.2",
- "fast-deep-equal": "^3.1.3",
- "file-entry-cache": "^6.0.1",
- "find-up": "^5.0.0",
- "glob-parent": "^6.0.2",
- "globals": "^13.19.0",
- "graphemer": "^1.4.0",
- "ignore": "^5.2.0",
- "imurmurhash": "^0.1.4",
- "is-glob": "^4.0.0",
- "is-path-inside": "^3.0.3",
- "js-yaml": "^4.1.0",
- "json-stable-stringify-without-jsonify": "^1.0.1",
- "levn": "^0.4.1",
- "lodash.merge": "^4.6.2",
- "minimatch": "^3.1.2",
- "natural-compare": "^1.4.0",
- "optionator": "^0.9.3",
- "strip-ansi": "^6.0.1",
- "text-table": "^0.2.0"
- },
- "bin": {
- "eslint": "bin/eslint.js"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/eslint-scope": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
- "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "esrecurse": "^4.3.0",
- "estraverse": "^5.2.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/eslint-visitor-keys": {
- "version": "3.4.3",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
- "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/eslint/node_modules/brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/eslint/node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/espree": {
- "version": "9.6.1",
- "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
- "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "acorn": "^8.9.0",
- "acorn-jsx": "^5.3.2",
- "eslint-visitor-keys": "^3.4.1"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/esquery": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz",
- "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "estraverse": "^5.1.0"
- },
- "engines": {
- "node": ">=0.10"
- }
- },
- "node_modules/esrecurse": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
- "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "estraverse": "^5.2.0"
- },
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/estraverse": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
- "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
- "dev": true,
- "license": "BSD-2-Clause",
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/estree-walker": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
- "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/estree": "^1.0.0"
- }
- },
- "node_modules/esutils": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
- "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
- "dev": true,
- "license": "BSD-2-Clause",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/execa": {
- "version": "8.0.1",
- "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz",
- "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "cross-spawn": "^7.0.3",
- "get-stream": "^8.0.1",
- "human-signals": "^5.0.0",
- "is-stream": "^3.0.0",
- "merge-stream": "^2.0.0",
- "npm-run-path": "^5.1.0",
- "onetime": "^6.0.0",
- "signal-exit": "^4.1.0",
- "strip-final-newline": "^3.0.0"
- },
- "engines": {
- "node": ">=16.17"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/execa?sponsor=1"
- }
- },
- "node_modules/expand-template": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
- "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
- "license": "(MIT OR WTFPL)",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/fast-deep-equal": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/fast-glob": {
- "version": "3.3.3",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
- "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@nodelib/fs.stat": "^2.0.2",
- "@nodelib/fs.walk": "^1.2.3",
- "glob-parent": "^5.1.2",
- "merge2": "^1.3.0",
- "micromatch": "^4.0.8"
- },
- "engines": {
- "node": ">=8.6.0"
- }
- },
- "node_modules/fast-glob/node_modules/glob-parent": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "is-glob": "^4.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/fast-json-stable-stringify": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
- "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/fast-levenshtein": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
- "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/fastq": {
- "version": "1.19.1",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",
- "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "reusify": "^1.0.4"
- }
- },
- "node_modules/file-entry-cache": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
- "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "flat-cache": "^3.0.4"
- },
- "engines": {
- "node": "^10.12.0 || >=12.0.0"
- }
- },
- "node_modules/file-uri-to-path": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
- "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
- "license": "MIT"
- },
- "node_modules/fill-range": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
- "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "to-regex-range": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/find-up": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
- "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "locate-path": "^6.0.0",
- "path-exists": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/flat-cache": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",
- "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "flatted": "^3.2.9",
- "keyv": "^4.5.3",
- "rimraf": "^3.0.2"
- },
- "engines": {
- "node": "^10.12.0 || >=12.0.0"
- }
- },
- "node_modules/flatted": {
- "version": "3.3.3",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz",
- "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/follow-redirects": {
- "version": "1.15.9",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
- "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
- "funding": [
- {
- "type": "individual",
- "url": "https://github.com/sponsors/RubenVerborgh"
- }
- ],
- "license": "MIT",
- "engines": {
- "node": ">=4.0"
- },
- "peerDependenciesMeta": {
- "debug": {
- "optional": true
- }
- }
- },
- "node_modules/form-data": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz",
- "integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==",
- "license": "MIT",
- "dependencies": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.8",
- "es-set-tostringtag": "^2.1.0",
- "hasown": "^2.0.2",
- "mime-types": "^2.1.12"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/fs-constants": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
- "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
- "license": "MIT"
- },
- "node_modules/fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/fsevents": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
- "node_modules/function-bind": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
- "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/get-func-name": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz",
- "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "*"
- }
- },
- "node_modules/get-intrinsic": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
- "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
- "license": "MIT",
- "dependencies": {
- "call-bind-apply-helpers": "^1.0.2",
- "es-define-property": "^1.0.1",
- "es-errors": "^1.3.0",
- "es-object-atoms": "^1.1.1",
- "function-bind": "^1.1.2",
- "get-proto": "^1.0.1",
- "gopd": "^1.2.0",
- "has-symbols": "^1.1.0",
- "hasown": "^2.0.2",
- "math-intrinsics": "^1.1.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/get-proto": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
- "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
- "license": "MIT",
- "dependencies": {
- "dunder-proto": "^1.0.1",
- "es-object-atoms": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/get-stream": {
- "version": "8.0.1",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz",
- "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/github-from-package": {
- "version": "0.0.0",
- "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
- "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==",
- "license": "MIT"
- },
- "node_modules/glob": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "deprecated": "Glob versions prior to v9 are no longer supported",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.1.1",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "engines": {
- "node": "*"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/glob-parent": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
- "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "is-glob": "^4.0.3"
- },
- "engines": {
- "node": ">=10.13.0"
- }
- },
- "node_modules/glob/node_modules/brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/glob/node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/globals": {
- "version": "13.24.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
- "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "type-fest": "^0.20.2"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/globby": {
- "version": "11.1.0",
- "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
- "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "array-union": "^2.1.0",
- "dir-glob": "^3.0.1",
- "fast-glob": "^3.2.9",
- "ignore": "^5.2.0",
- "merge2": "^1.4.1",
- "slash": "^3.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/gopd": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
- "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/graphemer": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
- "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/has-symbols": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
- "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/has-tostringtag": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
- "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
- "license": "MIT",
- "dependencies": {
- "has-symbols": "^1.0.3"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/hasown": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
- "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
- "license": "MIT",
- "dependencies": {
- "function-bind": "^1.1.2"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/html-escaper": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
- "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/human-signals": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz",
- "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": ">=16.17.0"
- }
- },
- "node_modules/ieee754": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
- "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "BSD-3-Clause"
- },
- "node_modules/ignore": {
- "version": "5.3.2",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
- "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 4"
- }
- },
- "node_modules/import-fresh": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
- "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "parent-module": "^1.0.0",
- "resolve-from": "^4.0.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/imurmurhash": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
- "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.8.19"
- }
- },
- "node_modules/inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
- "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "node_modules/inherits": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
- "license": "ISC"
- },
- "node_modules/ini": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
- "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
- "license": "ISC"
- },
- "node_modules/is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-glob": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "is-extglob": "^2.1.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.12.0"
- }
- },
- "node_modules/is-path-inside": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
- "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/is-stream": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
- "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/isexe": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/istanbul-lib-coverage": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz",
- "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==",
- "dev": true,
- "license": "BSD-3-Clause",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/istanbul-lib-report": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz",
- "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "istanbul-lib-coverage": "^3.0.0",
- "make-dir": "^4.0.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/istanbul-lib-source-maps": {
- "version": "5.0.6",
- "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz",
- "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "@jridgewell/trace-mapping": "^0.3.23",
- "debug": "^4.1.1",
- "istanbul-lib-coverage": "^3.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/istanbul-reports": {
- "version": "3.1.7",
- "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz",
- "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "html-escaper": "^2.0.0",
- "istanbul-lib-report": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/js-tokens": {
- "version": "9.0.1",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz",
- "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/js-yaml": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
- "license": "MIT",
- "dependencies": {
- "argparse": "^2.0.1"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
- }
- },
- "node_modules/json-buffer": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
- "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/json-schema-traverse": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
- "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/json-stable-stringify-without-jsonify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
- "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/keyv": {
- "version": "4.5.4",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
- "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "json-buffer": "3.0.1"
- }
- },
- "node_modules/levn": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
- "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "prelude-ls": "^1.2.1",
- "type-check": "~0.4.0"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/local-pkg": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.1.tgz",
- "integrity": "sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "mlly": "^1.7.3",
- "pkg-types": "^1.2.1"
- },
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/antfu"
- }
- },
- "node_modules/locate-path": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
- "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-locate": "^5.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/lodash.merge": {
- "version": "4.6.2",
- "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
- "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/loupe": {
- "version": "2.3.7",
- "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz",
- "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "get-func-name": "^2.0.1"
- }
- },
- "node_modules/magic-string": {
- "version": "0.30.17",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz",
- "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/sourcemap-codec": "^1.5.0"
- }
- },
- "node_modules/magicast": {
- "version": "0.3.5",
- "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz",
- "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/parser": "^7.25.4",
- "@babel/types": "^7.25.4",
- "source-map-js": "^1.2.0"
- }
- },
- "node_modules/make-dir": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz",
- "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "semver": "^7.5.3"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/math-intrinsics": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
- "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/merge-stream": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
- "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/merge2": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
- "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/micromatch": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
- "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "braces": "^3.0.3",
- "picomatch": "^2.3.1"
- },
- "engines": {
- "node": ">=8.6"
- }
- },
- "node_modules/mime-db": {
- "version": "1.52.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
- "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mime-types": {
- "version": "2.1.35",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
- "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
- "license": "MIT",
- "dependencies": {
- "mime-db": "1.52.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mimic-fn": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
- "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/mimic-response": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
- "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/minimatch": {
- "version": "9.0.3",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
- "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^2.0.1"
- },
- "engines": {
- "node": ">=16 || 14 >=14.17"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/minimist": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
- "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/mkdirp-classic": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
- "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
- "license": "MIT"
- },
- "node_modules/mlly": {
- "version": "1.7.4",
- "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz",
- "integrity": "sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "acorn": "^8.14.0",
- "pathe": "^2.0.1",
- "pkg-types": "^1.3.0",
- "ufo": "^1.5.4"
- }
- },
- "node_modules/mlly/node_modules/pathe": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
- "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/nanoid": {
- "version": "3.3.11",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
- "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
- "license": "MIT",
- "bin": {
- "nanoid": "bin/nanoid.cjs"
- },
- "engines": {
- "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
- }
- },
- "node_modules/napi-build-utils": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz",
- "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==",
- "license": "MIT"
- },
- "node_modules/natural-compare": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
- "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/node-abi": {
- "version": "3.75.0",
- "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.75.0.tgz",
- "integrity": "sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg==",
- "license": "MIT",
- "dependencies": {
- "semver": "^7.3.5"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/npm-run-path": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz",
- "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "path-key": "^4.0.0"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/npm-run-path/node_modules/path-key": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
- "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "license": "ISC",
- "dependencies": {
- "wrappy": "1"
- }
- },
- "node_modules/onetime": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
- "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "mimic-fn": "^4.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/optionator": {
- "version": "0.9.4",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
- "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "deep-is": "^0.1.3",
- "fast-levenshtein": "^2.0.6",
- "levn": "^0.4.1",
- "prelude-ls": "^1.2.1",
- "type-check": "^0.4.0",
- "word-wrap": "^1.2.5"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/p-limit": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
- "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "yocto-queue": "^0.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/p-locate": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
- "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-limit": "^3.0.2"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/parent-module": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
- "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "callsites": "^3.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/path-exists": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
- "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/path-key": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
- "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/path-type": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
- "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/pathe": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz",
- "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/pathval": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
- "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "*"
- }
- },
- "node_modules/picocolors": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
- "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
- "node_modules/pkg-types": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz",
- "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "confbox": "^0.1.8",
- "mlly": "^1.7.4",
- "pathe": "^2.0.1"
- }
- },
- "node_modules/pkg-types/node_modules/pathe": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
- "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/postcss": {
- "version": "8.5.4",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.4.tgz",
- "integrity": "sha512-QSa9EBe+uwlGTFmHsPKokv3B/oEMQZxfqW0QqNCyhpa6mB1afzulwn8hihglqAb2pOw+BJgNlmXQ8la2VeHB7w==",
- "dev": true,
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/postcss"
- },
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "nanoid": "^3.3.11",
- "picocolors": "^1.1.1",
- "source-map-js": "^1.2.1"
- },
- "engines": {
- "node": "^10 || ^12 || >=14"
- }
- },
- "node_modules/prebuild-install": {
- "version": "7.1.3",
- "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz",
- "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==",
- "license": "MIT",
- "dependencies": {
- "detect-libc": "^2.0.0",
- "expand-template": "^2.0.3",
- "github-from-package": "0.0.0",
- "minimist": "^1.2.3",
- "mkdirp-classic": "^0.5.3",
- "napi-build-utils": "^2.0.0",
- "node-abi": "^3.3.0",
- "pump": "^3.0.0",
- "rc": "^1.2.7",
- "simple-get": "^4.0.0",
- "tar-fs": "^2.0.0",
- "tunnel-agent": "^0.6.0"
- },
- "bin": {
- "prebuild-install": "bin.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/prelude-ls": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
- "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/pretty-format": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz",
- "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/schemas": "^29.6.3",
- "ansi-styles": "^5.0.0",
- "react-is": "^18.0.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/pretty-format/node_modules/ansi-styles": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
- "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/proxy-from-env": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
- "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
- "license": "MIT"
- },
- "node_modules/pump": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz",
- "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==",
- "license": "MIT",
- "dependencies": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- }
- },
- "node_modules/punycode": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
- "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/queue-microtask": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
- "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
- "node_modules/rc": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
- "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
- "license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
- "dependencies": {
- "deep-extend": "^0.6.0",
- "ini": "~1.3.0",
- "minimist": "^1.2.0",
- "strip-json-comments": "~2.0.1"
- },
- "bin": {
- "rc": "cli.js"
- }
- },
- "node_modules/rc/node_modules/strip-json-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/react-is": {
- "version": "18.3.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
- "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/readable-stream": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
- "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
- "license": "MIT",
- "dependencies": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/resolve-from": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
- "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/reusify": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
- "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "iojs": ">=1.0.0",
- "node": ">=0.10.0"
- }
- },
- "node_modules/rimraf": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
- "deprecated": "Rimraf versions prior to v4 are no longer supported",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "glob": "^7.1.3"
- },
- "bin": {
- "rimraf": "bin.js"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/rollup": {
- "version": "4.42.0",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.42.0.tgz",
- "integrity": "sha512-LW+Vse3BJPyGJGAJt1j8pWDKPd73QM8cRXYK1IxOBgL2AGLu7Xd2YOW0M2sLUBCkF5MshXXtMApyEAEzMVMsnw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/estree": "1.0.7"
- },
- "bin": {
- "rollup": "dist/bin/rollup"
- },
- "engines": {
- "node": ">=18.0.0",
- "npm": ">=8.0.0"
- },
- "optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.42.0",
- "@rollup/rollup-android-arm64": "4.42.0",
- "@rollup/rollup-darwin-arm64": "4.42.0",
- "@rollup/rollup-darwin-x64": "4.42.0",
- "@rollup/rollup-freebsd-arm64": "4.42.0",
- "@rollup/rollup-freebsd-x64": "4.42.0",
- "@rollup/rollup-linux-arm-gnueabihf": "4.42.0",
- "@rollup/rollup-linux-arm-musleabihf": "4.42.0",
- "@rollup/rollup-linux-arm64-gnu": "4.42.0",
- "@rollup/rollup-linux-arm64-musl": "4.42.0",
- "@rollup/rollup-linux-loongarch64-gnu": "4.42.0",
- "@rollup/rollup-linux-powerpc64le-gnu": "4.42.0",
- "@rollup/rollup-linux-riscv64-gnu": "4.42.0",
- "@rollup/rollup-linux-riscv64-musl": "4.42.0",
- "@rollup/rollup-linux-s390x-gnu": "4.42.0",
- "@rollup/rollup-linux-x64-gnu": "4.42.0",
- "@rollup/rollup-linux-x64-musl": "4.42.0",
- "@rollup/rollup-win32-arm64-msvc": "4.42.0",
- "@rollup/rollup-win32-ia32-msvc": "4.42.0",
- "@rollup/rollup-win32-x64-msvc": "4.42.0",
- "fsevents": "~2.3.2"
- }
- },
- "node_modules/rollup/node_modules/@types/estree": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
- "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/run-parallel": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
- "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "queue-microtask": "^1.2.2"
- }
- },
- "node_modules/safe-buffer": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
- "node_modules/semver": {
- "version": "7.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
- "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/shebang-command": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
- "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "shebang-regex": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/shebang-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
- "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/siginfo": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
- "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/signal-exit": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
- "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
- "dev": true,
- "license": "ISC",
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/simple-concat": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
- "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
- "node_modules/simple-get": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
- "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "decompress-response": "^6.0.0",
- "once": "^1.3.1",
- "simple-concat": "^1.0.0"
- }
- },
- "node_modules/slash": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/source-map-js": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
- "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
- "dev": true,
- "license": "BSD-3-Clause",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/stackback": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",
- "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/std-env": {
- "version": "3.9.0",
- "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz",
- "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
- "license": "MIT",
- "dependencies": {
- "safe-buffer": "~5.2.0"
- }
- },
- "node_modules/strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-final-newline": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
- "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/strip-json-comments": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
- "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/strip-literal": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.1.tgz",
- "integrity": "sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "js-tokens": "^9.0.1"
- },
- "funding": {
- "url": "https://github.com/sponsors/antfu"
- }
- },
- "node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/tar-fs": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.3.tgz",
- "integrity": "sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg==",
- "license": "MIT",
- "dependencies": {
- "chownr": "^1.1.1",
- "mkdirp-classic": "^0.5.2",
- "pump": "^3.0.0",
- "tar-stream": "^2.1.4"
- }
- },
- "node_modules/tar-stream": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
- "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
- "license": "MIT",
- "dependencies": {
- "bl": "^4.0.3",
- "end-of-stream": "^1.4.1",
- "fs-constants": "^1.0.0",
- "inherits": "^2.0.3",
- "readable-stream": "^3.1.1"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/test-exclude": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
- "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "@istanbuljs/schema": "^0.1.2",
- "glob": "^7.1.4",
- "minimatch": "^3.0.4"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/test-exclude/node_modules/brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/test-exclude/node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/text-table": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
- "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/tinybench": {
- "version": "2.9.0",
- "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz",
- "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/tinypool": {
- "version": "0.8.4",
- "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz",
- "integrity": "sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=14.0.0"
- }
- },
- "node_modules/tinyspy": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz",
- "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=14.0.0"
- }
- },
- "node_modules/to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "is-number": "^7.0.0"
- },
- "engines": {
- "node": ">=8.0"
- }
- },
- "node_modules/ts-api-utils": {
- "version": "1.4.3",
- "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz",
- "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=16"
- },
- "peerDependencies": {
- "typescript": ">=4.2.0"
- }
- },
- "node_modules/tunnel-agent": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
- "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
- "license": "Apache-2.0",
- "dependencies": {
- "safe-buffer": "^5.0.1"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/type-check": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
- "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "prelude-ls": "^1.2.1"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/type-detect": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz",
- "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/type-fest": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
- "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
- "dev": true,
- "license": "(MIT OR CC0-1.0)",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/typescript": {
- "version": "5.8.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
- "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
- "dev": true,
- "license": "Apache-2.0",
- "bin": {
- "tsc": "bin/tsc",
- "tsserver": "bin/tsserver"
- },
- "engines": {
- "node": ">=14.17"
- }
- },
- "node_modules/ufo": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz",
- "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/undici-types": {
- "version": "6.21.0",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
- "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/uri-js": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
- "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "punycode": "^2.1.0"
- }
- },
- "node_modules/util-deprecate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
- "license": "MIT"
- },
- "node_modules/uuid": {
- "version": "9.0.1",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
- "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
- "funding": [
- "https://github.com/sponsors/broofa",
- "https://github.com/sponsors/ctavan"
- ],
- "license": "MIT",
- "bin": {
- "uuid": "dist/bin/uuid"
- }
- },
- "node_modules/vite": {
- "version": "5.4.19",
- "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.19.tgz",
- "integrity": "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "esbuild": "^0.21.3",
- "postcss": "^8.4.43",
- "rollup": "^4.20.0"
- },
- "bin": {
- "vite": "bin/vite.js"
- },
- "engines": {
- "node": "^18.0.0 || >=20.0.0"
- },
- "funding": {
- "url": "https://github.com/vitejs/vite?sponsor=1"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.3"
- },
- "peerDependencies": {
- "@types/node": "^18.0.0 || >=20.0.0",
- "less": "*",
- "lightningcss": "^1.21.0",
- "sass": "*",
- "sass-embedded": "*",
- "stylus": "*",
- "sugarss": "*",
- "terser": "^5.4.0"
- },
- "peerDependenciesMeta": {
- "@types/node": {
- "optional": true
- },
- "less": {
- "optional": true
- },
- "lightningcss": {
- "optional": true
- },
- "sass": {
- "optional": true
- },
- "sass-embedded": {
- "optional": true
- },
- "stylus": {
- "optional": true
- },
- "sugarss": {
- "optional": true
- },
- "terser": {
- "optional": true
- }
- }
- },
- "node_modules/vite-node": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.6.1.tgz",
- "integrity": "sha512-YAXkfvGtuTzwWbDSACdJSg4A4DZiAqckWe90Zapc/sEX3XvHcw1NdurM/6od8J207tSDqNbSsgdCacBgvJKFuA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "cac": "^6.7.14",
- "debug": "^4.3.4",
- "pathe": "^1.1.1",
- "picocolors": "^1.0.0",
- "vite": "^5.0.0"
- },
- "bin": {
- "vite-node": "vite-node.mjs"
- },
- "engines": {
- "node": "^18.0.0 || >=20.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
- "node_modules/vitest": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.1.tgz",
- "integrity": "sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@vitest/expect": "1.6.1",
- "@vitest/runner": "1.6.1",
- "@vitest/snapshot": "1.6.1",
- "@vitest/spy": "1.6.1",
- "@vitest/utils": "1.6.1",
- "acorn-walk": "^8.3.2",
- "chai": "^4.3.10",
- "debug": "^4.3.4",
- "execa": "^8.0.1",
- "local-pkg": "^0.5.0",
- "magic-string": "^0.30.5",
- "pathe": "^1.1.1",
- "picocolors": "^1.0.0",
- "std-env": "^3.5.0",
- "strip-literal": "^2.0.0",
- "tinybench": "^2.5.1",
- "tinypool": "^0.8.3",
- "vite": "^5.0.0",
- "vite-node": "1.6.1",
- "why-is-node-running": "^2.2.2"
- },
- "bin": {
- "vitest": "vitest.mjs"
- },
- "engines": {
- "node": "^18.0.0 || >=20.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- },
- "peerDependencies": {
- "@edge-runtime/vm": "*",
- "@types/node": "^18.0.0 || >=20.0.0",
- "@vitest/browser": "1.6.1",
- "@vitest/ui": "1.6.1",
- "happy-dom": "*",
- "jsdom": "*"
- },
- "peerDependenciesMeta": {
- "@edge-runtime/vm": {
- "optional": true
- },
- "@types/node": {
- "optional": true
- },
- "@vitest/browser": {
- "optional": true
- },
- "@vitest/ui": {
- "optional": true
- },
- "happy-dom": {
- "optional": true
- },
- "jsdom": {
- "optional": true
- }
- }
- },
- "node_modules/which": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "node-which": "bin/node-which"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/why-is-node-running": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz",
- "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "siginfo": "^2.0.0",
- "stackback": "0.0.2"
- },
- "bin": {
- "why-is-node-running": "cli.js"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/word-wrap": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
- "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
- "license": "ISC"
- },
- "node_modules/yocto-queue": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
- "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- }
- }
-}
diff --git a/archive/legacy-memory-system/package.json b/archive/legacy-memory-system/package.json
deleted file mode 100644
index 60ac398421..0000000000
--- a/archive/legacy-memory-system/package.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "@claude-flow/memory",
- "version": "1.0.0",
- "description": "SPARC Memory Bank - Persistent memory system for Claude-Flow",
- "main": "./dist/index.js",
- "types": "./dist/index.d.ts",
- "scripts": {
- "build": "tsc",
- "test": "vitest run",
- "test:watch": "vitest",
- "test:coverage": "vitest run --coverage",
- "lint": "eslint src --ext .ts",
- "clean": "rm -rf dist coverage"
- },
- "keywords": [
- "memory",
- "storage",
- "crdt",
- "sqlite",
- "markdown",
- "cache",
- "replication",
- "vector-search"
- ],
- "author": "rUv",
- "license": "MIT",
- "dependencies": {
- "better-sqlite3": "^9.2.2",
- "uuid": "^9.0.1",
- "js-yaml": "^4.1.0",
- "axios": "^1.6.2"
- },
- "devDependencies": {
- "@types/better-sqlite3": "^7.6.8",
- "@types/js-yaml": "^4.0.9",
- "@types/node": "^20.10.5",
- "@types/uuid": "^9.0.7",
- "typescript": "^5.3.3",
- "vitest": "^1.1.0",
- "@vitest/coverage-v8": "^1.1.0",
- "eslint": "^8.56.0",
- "@typescript-eslint/eslint-plugin": "^6.15.0",
- "@typescript-eslint/parser": "^6.15.0"
- },
- "engines": {
- "node": ">=18.0.0"
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/sessions/README.md b/archive/legacy-memory-system/sessions/README.md
deleted file mode 100644
index 1fc66b5f82..0000000000
--- a/archive/legacy-memory-system/sessions/README.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# Session Memory Storage
-
-## Purpose
-This directory stores session-based memory data, conversation history, and contextual information for development sessions using the Claude-Flow orchestration system.
-
-## Structure
-Sessions are organized by date and session ID for easy retrieval:
-
-```
-memory/sessions/
-├── 2024-01-10/
-│ ├── session_001/
-│ │ ├── metadata.json # Session metadata and configuration
-│ │ ├── conversation.md # Full conversation history
-│ │ ├── decisions.md # Key decisions and rationale
-│ │ ├── artifacts/ # Generated files and outputs
-│ │ └── coordination_state/ # Coordination system snapshots
-│ └── ...
-└── shared/
- ├── patterns.md # Common session patterns
- └── templates/ # Session template files
-```
-
-## Usage Guidelines
-1. **Session Isolation**: Each session gets its own directory
-2. **Metadata Completeness**: Always fill out session metadata
-3. **Conversation Logging**: Document all significant interactions
-4. **Artifact Organization**: Structure generated files clearly
-5. **State Preservation**: Snapshot coordination state regularly
-
-## Last Updated
-2025-06-16T20:04:49.343Z
diff --git a/archive/legacy-memory-system/src/backends/markdown-backend.ts b/archive/legacy-memory-system/src/backends/markdown-backend.ts
deleted file mode 100644
index 5ce7028109..0000000000
--- a/archive/legacy-memory-system/src/backends/markdown-backend.ts
+++ /dev/null
@@ -1,570 +0,0 @@
-/**
- * SPARC Memory Bank - Markdown Backend
- * File-based storage using structured markdown files
- */
-
-import { promises as fs } from 'fs';
-import * as path from 'path';
-import * as yaml from 'js-yaml';
-import { MemoryItem, MemoryQuery, MemoryBackend, BackendStats } from '../types';
-
-export interface MarkdownBackendConfig {
- rootPath: string;
- gitIntegration?: boolean;
- compression?: boolean;
- prettyPrint?: boolean;
-}
-
-export class MarkdownBackend implements MemoryBackend {
- private config: MarkdownBackendConfig;
- private indexPath: string;
- private index: Map<string, MemoryIndexEntry> = new Map();
-
- constructor(config: MarkdownBackendConfig) {
- this.config = config;
- this.indexPath = path.join(config.rootPath, '.memory-index.json');
- }
-
- async initialize(): Promise<void> {
- // Create root directory if it doesn't exist
- await fs.mkdir(this.config.rootPath, { recursive: true });
-
- // Create directory structure
- const dirs = [
- 'agent-sessions',
- 'shared-knowledge',
- 'shared-knowledge/calibration-values',
- 'shared-knowledge/test-patterns',
- 'shared-knowledge/failure-analysis',
- 'shared-knowledge/architectural-decisions',
- 'shared-knowledge/code-patterns',
- 'coordination',
- 'project-memory',
- 'github-integration'
- ];
-
- for (const dir of dirs) {
- await fs.mkdir(path.join(this.config.rootPath, dir), { recursive: true });
- }
-
- // Load index
- await this.loadIndex();
- }
-
- async store(item: MemoryItem): Promise<void> {
- const filePath = this.getFilePath(item);
- const dirPath = path.dirname(filePath);
-
- // Ensure directory exists
- await fs.mkdir(dirPath, { recursive: true });
-
- // Prepare content
- const content = this.itemToMarkdown(item);
-
- // Write file
- await fs.writeFile(filePath, content, 'utf-8');
-
- // Update index
- this.updateIndex(item, filePath);
- await this.saveIndex();
-
- // Git integration
- if (this.config.gitIntegration) {
- await this.gitAdd(filePath);
- }
- }
-
- async get(category: string, key: string): Promise<MemoryItem | null> {
- const indexKey = `${category}:${key}`;
- const entry = this.index.get(indexKey);
-
- if (!entry) return null;
-
- try {
- const content = await fs.readFile(entry.path, 'utf-8');
- return this.markdownToItem(content, category, key);
- } catch (error) {
- // File might have been deleted
- this.index.delete(indexKey);
- return null;
- }
- }
-
- async query(query: MemoryQuery): Promise<MemoryItem[]> {
- const results: MemoryItem[] = [];
-
- for (const [key, entry] of this.index.entries()) {
- // Check if entry matches query criteria
- if (!this.matchesQuery(entry, query)) continue;
-
- try {
- const content = await fs.readFile(entry.path, 'utf-8');
- const item = this.markdownToItem(content, entry.category, entry.key);
-
- // Apply custom filter
- if (!query.filter || query.filter(item)) {
- results.push(item);
- }
- } catch (error) {
- // Skip files that can't be read
- continue;
- }
- }
-
- // Sort results
- if (query.orderBy) {
- results.sort((a, b) => {
- const aVal = this.getOrderValue(a, query.orderBy!);
- const bVal = this.getOrderValue(b, query.orderBy!);
- const direction = query.orderDirection === 'desc' ? -1 : 1;
-
- if (aVal < bVal) return -1 * direction;
- if (aVal > bVal) return 1 * direction;
- return 0;
- });
- }
-
- // Apply limit and offset
- const start = query.offset || 0;
- const end = query.limit ? start + query.limit : results.length;
-
- return results.slice(start, end);
- }
-
- async delete(category: string, key: string): Promise<boolean> {
- const indexKey = `${category}:${key}`;
- const entry = this.index.get(indexKey);
-
- if (!entry) return false;
-
- try {
- await fs.unlink(entry.path);
- this.index.delete(indexKey);
- await this.saveIndex();
-
- if (this.config.gitIntegration) {
- await this.gitRemove(entry.path);
- }
-
- return true;
- } catch (error) {
- return false;
- }
- }
-
- async update(category: string, key: string, updates: Partial<MemoryItem>): Promise<boolean> {
- const existing = await this.get(category, key);
- if (!existing) return false;
-
- const merged = {
- ...existing,
- ...updates,
- metadata: {
- ...existing.metadata,
- ...updates.metadata,
- updated_at: Date.now()
- }
- };
-
- await this.store(merged);
- return true;
- }
-
- async getStats(): Promise<BackendStats> {
- let totalItems = 0;
- let sizeBytes = 0;
- let oldestItem: number | undefined;
- let newestItem: number | undefined;
- const categories = new Set<string>();
-
- for (const entry of this.index.values()) {
- totalItems++;
- categories.add(entry.category);
-
- try {
- const stat = await fs.stat(entry.path);
- sizeBytes += stat.size;
-
- const timestamp = entry.metadata?.timestamp || stat.mtimeMs;
- if (!oldestItem || timestamp < oldestItem) oldestItem = timestamp;
- if (!newestItem || timestamp > newestItem) newestItem = timestamp;
- } catch (error) {
- // Skip files that can't be accessed
- }
- }
-
- return {
- totalItems,
- categories: categories.size,
- sizeBytes,
- oldestItem,
- newestItem
- };
- }
-
- async close(): Promise<void> {
- await this.saveIndex();
- }
-
- /**
- * Search through markdown files
- */
- async search(searchTerm: string, options?: {
- categories?: string[];
- limit?: number;
- }): Promise<MemoryItem[]> {
- const results: MemoryItem[] = [];
- const searchLower = searchTerm.toLowerCase();
- let count = 0;
-
- for (const [key, entry] of this.index.entries()) {
- // Check category filter
- if (options?.categories && !options.categories.includes(entry.category)) {
- continue;
- }
-
- try {
- const content = await fs.readFile(entry.path, 'utf-8');
-
- // Simple text search
- if (content.toLowerCase().includes(searchLower)) {
- const item = this.markdownToItem(content, entry.category, entry.key);
- results.push(item);
- count++;
-
- if (options?.limit && count >= options.limit) {
- break;
- }
- }
- } catch (error) {
- // Skip files that can't be read
- }
- }
-
- return results;
- }
-
- /**
- * Convert MemoryItem to Markdown format
- */
- private itemToMarkdown(item: MemoryItem): string {
- let content = `# ${item.key}\n\n`;
-
- // Add frontmatter
- const frontmatter = {
- id: item.id,
- category: item.category,
- created: new Date(item.metadata?.timestamp || Date.now()).toISOString(),
- version: item.metadata?.version || '1.0',
- namespace: item.metadata?.namespace || 'default',
- tags: item.metadata?.tags || [],
- ...item.metadata
- };
-
- content += '---\n';
- content += yaml.dump(frontmatter, {
- indent: 2,
- lineWidth: -1,
- noRefs: true
- });
- content += '---\n\n';
-
- // Add content based on value type
- if (typeof item.value === 'string') {
- content += item.value;
- } else if (this.config.prettyPrint) {
- content += '```json\n';
- content += JSON.stringify(item.value, null, 2);
- content += '\n```';
- } else {
- content += JSON.stringify(item.value);
- }
-
- // Add vector embedding if present
- if (item.vectorEmbedding) {
- content += '\n\n<!-- Vector Embedding -->\n';
- content += `<!-- ${JSON.stringify(item.vectorEmbedding)} -->`;
- }
-
- return content;
- }
-
- /**
- * Convert Markdown content to MemoryItem
- */
- private markdownToItem(content: string, category: string, key: string): MemoryItem {
- // Extract frontmatter
- const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
- let metadata: any = {};
- let bodyContent = content;
-
- if (frontmatterMatch) {
- try {
- metadata = yaml.load(frontmatterMatch[1]) as any;
- bodyContent = content.substring(frontmatterMatch[0].length).trim();
- } catch (error) {
- // Invalid YAML, skip frontmatter
- }
- }
-
- // Extract vector embedding if present
- let vectorEmbedding: number[] | undefined;
- const vectorMatch = bodyContent.match(/<!-- Vector Embedding -->\n<!-- (.+?) -->/);
- if (vectorMatch) {
- try {
- vectorEmbedding = JSON.parse(vectorMatch[1]);
- bodyContent = bodyContent.replace(vectorMatch[0], '').trim();
- } catch (error) {
- // Invalid vector data
- }
- }
-
- // Parse value
- let value: any = bodyContent;
-
- // Try to parse JSON content
- const jsonMatch = bodyContent.match(/```json\n([\s\S]*?)\n```/);
- if (jsonMatch) {
- try {
- value = JSON.parse(jsonMatch[1]);
- } catch (error) {
- // Not valid JSON, keep as string
- }
- } else if (bodyContent.startsWith('{') || bodyContent.startsWith('[')) {
- try {
- value = JSON.parse(bodyContent);
- } catch (error) {
- // Not valid JSON, keep as string
- }
- }
-
- return {
- id: metadata.id || key,
- category,
- key,
- value,
- metadata: {
- ...metadata,
- timestamp: metadata.created ? new Date(metadata.created).getTime() : Date.now()
- },
- vectorEmbedding,
- ttl: metadata.ttl
- };
- }
-
- /**
- * Get file path for a memory item
- */
- private getFilePath(item: MemoryItem): string {
- const namespace = item.metadata?.namespace || 'default';
- const safeName = this.sanitizeFilename(item.key);
-
- // Map categories to directory structure
- const categoryPath = this.getCategoryPath(item.category);
-
- return path.join(
- this.config.rootPath,
- categoryPath,
- namespace,
- `${safeName}.md`
- );
- }
-
- /**
- * Map category to directory path
- */
- private getCategoryPath(category: string): string {
- const mapping: Record<string, string> = {
- 'agent-session': 'agent-sessions',
- 'calibration': 'shared-knowledge/calibration-values',
- 'test-pattern': 'shared-knowledge/test-patterns',
- 'failure': 'shared-knowledge/failure-analysis',
- 'architecture': 'shared-knowledge/architectural-decisions',
- 'code-pattern': 'shared-knowledge/code-patterns',
- 'coordination': 'coordination',
- 'project': 'project-memory',
- 'github': 'github-integration'
- };
-
- return mapping[category] || `shared-knowledge/${category}`;
- }
-
- /**
- * Sanitize filename
- */
- private sanitizeFilename(name: string): string {
- return name
- .replace(/[<>:"/\\|?*]/g, '-')
- .replace(/\s+/g, '-')
- .toLowerCase()
- .substring(0, 255);
- }
-
- /**
- * Load index from disk
- */
- private async loadIndex(): Promise<void> {
- try {
- const content = await fs.readFile(this.indexPath, 'utf-8');
- const data = JSON.parse(content);
- this.index = new Map(Object.entries(data));
- } catch (error) {
- // Index doesn't exist, scan directory
- await this.rebuildIndex();
- }
- }
-
- /**
- * Save index to disk
- */
- private async saveIndex(): Promise<void> {
- const data = Object.fromEntries(this.index);
- await fs.writeFile(
- this.indexPath,
- JSON.stringify(data, null, 2),
- 'utf-8'
- );
- }
-
- /**
- * Rebuild index by scanning directory
- */
- private async rebuildIndex(): Promise<void> {
- this.index.clear();
- await this.scanDirectory(this.config.rootPath);
- await this.saveIndex();
- }
-
- /**
- * Scan directory recursively
- */
- private async scanDirectory(dirPath: string): Promise<void> {
- const entries = await fs.readdir(dirPath, { withFileTypes: true });
-
- for (const entry of entries) {
- const fullPath = path.join(dirPath, entry.name);
-
- if (entry.isDirectory()) {
- await this.scanDirectory(fullPath);
- } else if (entry.name.endsWith('.md')) {
- try {
- const content = await fs.readFile(fullPath, 'utf-8');
- const relativePath = path.relative(this.config.rootPath, fullPath);
- const category = this.getCategoryFromPath(relativePath);
- const key = path.basename(entry.name, '.md');
-
- const item = this.markdownToItem(content, category, key);
- this.updateIndex(item, fullPath);
- } catch (error) {
- // Skip files that can't be read
- }
- }
- }
- }
-
- /**
- * Get category from file path
- */
- private getCategoryFromPath(relativePath: string): string {
- const parts = relativePath.split(path.sep);
-
- // Map directory structure back to categories
- if (parts[0] === 'agent-sessions') return 'agent-session';
- if (parts[0] === 'coordination') return 'coordination';
- if (parts[0] === 'project-memory') return 'project';
- if (parts[0] === 'github-integration') return 'github';
-
- if (parts[0] === 'shared-knowledge') {
- if (parts[1] === 'calibration-values') return 'calibration';
- if (parts[1] === 'test-patterns') return 'test-pattern';
- if (parts[1] === 'failure-analysis') return 'failure';
- if (parts[1] === 'architectural-decisions') return 'architecture';
- if (parts[1] === 'code-patterns') return 'code-pattern';
- return parts[1] || 'general';
- }
-
- return 'general';
- }
-
- /**
- * Update index entry
- */
- private updateIndex(item: MemoryItem, filePath: string): void {
- const indexKey = `${item.category}:${item.key}`;
-
- this.index.set(indexKey, {
- category: item.category,
- key: item.key,
- path: filePath,
- metadata: item.metadata
- });
- }
-
- /**
- * Check if entry matches query
- */
- private matchesQuery(entry: MemoryIndexEntry, query: MemoryQuery): boolean {
- if (query.categories && !query.categories.includes(entry.category)) {
- return false;
- }
-
- if (query.keys && !query.keys.includes(entry.key)) {
- return false;
- }
-
- if (query.namespace && entry.metadata?.namespace !== query.namespace) {
- return false;
- }
-
- if (query.tags && entry.metadata?.tags) {
- const entryTags = entry.metadata.tags as string[];
- if (!query.tags.some(tag => entryTags.includes(tag))) {
- return false;
- }
- }
-
- const timestamp = entry.metadata?.timestamp;
- if (timestamp) {
- if (query.startTime && timestamp < query.startTime) return false;
- if (query.endTime && timestamp > query.endTime) return false;
- if (query.asOf && timestamp > query.asOf) return false;
- }
-
- return true;
- }
-
- /**
- * Get value for ordering
- */
- private getOrderValue(item: MemoryItem, orderBy: string): any {
- switch (orderBy) {
- case 'timestamp':
- return item.metadata?.timestamp || 0;
- case 'key':
- return item.key;
- case 'category':
- return item.category;
- default:
- return 0;
- }
- }
-
- /**
- * Git integration helpers
- */
- private async gitAdd(filePath: string): Promise<void> {
- // Implement git add functionality
- // This would use child_process to run git commands
- }
-
- private async gitRemove(filePath: string): Promise<void> {
- // Implement git rm functionality
- }
-}
-
-interface MemoryIndexEntry {
- category: string;
- key: string;
- path: string;
- metadata?: any;
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/backends/sqlite-backend.ts b/archive/legacy-memory-system/src/backends/sqlite-backend.ts
deleted file mode 100644
index e15f646c19..0000000000
--- a/archive/legacy-memory-system/src/backends/sqlite-backend.ts
+++ /dev/null
@@ -1,394 +0,0 @@
-/**
- * SPARC Memory Bank - SQLite Backend
- * High-performance SQLite storage with proper indexing and FTS5
- */
-
-import Database from 'better-sqlite3';
-import { MemoryItem, MemoryQuery, MemoryBackend, BackendStats } from '../types';
-
-export interface SqliteBackendConfig {
- path: string;
- readonly?: boolean;
- verbose?: boolean;
- wal?: boolean;
-}
-
-export class SqliteBackend implements MemoryBackend {
- private db: Database.Database;
- private config: SqliteBackendConfig;
- private prepared: {
- insert?: Database.Statement;
- get?: Database.Statement;
- delete?: Database.Statement;
- update?: Database.Statement;
- } = {};
-
- constructor(config: SqliteBackendConfig) {
- this.config = config;
- this.db = new Database(config.path, {
- readonly: config.readonly || false,
- verbose: config.verbose ? console.log : undefined
- });
-
- // Enable WAL mode for better concurrency
- if (config.wal !== false) {
- this.db.pragma('journal_mode = WAL');
- }
-
- // Performance optimizations
- this.db.pragma('synchronous = NORMAL');
- this.db.pragma('cache_size = 10000');
- this.db.pragma('temp_store = MEMORY');
- }
-
- async initialize(): Promise<void> {
- // Create main table
- this.db.exec(`
- CREATE TABLE IF NOT EXISTS memory_items (
- id TEXT PRIMARY KEY,
- category TEXT NOT NULL,
- key TEXT NOT NULL,
- value TEXT NOT NULL,
- metadata TEXT,
- vector_embedding BLOB,
- ttl INTEGER,
- created_at INTEGER NOT NULL,
- updated_at INTEGER NOT NULL,
- version TEXT,
- namespace TEXT DEFAULT 'default',
- UNIQUE(category, key, namespace)
- )
- `);
-
- // Create indexes for performance
- this.db.exec(`
- CREATE INDEX IF NOT EXISTS idx_category ON memory_items(category);
- CREATE INDEX IF NOT EXISTS idx_key ON memory_items(key);
- CREATE INDEX IF NOT EXISTS idx_namespace ON memory_items(namespace);
- CREATE INDEX IF NOT EXISTS idx_created_at ON memory_items(created_at);
- CREATE INDEX IF NOT EXISTS idx_category_key ON memory_items(category, key);
- CREATE INDEX IF NOT EXISTS idx_namespace_category ON memory_items(namespace, category);
- `);
-
- // Create FTS5 table for full-text search
- this.db.exec(`
- CREATE VIRTUAL TABLE IF NOT EXISTS memory_items_fts USING fts5(
- id UNINDEXED,
- category,
- key,
- value,
- content=memory_items,
- content_rowid=rowid
- );
- `);
-
- // Create triggers to keep FTS in sync
- this.db.exec(`
- CREATE TRIGGER IF NOT EXISTS memory_items_ai AFTER INSERT ON memory_items BEGIN
- INSERT INTO memory_items_fts(rowid, id, category, key, value)
- VALUES (new.rowid, new.id, new.category, new.key, new.value);
- END;
-
- CREATE TRIGGER IF NOT EXISTS memory_items_ad AFTER DELETE ON memory_items BEGIN
- DELETE FROM memory_items_fts WHERE rowid = old.rowid;
- END;
-
- CREATE TRIGGER IF NOT EXISTS memory_items_au AFTER UPDATE ON memory_items BEGIN
- DELETE FROM memory_items_fts WHERE rowid = old.rowid;
- INSERT INTO memory_items_fts(rowid, id, category, key, value)
- VALUES (new.rowid, new.id, new.category, new.key, new.value);
- END;
- `);
-
- // Create version history table for time-travel
- this.db.exec(`
- CREATE TABLE IF NOT EXISTS memory_versions (
- id INTEGER PRIMARY KEY AUTOINCREMENT,
- item_id TEXT NOT NULL,
- category TEXT NOT NULL,
- key TEXT NOT NULL,
- value TEXT NOT NULL,
- metadata TEXT,
- version TEXT NOT NULL,
- timestamp INTEGER NOT NULL,
- operation TEXT NOT NULL,
- FOREIGN KEY (item_id) REFERENCES memory_items(id)
- );
-
- CREATE INDEX IF NOT EXISTS idx_versions_item_id ON memory_versions(item_id);
- CREATE INDEX IF NOT EXISTS idx_versions_timestamp ON memory_versions(timestamp);
- `);
-
- // Prepare statements
- this.prepared.insert = this.db.prepare(`
- INSERT OR REPLACE INTO memory_items
- (id, category, key, value, metadata, vector_embedding, ttl, created_at, updated_at, version, namespace)
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
- `);
-
- this.prepared.get = this.db.prepare(`
- SELECT * FROM memory_items WHERE category = ? AND key = ? AND namespace = ?
- `);
-
- this.prepared.delete = this.db.prepare(`
- DELETE FROM memory_items WHERE category = ? AND key = ? AND namespace = ?
- `);
-
- this.prepared.update = this.db.prepare(`
- UPDATE memory_items
- SET value = ?, metadata = ?, updated_at = ?, version = ?
- WHERE category = ? AND key = ? AND namespace = ?
- `);
- }
-
- async store(item: MemoryItem): Promise<void> {
- const now = Date.now();
- const namespace = item.metadata?.namespace || 'default';
-
- // Store in main table
- this.prepared.insert!.run(
- item.id,
- item.category,
- item.key,
- JSON.stringify(item.value),
- item.metadata ? JSON.stringify(item.metadata) : null,
- item.vectorEmbedding ? Buffer.from(new Float32Array(item.vectorEmbedding).buffer) : null,
- item.ttl || null,
- now,
- now,
- item.metadata?.version || '1.0',
- namespace
- );
-
- // Store version history
- this.db.prepare(`
- INSERT INTO memory_versions (item_id, category, key, value, metadata, version, timestamp, operation)
- VALUES (?, ?, ?, ?, ?, ?, ?, ?)
- `).run(
- item.id,
- item.category,
- item.key,
- JSON.stringify(item.value),
- item.metadata ? JSON.stringify(item.metadata) : null,
- item.metadata?.version || '1.0',
- now,
- 'store'
- );
- }
-
- async get(category: string, key: string, namespace: string = 'default'): Promise<MemoryItem | null> {
- const row = this.prepared.get!.get(category, key, namespace) as any;
-
- if (!row) return null;
-
- return this.rowToMemoryItem(row);
- }
-
- async query(query: MemoryQuery): Promise<MemoryItem[]> {
- let sql = 'SELECT * FROM memory_items WHERE 1=1';
- const params: any[] = [];
-
- // Build WHERE clause
- if (query.categories && query.categories.length > 0) {
- sql += ` AND category IN (${query.categories.map(() => '?').join(',')})`;
- params.push(...query.categories);
- }
-
- if (query.keys && query.keys.length > 0) {
- sql += ` AND key IN (${query.keys.map(() => '?').join(',')})`;
- params.push(...query.keys);
- }
-
- if (query.namespace) {
- sql += ' AND namespace = ?';
- params.push(query.namespace);
- }
-
- if (query.startTime) {
- sql += ' AND created_at >= ?';
- params.push(query.startTime);
- }
-
- if (query.endTime) {
- sql += ' AND created_at <= ?';
- params.push(query.endTime);
- }
-
- // Handle time-travel queries
- if (query.asOf) {
- // Query from version history
- sql = `
- SELECT DISTINCT ON (item_id) * FROM memory_versions
- WHERE timestamp <= ?
- ${query.categories ? `AND category IN (${query.categories.map(() => '?').join(',')})` : ''}
- ${query.keys ? `AND key IN (${query.keys.map(() => '?').join(',')})` : ''}
- ORDER BY item_id, timestamp DESC
- `;
- params.unshift(query.asOf);
- }
-
- // Add ordering
- if (query.orderBy) {
- sql += ` ORDER BY ${query.orderBy} ${query.orderDirection || 'ASC'}`;
- }
-
- // Add limit and offset
- if (query.limit) {
- sql += ' LIMIT ?';
- params.push(query.limit);
- }
-
- if (query.offset) {
- sql += ' OFFSET ?';
- params.push(query.offset);
- }
-
- const stmt = this.db.prepare(sql);
- const rows = stmt.all(...params);
-
- let items = rows.map((row: any) => this.rowToMemoryItem(row));
-
- // Apply custom filter if provided
- if (query.filter) {
- items = items.filter(query.filter);
- }
-
- return items;
- }
-
- async delete(category: string, key: string, namespace: string = 'default'): Promise<boolean> {
- // Get item before deletion for version history
- const item = await this.get(category, key, namespace);
- if (!item) return false;
-
- // Delete from main table
- const result = this.prepared.delete!.run(category, key, namespace);
-
- // Record deletion in version history
- if (result.changes > 0) {
- this.db.prepare(`
- INSERT INTO memory_versions (item_id, category, key, value, metadata, version, timestamp, operation)
- VALUES (?, ?, ?, ?, ?, ?, ?, ?)
- `).run(
- item.id,
- category,
- key,
- JSON.stringify(item.value),
- item.metadata ? JSON.stringify(item.metadata) : null,
- item.metadata?.version || '1.0',
- Date.now(),
- 'delete'
- );
- }
-
- return result.changes > 0;
- }
-
- async update(category: string, key: string, updates: Partial<MemoryItem>): Promise<boolean> {
- const namespace = updates.metadata?.namespace || 'default';
- const existing = await this.get(category, key, namespace);
-
- if (!existing) return false;
-
- const merged = {
- ...existing,
- ...updates,
- metadata: {
- ...existing.metadata,
- ...updates.metadata,
- updated_at: Date.now()
- }
- };
-
- const result = this.prepared.update!.run(
- JSON.stringify(merged.value),
- JSON.stringify(merged.metadata),
- Date.now(),
- merged.metadata.version,
- category,
- key,
- namespace
- );
-
- return result.changes > 0;
- }
-
- async getStats(): Promise<BackendStats> {
- const stats = this.db.prepare(`
- SELECT
- COUNT(*) as totalItems,
- COUNT(DISTINCT category) as categories,
- SUM(LENGTH(value) + COALESCE(LENGTH(metadata), 0)) as sizeBytes,
- MIN(created_at) as oldestItem,
- MAX(created_at) as newestItem
- FROM memory_items
- `).get() as any;
-
- return {
- totalItems: stats.totalItems || 0,
- categories: stats.categories || 0,
- sizeBytes: stats.sizeBytes || 0,
- oldestItem: stats.oldestItem,
- newestItem: stats.newestItem
- };
- }
-
- async close(): Promise<void> {
- this.db.close();
- }
-
- /**
- * Run full-text search
- */
- async search(searchTerm: string, options?: {
- categories?: string[];
- limit?: number;
- }): Promise<MemoryItem[]> {
- let sql = `
- SELECT mi.* FROM memory_items mi
- JOIN memory_items_fts fts ON mi.rowid = fts.rowid
- WHERE memory_items_fts MATCH ?
- `;
- const params: any[] = [searchTerm];
-
- if (options?.categories && options.categories.length > 0) {
- sql += ` AND mi.category IN (${options.categories.map(() => '?').join(',')})`;
- params.push(...options.categories);
- }
-
- sql += ' ORDER BY rank';
-
- if (options?.limit) {
- sql += ' LIMIT ?';
- params.push(options.limit);
- }
-
- const stmt = this.db.prepare(sql);
- const rows = stmt.all(...params);
-
- return rows.map((row: any) => this.rowToMemoryItem(row));
- }
-
- /**
- * Vacuum database to reclaim space
- */
- async vacuum(): Promise<void> {
- this.db.exec('VACUUM');
- }
-
- /**
- * Convert database row to MemoryItem
- */
- private rowToMemoryItem(row: any): MemoryItem {
- return {
- id: row.id,
- category: row.category,
- key: row.key,
- value: JSON.parse(row.value),
- metadata: row.metadata ? JSON.parse(row.metadata) : undefined,
- vectorEmbedding: row.vector_embedding ?
- Array.from(new Float32Array(row.vector_embedding.buffer)) : undefined,
- ttl: row.ttl || undefined
- };
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/cache/memory-cache.ts b/archive/legacy-memory-system/src/cache/memory-cache.ts
deleted file mode 100644
index 7513e61fe7..0000000000
--- a/archive/legacy-memory-system/src/cache/memory-cache.ts
+++ /dev/null
@@ -1,379 +0,0 @@
-/**
- * SPARC Memory Bank - Cache Implementation
- * High-performance caching with LRU, LFU, and FIFO eviction strategies
- */
-
-import { MemoryItem, CacheConfig } from '../types';
-
-interface CacheEntry {
- key: string;
- value: MemoryItem;
- timestamp: number;
- frequency: number;
- lastAccess: number;
- size: number;
-}
-
-interface CacheStats {
- hits: number;
- misses: number;
- evictions: number;
- currentSize: number;
- maxSize: number;
- itemCount: number;
- hitRate: number;
-}
-
-export class MemoryCache {
- private cache: Map<string, CacheEntry> = new Map();
- private accessOrder: string[] = []; // For LRU
- private frequencyMap: Map<number, Set<string>> = new Map(); // For LFU
- private config: CacheConfig;
- private stats: CacheStats;
- private currentSize: number = 0;
-
- constructor(config: CacheConfig) {
- this.config = config;
- this.stats = {
- hits: 0,
- misses: 0,
- evictions: 0,
- currentSize: 0,
- maxSize: config.maxSize,
- itemCount: 0,
- hitRate: 0
- };
-
- // Start TTL cleanup interval
- if (config.ttl > 0) {
- setInterval(() => this.cleanupExpired(), Math.min(config.ttl / 10, 60000));
- }
- }
-
- /**
- * Get item from cache
- */
- get(key: string): MemoryItem | null {
- const entry = this.cache.get(key);
-
- if (!entry) {
- this.stats.misses++;
- this.updateHitRate();
- return null;
- }
-
- // Check TTL
- if (this.isExpired(entry)) {
- this.delete(key);
- this.stats.misses++;
- this.updateHitRate();
- return null;
- }
-
- // Update access tracking
- this.updateAccess(key, entry);
-
- this.stats.hits++;
- this.updateHitRate();
-
- return entry.value;
- }
-
- /**
- * Set item in cache
- */
- set(key: string, value: MemoryItem): void {
- const size = this.calculateSize(value);
-
- // Check if we need to evict items
- while (this.currentSize + size > this.config.maxSize && this.cache.size > 0) {
- this.evict();
- }
-
- // Remove existing entry if present
- if (this.cache.has(key)) {
- this.delete(key);
- }
-
- // Add new entry
- const entry: CacheEntry = {
- key,
- value,
- timestamp: Date.now(),
- frequency: 1,
- lastAccess: Date.now(),
- size
- };
-
- this.cache.set(key, entry);
- this.currentSize += size;
- this.stats.itemCount++;
- this.stats.currentSize = this.currentSize;
-
- // Update tracking based on strategy
- if (this.config.strategy === 'lru') {
- this.accessOrder.push(key);
- } else if (this.config.strategy === 'lfu') {
- this.updateFrequency(key, 0, 1);
- }
- }
-
- /**
- * Delete item from cache
- */
- delete(key: string): boolean {
- const entry = this.cache.get(key);
- if (!entry) return false;
-
- this.cache.delete(key);
- this.currentSize -= entry.size;
- this.stats.itemCount--;
- this.stats.currentSize = this.currentSize;
-
- // Update tracking
- if (this.config.strategy === 'lru') {
- const index = this.accessOrder.indexOf(key);
- if (index > -1) {
- this.accessOrder.splice(index, 1);
- }
- } else if (this.config.strategy === 'lfu') {
- const freqSet = this.frequencyMap.get(entry.frequency);
- if (freqSet) {
- freqSet.delete(key);
- if (freqSet.size === 0) {
- this.frequencyMap.delete(entry.frequency);
- }
- }
- }
-
- return true;
- }
-
- /**
- * Clear all items from cache
- */
- clear(): void {
- this.cache.clear();
- this.accessOrder = [];
- this.frequencyMap.clear();
- this.currentSize = 0;
- this.stats.itemCount = 0;
- this.stats.currentSize = 0;
- }
-
- /**
- * Get cache statistics
- */
- getStats(): CacheStats {
- return { ...this.stats };
- }
-
- /**
- * Get all keys in cache
- */
- keys(): string[] {
- return Array.from(this.cache.keys());
- }
-
- /**
- * Get cache size
- */
- size(): number {
- return this.cache.size;
- }
-
- /**
- * Evict items based on strategy
- */
- private evict(): void {
- let keyToEvict: string | undefined;
-
- switch (this.config.strategy) {
- case 'lru':
- keyToEvict = this.evictLRU();
- break;
- case 'lfu':
- keyToEvict = this.evictLFU();
- break;
- case 'fifo':
- keyToEvict = this.evictFIFO();
- break;
- }
-
- if (keyToEvict) {
- const entry = this.cache.get(keyToEvict);
- if (entry) {
- if (this.config.onEvict) {
- this.config.onEvict(keyToEvict, entry.value);
- }
- this.delete(keyToEvict);
- this.stats.evictions++;
- }
- }
- }
-
- /**
- * Evict least recently used item
- */
- private evictLRU(): string | undefined {
- if (this.accessOrder.length === 0) return undefined;
- return this.accessOrder[0];
- }
-
- /**
- * Evict least frequently used item
- */
- private evictLFU(): string | undefined {
- // Find the minimum frequency
- let minFreq = Number.MAX_SAFE_INTEGER;
- for (const freq of this.frequencyMap.keys()) {
- if (freq < minFreq) {
- minFreq = freq;
- }
- }
-
- const minFreqSet = this.frequencyMap.get(minFreq);
- if (!minFreqSet || minFreqSet.size === 0) return undefined;
-
- // Get the oldest item with minimum frequency
- let oldestKey: string | undefined;
- let oldestTime = Number.MAX_SAFE_INTEGER;
-
- for (const key of minFreqSet) {
- const entry = this.cache.get(key);
- if (entry && entry.timestamp < oldestTime) {
- oldestTime = entry.timestamp;
- oldestKey = key;
- }
- }
-
- return oldestKey;
- }
-
- /**
- * Evict first in, first out
- */
- private evictFIFO(): string | undefined {
- let oldestKey: string | undefined;
- let oldestTime = Number.MAX_SAFE_INTEGER;
-
- for (const [key, entry] of this.cache) {
- if (entry.timestamp < oldestTime) {
- oldestTime = entry.timestamp;
- oldestKey = key;
- }
- }
-
- return oldestKey;
- }
-
- /**
- * Update access tracking for an entry
- */
- private updateAccess(key: string, entry: CacheEntry): void {
- entry.lastAccess = Date.now();
-
- if (this.config.strategy === 'lru') {
- // Move to end of access order
- const index = this.accessOrder.indexOf(key);
- if (index > -1) {
- this.accessOrder.splice(index, 1);
- }
- this.accessOrder.push(key);
- } else if (this.config.strategy === 'lfu') {
- // Update frequency
- const oldFreq = entry.frequency;
- entry.frequency++;
- this.updateFrequency(key, oldFreq, entry.frequency);
- }
- }
-
- /**
- * Update frequency tracking
- */
- private updateFrequency(key: string, oldFreq: number, newFreq: number): void {
- // Remove from old frequency set
- if (oldFreq > 0) {
- const oldSet = this.frequencyMap.get(oldFreq);
- if (oldSet) {
- oldSet.delete(key);
- if (oldSet.size === 0) {
- this.frequencyMap.delete(oldFreq);
- }
- }
- }
-
- // Add to new frequency set
- if (!this.frequencyMap.has(newFreq)) {
- this.frequencyMap.set(newFreq, new Set());
- }
- this.frequencyMap.get(newFreq)!.add(key);
- }
-
- /**
- * Check if entry is expired
- */
- private isExpired(entry: CacheEntry): boolean {
- if (this.config.ttl <= 0) return false;
- return Date.now() - entry.timestamp > this.config.ttl;
- }
-
- /**
- * Clean up expired entries
- */
- private cleanupExpired(): void {
- const keysToDelete: string[] = [];
-
- for (const [key, entry] of this.cache) {
- if (this.isExpired(entry)) {
- keysToDelete.push(key);
- }
- }
-
- for (const key of keysToDelete) {
- this.delete(key);
- }
- }
-
- /**
- * Calculate size of a memory item
- */
- private calculateSize(item: MemoryItem): number {
- // Simple size calculation based on JSON string length
- // In production, you might want a more sophisticated approach
- const jsonStr = JSON.stringify(item);
- return jsonStr.length;
- }
-
- /**
- * Update hit rate statistics
- */
- private updateHitRate(): void {
- const total = this.stats.hits + this.stats.misses;
- this.stats.hitRate = total > 0 ? this.stats.hits / total : 0;
- }
-
- /**
- * Warm up cache with preloaded data
- */
- async warmup(items: Array<{ key: string; value: MemoryItem }>): Promise<void> {
- for (const { key, value } of items) {
- this.set(key, value);
- }
- }
-
- /**
- * Get cache snapshot for persistence
- */
- snapshot(): Array<{ key: string; value: MemoryItem }> {
- const items: Array<{ key: string; value: MemoryItem }> = [];
-
- for (const [key, entry] of this.cache) {
- if (!this.isExpired(entry)) {
- items.push({ key, value: entry.value });
- }
- }
-
- return items;
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/core/memory-manager.ts b/archive/legacy-memory-system/src/core/memory-manager.ts
deleted file mode 100644
index 178025a7bf..0000000000
--- a/archive/legacy-memory-system/src/core/memory-manager.ts
+++ /dev/null
@@ -1,469 +0,0 @@
-/**
- * SPARC Memory Bank - Core Memory Manager
- * Implements CRDT-based conflict resolution for distributed memory synchronization
- */
-
-import { EventEmitter } from 'events';
-import { v4 as uuidv4 } from 'uuid';
-import {
- MemoryItem,
- MemoryQuery,
- MemoryBackend,
- ConflictResolution,
- MemoryNamespace,
- ReplicationConfig,
- CacheConfig
-} from '../types';
-import { SqliteBackend } from '../backends/sqlite-backend';
-import { MarkdownBackend } from '../backends/markdown-backend';
-import { MemoryCache } from '../cache/memory-cache';
-import { MemoryIndexer } from '../indexer/memory-indexer';
-import { ReplicationManager } from '../replication/replication-manager';
-import { NamespaceManager } from '../namespaces/namespace-manager';
-
-export interface MemoryManagerConfig {
- backend: 'sqlite' | 'markdown';
- backendConfig: any;
- cacheConfig?: CacheConfig;
- replicationConfig?: ReplicationConfig;
- enableIndexing?: boolean;
- enableNamespaces?: boolean;
-}
-
-export class MemoryManager extends EventEmitter {
- private backend: MemoryBackend;
- private cache: MemoryCache;
- private indexer: MemoryIndexer;
- private replicationManager?: ReplicationManager;
- private namespaceManager?: NamespaceManager;
- private conflictResolution: ConflictResolution;
- private localNodeId: string;
-
- constructor(config: MemoryManagerConfig) {
- super();
-
- this.localNodeId = uuidv4();
-
- // Initialize backend
- if (config.backend === 'sqlite') {
- this.backend = new SqliteBackend(config.backendConfig);
- } else {
- this.backend = new MarkdownBackend(config.backendConfig);
- }
-
- // Initialize cache
- this.cache = new MemoryCache(config.cacheConfig || {
- maxSize: 1000,
- ttl: 3600000, // 1 hour
- strategy: 'lru'
- });
-
- // Initialize indexer
- this.indexer = new MemoryIndexer({
- backend: this.backend,
- enableVectorSearch: config.enableIndexing || false
- });
-
- // Initialize replication if configured
- if (config.replicationConfig) {
- this.replicationManager = new ReplicationManager({
- localNodeId: this.localNodeId,
- backend: this.backend,
- config: config.replicationConfig
- });
- }
-
- // Initialize namespace manager if enabled
- if (config.enableNamespaces) {
- this.namespaceManager = new NamespaceManager({
- backend: this.backend
- });
- }
-
- // Initialize CRDT conflict resolution
- this.conflictResolution = new CRDTConflictResolution();
- }
-
- /**
- * Initialize the memory manager
- */
- async initialize(): Promise<void> {
- await this.backend.initialize();
- await this.indexer.initialize();
-
- if (this.replicationManager) {
- await this.replicationManager.initialize();
- }
-
- if (this.namespaceManager) {
- await this.namespaceManager.initialize();
- }
-
- this.emit('initialized');
- }
-
- /**
- * Store a memory item with CRDT conflict resolution
- */
- async store(item: Partial<MemoryItem>, namespace?: string): Promise<MemoryItem> {
- const fullItem: MemoryItem = {
- id: item.id || uuidv4(),
- category: item.category || 'general',
- key: item.key || uuidv4(),
- value: item.value,
- metadata: {
- ...item.metadata,
- nodeId: this.localNodeId,
- version: await this.generateVersion(item.id),
- timestamp: Date.now(),
- namespace: namespace || 'default'
- },
- vectorEmbedding: item.vectorEmbedding,
- ttl: item.ttl
- };
-
- // Apply namespace if manager is enabled
- if (this.namespaceManager && namespace) {
- fullItem.metadata.namespace = namespace;
- }
-
- // Check for conflicts
- const existingItem = await this.backend.get(fullItem.category, fullItem.key);
- if (existingItem) {
- const resolved = await this.conflictResolution.resolve(existingItem, fullItem);
- fullItem.value = resolved.value;
- fullItem.metadata = resolved.metadata;
- }
-
- // Store in backend
- await this.backend.store(fullItem);
-
- // Update cache
- this.cache.set(this.getCacheKey(fullItem), fullItem);
-
- // Update index
- await this.indexer.index(fullItem);
-
- // Replicate if enabled
- if (this.replicationManager) {
- await this.replicationManager.replicate(fullItem);
- }
-
- this.emit('stored', fullItem);
- return fullItem;
- }
-
- /**
- * Retrieve a memory item
- */
- async get(category: string, key: string, namespace?: string): Promise<MemoryItem | null> {
- const cacheKey = `${namespace || 'default'}:${category}:${key}`;
-
- // Check cache first
- const cached = this.cache.get(cacheKey);
- if (cached) {
- this.emit('cache-hit', cacheKey);
- return cached;
- }
-
- // Retrieve from backend
- const item = await this.backend.get(category, key);
-
- // Filter by namespace if specified
- if (item && namespace && item.metadata?.namespace !== namespace) {
- return null;
- }
-
- if (item) {
- this.cache.set(cacheKey, item);
- }
-
- return item;
- }
-
- /**
- * Query memory items with advanced filtering
- */
- async query(query: MemoryQuery): Promise<MemoryItem[]> {
- // Use indexer for optimized queries
- if (query.vectorSearch && this.indexer.supportsVectorSearch()) {
- return await this.indexer.vectorSearch(query);
- }
-
- // Regular query through backend
- let results = await this.backend.query(query);
-
- // Apply namespace filtering
- if (query.namespace && this.namespaceManager) {
- results = results.filter(item =>
- item.metadata?.namespace === query.namespace
- );
- }
-
- // Apply time-travel queries
- if (query.asOf) {
- results = results.filter(item =>
- item.metadata?.timestamp && item.metadata.timestamp <= query.asOf!
- );
- }
-
- return results;
- }
-
- /**
- * Delete a memory item
- */
- async delete(category: string, key: string, namespace?: string): Promise<boolean> {
- const cacheKey = `${namespace || 'default'}:${category}:${key}`;
-
- // Remove from cache
- this.cache.delete(cacheKey);
-
- // Remove from backend
- const deleted = await this.backend.delete(category, key);
-
- // Remove from index
- if (deleted) {
- await this.indexer.remove(category, key);
- }
-
- // Replicate deletion
- if (this.replicationManager && deleted) {
- await this.replicationManager.replicateDeletion(category, key);
- }
-
- this.emit('deleted', { category, key, namespace });
- return deleted;
- }
-
- /**
- * Export memory snapshot
- */
- async export(options?: {
- namespace?: string;
- categories?: string[];
- format?: 'json' | 'markdown';
- }): Promise<any> {
- const query: MemoryQuery = {
- namespace: options?.namespace,
- categories: options?.categories
- };
-
- const items = await this.query(query);
-
- if (options?.format === 'markdown') {
- return this.exportToMarkdown(items);
- }
-
- return {
- version: '1.0',
- nodeId: this.localNodeId,
- timestamp: Date.now(),
- items: items
- };
- }
-
- /**
- * Import memory snapshot
- */
- async import(snapshot: any, options?: {
- namespace?: string;
- merge?: boolean;
- }): Promise<number> {
- let imported = 0;
-
- for (const item of snapshot.items) {
- if (options?.namespace) {
- item.metadata = item.metadata || {};
- item.metadata.namespace = options.namespace;
- }
-
- if (options?.merge) {
- // Merge with existing items using CRDT
- await this.store(item, options?.namespace);
- } else {
- // Direct import without conflict resolution
- await this.backend.store(item);
- await this.indexer.index(item);
- }
-
- imported++;
- }
-
- this.emit('imported', { count: imported });
- return imported;
- }
-
- /**
- * Get memory statistics
- */
- async getStats(): Promise<any> {
- const stats = await this.backend.getStats();
- const cacheStats = this.cache.getStats();
-
- return {
- backend: stats,
- cache: cacheStats,
- nodeId: this.localNodeId,
- replication: this.replicationManager ?
- await this.replicationManager.getStats() : null
- };
- }
-
- /**
- * Cleanup and close resources
- */
- async close(): Promise<void> {
- await this.backend.close();
- await this.indexer.close();
-
- if (this.replicationManager) {
- await this.replicationManager.close();
- }
-
- this.cache.clear();
- this.emit('closed');
- }
-
- /**
- * Generate version for CRDT
- */
- private async generateVersion(itemId?: string): Promise<string> {
- const timestamp = Date.now();
- const counter = await this.getVersionCounter(itemId);
- return `${timestamp}.${counter}.${this.localNodeId}`;
- }
-
- /**
- * Get version counter for an item
- */
- private async getVersionCounter(itemId?: string): Promise<number> {
- // Simple counter implementation
- // In production, this would be persisted
- return Math.floor(Math.random() * 1000);
- }
-
- /**
- * Get cache key for an item
- */
- private getCacheKey(item: MemoryItem): string {
- const namespace = item.metadata?.namespace || 'default';
- return `${namespace}:${item.category}:${item.key}`;
- }
-
- /**
- * Export items to markdown format
- */
- private exportToMarkdown(items: MemoryItem[]): string {
- let markdown = '# Memory Bank Export\n\n';
- markdown += `Generated: ${new Date().toISOString()}\n\n`;
-
- const byCategory = items.reduce((acc, item) => {
- if (!acc[item.category]) acc[item.category] = [];
- acc[item.category].push(item);
- return acc;
- }, {} as Record<string, MemoryItem[]>);
-
- for (const [category, categoryItems] of Object.entries(byCategory)) {
- markdown += `## ${category}\n\n`;
-
- for (const item of categoryItems) {
- markdown += `### ${item.key}\n`;
- markdown += `- ID: ${item.id}\n`;
- markdown += `- Timestamp: ${new Date(item.metadata?.timestamp || 0).toISOString()}\n`;
- markdown += `- Value:\n\`\`\`json\n${JSON.stringify(item.value, null, 2)}\n\`\`\`\n\n`;
- }
- }
-
- return markdown;
- }
-}
-
-/**
- * CRDT-based conflict resolution
- */
-class CRDTConflictResolution implements ConflictResolution {
- async resolve(existing: MemoryItem, incoming: MemoryItem): Promise<MemoryItem> {
- // Last-write-wins with vector clock comparison
- const existingVersion = this.parseVersion(existing.metadata?.version || '');
- const incomingVersion = this.parseVersion(incoming.metadata?.version || '');
-
- if (this.compareVersions(existingVersion, incomingVersion) < 0) {
- // Incoming is newer
- return incoming;
- } else if (this.compareVersions(existingVersion, incomingVersion) > 0) {
- // Existing is newer
- return existing;
- } else {
- // Concurrent updates - merge values
- return this.mergeItems(existing, incoming);
- }
- }
-
- private parseVersion(version: string): {
- timestamp: number;
- counter: number;
- nodeId: string;
- } {
- const parts = version.split('.');
- return {
- timestamp: parseInt(parts[0] || '0'),
- counter: parseInt(parts[1] || '0'),
- nodeId: parts[2] || ''
- };
- }
-
- private compareVersions(v1: any, v2: any): number {
- // Compare timestamps first
- if (v1.timestamp !== v2.timestamp) {
- return v1.timestamp - v2.timestamp;
- }
-
- // Compare counters if timestamps are equal
- if (v1.counter !== v2.counter) {
- return v1.counter - v2.counter;
- }
-
- // Use node ID as tiebreaker
- return v1.nodeId.localeCompare(v2.nodeId);
- }
-
- private mergeItems(existing: MemoryItem, incoming: MemoryItem): MemoryItem {
- // Deep merge strategy
- const merged = { ...existing };
-
- // Merge values
- if (typeof existing.value === 'object' && typeof incoming.value === 'object') {
- merged.value = this.deepMerge(existing.value, incoming.value);
- } else {
- // For non-objects, use incoming value
- merged.value = incoming.value;
- }
-
- // Merge metadata
- merged.metadata = {
- ...existing.metadata,
- ...incoming.metadata,
- mergedAt: Date.now(),
- mergedFrom: [existing.metadata?.nodeId, incoming.metadata?.nodeId]
- };
-
- return merged;
- }
-
- private deepMerge(obj1: any, obj2: any): any {
- const result = { ...obj1 };
-
- for (const key in obj2) {
- if (obj2.hasOwnProperty(key)) {
- if (typeof obj2[key] === 'object' && typeof obj1[key] === 'object') {
- result[key] = this.deepMerge(obj1[key], obj2[key]);
- } else {
- result[key] = obj2[key];
- }
- }
- }
-
- return result;
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/index.ts b/archive/legacy-memory-system/src/index.ts
deleted file mode 100644
index e0b5bd95fa..0000000000
--- a/archive/legacy-memory-system/src/index.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * SPARC Memory Bank - Main Export
- * Complete memory management system for Claude-Flow
- */
-
-export { MemoryManager, MemoryManagerConfig } from './core/memory-manager';
-export { SqliteBackend, SqliteBackendConfig } from './backends/sqlite-backend';
-export { MarkdownBackend, MarkdownBackendConfig } from './backends/markdown-backend';
-export { MemoryCache } from './cache/memory-cache';
-export { MemoryIndexer } from './indexer/memory-indexer';
-export { ReplicationManager } from './replication/replication-manager';
-export { NamespaceManager } from './namespaces/namespace-manager';
-export { ImportExportManager } from './io/import-export';
-
-export * from './types';
-
-// Re-export commonly used types
-export type {
- MemoryItem,
- MemoryQuery,
- MemoryBackend,
- MemoryMetadata,
- MemorySnapshot,
- MemoryNamespace,
- VectorSearchResult,
- CacheConfig,
- ReplicationConfig,
- ImportExportOptions
-} from './types';
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/indexer/memory-indexer.ts b/archive/legacy-memory-system/src/indexer/memory-indexer.ts
deleted file mode 100644
index 3048d94ddc..0000000000
--- a/archive/legacy-memory-system/src/indexer/memory-indexer.ts
+++ /dev/null
@@ -1,473 +0,0 @@
-/**
- * SPARC Memory Bank - Memory Indexer
- * Fast indexing with vector search support
- */
-
-import { MemoryItem, MemoryQuery, MemoryBackend, VectorSearchResult, IndexConfig } from '../types';
-import { EventEmitter } from 'events';
-
-interface Index {
- byCategory: Map<string, Set<string>>;
- byTag: Map<string, Set<string>>;
- byNamespace: Map<string, Set<string>>;
- byTimestamp: Array<{ id: string; timestamp: number }>;
- vectors?: VectorIndex;
-}
-
-interface VectorIndex {
- dimensions: number;
- vectors: Map<string, Float32Array>;
- metadata: Map<string, { category: string; key: string }>;
-}
-
-export class MemoryIndexer extends EventEmitter {
- private backend: MemoryBackend;
- private index: Index;
- private config: IndexConfig;
- private updateQueue: Set<string> = new Set();
- private updateInterval?: NodeJS.Timer;
- private isIndexing: boolean = false;
-
- constructor(config: IndexConfig) {
- super();
- this.config = config;
- this.backend = config.backend;
-
- this.index = {
- byCategory: new Map(),
- byTag: new Map(),
- byNamespace: new Map(),
- byTimestamp: []
- };
-
- if (config.enableVectorSearch) {
- this.index.vectors = {
- dimensions: config.vectorDimensions || 384,
- vectors: new Map(),
- metadata: new Map()
- };
- }
- }
-
- async initialize(): Promise<void> {
- // Build initial index
- await this.rebuildIndex();
-
- // Start update interval if configured
- if (this.config.indexUpdateInterval) {
- this.updateInterval = setInterval(
- () => this.processUpdateQueue(),
- this.config.indexUpdateInterval
- );
- }
-
- this.emit('initialized');
- }
-
- /**
- * Index a memory item
- */
- async index(item: MemoryItem): Promise<void> {
- const id = `${item.category}:${item.key}`;
-
- // Update category index
- if (!this.index.byCategory.has(item.category)) {
- this.index.byCategory.set(item.category, new Set());
- }
- this.index.byCategory.get(item.category)!.add(id);
-
- // Update tag index
- if (item.metadata?.tags) {
- for (const tag of item.metadata.tags) {
- if (!this.index.byTag.has(tag)) {
- this.index.byTag.set(tag, new Set());
- }
- this.index.byTag.get(tag)!.add(id);
- }
- }
-
- // Update namespace index
- const namespace = item.metadata?.namespace || 'default';
- if (!this.index.byNamespace.has(namespace)) {
- this.index.byNamespace.set(namespace, new Set());
- }
- this.index.byNamespace.get(namespace)!.add(id);
-
- // Update timestamp index
- if (item.metadata?.timestamp) {
- this.updateTimestampIndex(id, item.metadata.timestamp);
- }
-
- // Update vector index
- if (this.index.vectors && item.vectorEmbedding) {
- this.index.vectors.vectors.set(
- id,
- new Float32Array(item.vectorEmbedding)
- );
- this.index.vectors.metadata.set(id, {
- category: item.category,
- key: item.key
- });
- }
-
- // Queue for batch update if interval is set
- if (this.config.indexUpdateInterval) {
- this.updateQueue.add(id);
- }
-
- this.emit('indexed', item);
- }
-
- /**
- * Remove item from index
- */
- async remove(category: string, key: string): Promise<void> {
- const id = `${category}:${key}`;
-
- // Remove from category index
- const categorySet = this.index.byCategory.get(category);
- if (categorySet) {
- categorySet.delete(id);
- if (categorySet.size === 0) {
- this.index.byCategory.delete(category);
- }
- }
-
- // Remove from tag index
- for (const [tag, tagSet] of this.index.byTag) {
- tagSet.delete(id);
- if (tagSet.size === 0) {
- this.index.byTag.delete(tag);
- }
- }
-
- // Remove from namespace index
- for (const [ns, nsSet] of this.index.byNamespace) {
- nsSet.delete(id);
- if (nsSet.size === 0) {
- this.index.byNamespace.delete(ns);
- }
- }
-
- // Remove from timestamp index
- this.index.byTimestamp = this.index.byTimestamp.filter(
- entry => entry.id !== id
- );
-
- // Remove from vector index
- if (this.index.vectors) {
- this.index.vectors.vectors.delete(id);
- this.index.vectors.metadata.delete(id);
- }
-
- this.emit('removed', { category, key });
- }
-
- /**
- * Perform vector search
- */
- async vectorSearch(query: MemoryQuery): Promise<MemoryItem[]> {
- if (!query.vectorSearch || !this.index.vectors) {
- return [];
- }
-
- const queryVector = new Float32Array(query.vectorSearch.embedding);
- const results: VectorSearchResult[] = [];
-
- // Calculate similarity scores
- for (const [id, vector] of this.index.vectors.vectors) {
- const score = this.cosineSimilarity(queryVector, vector);
-
- if (query.vectorSearch.threshold && score < query.vectorSearch.threshold) {
- continue;
- }
-
- const metadata = this.index.vectors.metadata.get(id);
- if (metadata) {
- results.push({
- item: null as any, // Will be populated below
- score,
- distance: 1 - score
- });
-
- // Store metadata for retrieval
- (results[results.length - 1] as any).metadata = metadata;
- }
- }
-
- // Sort by score descending
- results.sort((a, b) => b.score - a.score);
-
- // Apply topK limit
- const topK = query.vectorSearch.topK || 10;
- const topResults = results.slice(0, topK);
-
- // Retrieve full items
- const items: MemoryItem[] = [];
- for (const result of topResults) {
- const metadata = (result as any).metadata;
- const item = await this.backend.get(metadata.category, metadata.key);
- if (item) {
- items.push(item);
- }
- }
-
- return items;
- }
-
- /**
- * Query using indexes
- */
- async query(query: MemoryQuery): Promise<Set<string>> {
- let candidates = new Set<string>();
- let initialized = false;
-
- // Filter by category
- if (query.categories && query.categories.length > 0) {
- for (const category of query.categories) {
- const categoryIds = this.index.byCategory.get(category);
- if (categoryIds) {
- if (!initialized) {
- candidates = new Set(categoryIds);
- initialized = true;
- } else {
- // Intersection
- candidates = new Set(
- [...candidates].filter(id => categoryIds.has(id))
- );
- }
- }
- }
- }
-
- // Filter by tags
- if (query.tags && query.tags.length > 0) {
- const tagSets: Set<string>[] = [];
- for (const tag of query.tags) {
- const tagIds = this.index.byTag.get(tag);
- if (tagIds) {
- tagSets.push(tagIds);
- }
- }
-
- if (tagSets.length > 0) {
- const tagCandidates = this.unionSets(tagSets);
- if (!initialized) {
- candidates = tagCandidates;
- initialized = true;
- } else {
- candidates = new Set(
- [...candidates].filter(id => tagCandidates.has(id))
- );
- }
- }
- }
-
- // Filter by namespace
- if (query.namespace) {
- const namespaceIds = this.index.byNamespace.get(query.namespace);
- if (namespaceIds) {
- if (!initialized) {
- candidates = new Set(namespaceIds);
- initialized = true;
- } else {
- candidates = new Set(
- [...candidates].filter(id => namespaceIds.has(id))
- );
- }
- }
- }
-
- // If no filters applied, use all items
- if (!initialized) {
- for (const categoryIds of this.index.byCategory.values()) {
- for (const id of categoryIds) {
- candidates.add(id);
- }
- }
- }
-
- return candidates;
- }
-
- /**
- * Check if vector search is supported
- */
- supportsVectorSearch(): boolean {
- return !!this.index.vectors;
- }
-
- /**
- * Get index statistics
- */
- getStats(): any {
- return {
- categories: this.index.byCategory.size,
- tags: this.index.byTag.size,
- namespaces: this.index.byNamespace.size,
- timestamps: this.index.byTimestamp.length,
- vectors: this.index.vectors ? this.index.vectors.vectors.size : 0,
- updateQueueSize: this.updateQueue.size
- };
- }
-
- /**
- * Close and cleanup
- */
- async close(): Promise<void> {
- if (this.updateInterval) {
- clearInterval(this.updateInterval);
- }
-
- // Process any remaining updates
- if (this.updateQueue.size > 0) {
- await this.processUpdateQueue();
- }
-
- this.emit('closed');
- }
-
- /**
- * Rebuild entire index
- */
- private async rebuildIndex(): Promise<void> {
- this.isIndexing = true;
- this.emit('rebuild-start');
-
- // Clear existing indexes
- this.index.byCategory.clear();
- this.index.byTag.clear();
- this.index.byNamespace.clear();
- this.index.byTimestamp = [];
-
- if (this.index.vectors) {
- this.index.vectors.vectors.clear();
- this.index.vectors.metadata.clear();
- }
-
- // Query all items from backend
- const items = await this.backend.query({});
-
- // Index each item
- for (const item of items) {
- await this.index(item);
- }
-
- this.isIndexing = false;
- this.emit('rebuild-complete', { itemCount: items.length });
- }
-
- /**
- * Process queued updates
- */
- private async processUpdateQueue(): Promise<void> {
- if (this.updateQueue.size === 0 || this.isIndexing) {
- return;
- }
-
- const updates = Array.from(this.updateQueue);
- this.updateQueue.clear();
-
- // Process updates in batches
- const batchSize = 100;
- for (let i = 0; i < updates.length; i += batchSize) {
- const batch = updates.slice(i, i + batchSize);
- await Promise.all(
- batch.map(async (id) => {
- const [category, key] = id.split(':');
- const item = await this.backend.get(category, key);
- if (item) {
- await this.index(item);
- }
- })
- );
- }
- }
-
- /**
- * Update timestamp index
- */
- private updateTimestampIndex(id: string, timestamp: number): void {
- // Remove existing entry
- this.index.byTimestamp = this.index.byTimestamp.filter(
- entry => entry.id !== id
- );
-
- // Add new entry
- this.index.byTimestamp.push({ id, timestamp });
-
- // Keep sorted by timestamp
- this.index.byTimestamp.sort((a, b) => a.timestamp - b.timestamp);
-
- // Limit size to prevent unbounded growth
- const maxSize = 10000;
- if (this.index.byTimestamp.length > maxSize) {
- this.index.byTimestamp = this.index.byTimestamp.slice(-maxSize);
- }
- }
-
- /**
- * Calculate cosine similarity between vectors
- */
- private cosineSimilarity(a: Float32Array, b: Float32Array): number {
- if (a.length !== b.length) {
- throw new Error('Vectors must have same dimensions');
- }
-
- let dotProduct = 0;
- let normA = 0;
- let normB = 0;
-
- for (let i = 0; i < a.length; i++) {
- dotProduct += a[i] * b[i];
- normA += a[i] * a[i];
- normB += b[i] * b[i];
- }
-
- normA = Math.sqrt(normA);
- normB = Math.sqrt(normB);
-
- if (normA === 0 || normB === 0) {
- return 0;
- }
-
- return dotProduct / (normA * normB);
- }
-
- /**
- * Union multiple sets
- */
- private unionSets(sets: Set<string>[]): Set<string> {
- const result = new Set<string>();
- for (const set of sets) {
- for (const item of set) {
- result.add(item);
- }
- }
- return result;
- }
-
- /**
- * Generate text embeddings (placeholder - would use real model in production)
- */
- async generateEmbedding(text: string): Promise<number[]> {
- // This is a placeholder - in production, you would use a real embedding model
- // like OpenAI's text-embedding-ada-002 or a local model
-
- const dimensions = this.index.vectors?.dimensions || 384;
- const embedding = new Array(dimensions);
-
- // Simple hash-based pseudo-embedding for demonstration
- let hash = 0;
- for (let i = 0; i < text.length; i++) {
- hash = ((hash << 5) - hash) + text.charCodeAt(i);
- hash = hash & hash;
- }
-
- for (let i = 0; i < dimensions; i++) {
- embedding[i] = Math.sin(hash * (i + 1)) * 0.5 + 0.5;
- }
-
- return embedding;
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/io/import-export.ts b/archive/legacy-memory-system/src/io/import-export.ts
deleted file mode 100644
index 529d9b6ba5..0000000000
--- a/archive/legacy-memory-system/src/io/import-export.ts
+++ /dev/null
@@ -1,479 +0,0 @@
-/**
- * SPARC Memory Bank - Import/Export Functionality
- * Handles memory snapshots with various formats and encryption
- */
-
-import { promises as fs } from 'fs';
-import * as path from 'path';
-import * as zlib from 'zlib';
-import { promisify } from 'util';
-import * as crypto from 'crypto';
-import { MemoryItem, MemorySnapshot, ImportExportOptions } from '../types';
-
-const gzip = promisify(zlib.gzip);
-const gunzip = promisify(zlib.gunzip);
-
-export class ImportExportManager {
- /**
- * Export memory items to various formats
- */
- async export(
- items: MemoryItem[],
- options: ImportExportOptions
- ): Promise<Buffer | string> {
- let data: string;
-
- // Convert to requested format
- switch (options.format) {
- case 'json':
- data = this.exportToJSON(items, options);
- break;
- case 'markdown':
- data = this.exportToMarkdown(items, options);
- break;
- case 'csv':
- data = await this.exportToCSV(items, options);
- break;
- default:
- throw new Error(`Unsupported export format: ${options.format}`);
- }
-
- // Compress if requested
- let result: Buffer | string = data;
- if (options.compress) {
- result = await gzip(data);
- }
-
- // Encrypt if requested
- if (options.encryption) {
- result = await this.encrypt(
- result,
- options.encryption.algorithm,
- options.encryption.key
- );
- }
-
- return result;
- }
-
- /**
- * Import memory items from various formats
- */
- async import(
- data: Buffer | string,
- options: ImportExportOptions
- ): Promise<MemoryItem[]> {
- let processedData = data;
-
- // Decrypt if needed
- if (options.encryption) {
- processedData = await this.decrypt(
- processedData,
- options.encryption.algorithm,
- options.encryption.key
- );
- }
-
- // Decompress if needed
- if (options.compress) {
- processedData = await gunzip(processedData as Buffer);
- }
-
- // Parse based on format
- const stringData = processedData.toString('utf-8');
-
- switch (options.format) {
- case 'json':
- return this.importFromJSON(stringData);
- case 'markdown':
- return this.importFromMarkdown(stringData);
- case 'csv':
- return this.importFromCSV(stringData);
- default:
- throw new Error(`Unsupported import format: ${options.format}`);
- }
- }
-
- /**
- * Export to file
- */
- async exportToFile(
- items: MemoryItem[],
- filePath: string,
- options: ImportExportOptions
- ): Promise<void> {
- const data = await this.export(items, options);
- await fs.writeFile(filePath, data);
- }
-
- /**
- * Import from file
- */
- async importFromFile(
- filePath: string,
- options: ImportExportOptions
- ): Promise<MemoryItem[]> {
- const data = await fs.readFile(filePath);
- return this.import(data, options);
- }
-
- /**
- * Create snapshot
- */
- createSnapshot(items: MemoryItem[], nodeId: string): MemorySnapshot {
- return {
- version: '1.0',
- timestamp: Date.now(),
- nodeId,
- items,
- metadata: {
- itemCount: items.length,
- categories: [...new Set(items.map(i => i.category))],
- namespaces: [...new Set(items.map(i => i.metadata?.namespace || 'default'))]
- }
- };
- }
-
- /**
- * Validate snapshot
- */
- validateSnapshot(snapshot: any): snapshot is MemorySnapshot {
- return (
- snapshot &&
- typeof snapshot.version === 'string' &&
- typeof snapshot.timestamp === 'number' &&
- typeof snapshot.nodeId === 'string' &&
- Array.isArray(snapshot.items)
- );
- }
-
- /**
- * Export to JSON format
- */
- private exportToJSON(items: MemoryItem[], options: ImportExportOptions): string {
- if (!options.includeMetadata) {
- // Strip metadata if not requested
- items = items.map(item => ({
- ...item,
- metadata: undefined
- }));
- }
-
- return JSON.stringify(items, null, 2);
- }
-
- /**
- * Export to Markdown format
- */
- private exportToMarkdown(items: MemoryItem[], options: ImportExportOptions): string {
- let markdown = '# Memory Export\n\n';
- markdown += `**Exported**: ${new Date().toISOString()}\n\n`;
- markdown += `**Total Items**: ${items.length}\n\n`;
-
- // Group by category
- const byCategory = items.reduce((acc, item) => {
- if (!acc[item.category]) acc[item.category] = [];
- acc[item.category].push(item);
- return acc;
- }, {} as Record<string, MemoryItem[]>);
-
- for (const [category, categoryItems] of Object.entries(byCategory)) {
- markdown += `## ${category}\n\n`;
-
- for (const item of categoryItems) {
- markdown += `### ${item.key}\n\n`;
-
- if (options.includeMetadata && item.metadata) {
- markdown += '**Metadata**:\n';
- for (const [key, value] of Object.entries(item.metadata)) {
- markdown += `- ${key}: ${JSON.stringify(value)}\n`;
- }
- markdown += '\n';
- }
-
- markdown += '**Value**:\n';
- if (typeof item.value === 'string') {
- markdown += item.value + '\n\n';
- } else {
- markdown += '```json\n';
- markdown += JSON.stringify(item.value, null, 2);
- markdown += '\n```\n\n';
- }
-
- markdown += '---\n\n';
- }
- }
-
- return markdown;
- }
-
- /**
- * Export to CSV format
- */
- private async exportToCSV(
- items: MemoryItem[],
- options: ImportExportOptions
- ): Promise<string> {
- const rows: string[] = [];
-
- // Header
- const headers = ['id', 'category', 'key', 'value'];
- if (options.includeMetadata) {
- headers.push('timestamp', 'namespace', 'tags');
- }
- rows.push(headers.join(','));
-
- // Data rows
- for (const item of items) {
- const row: string[] = [
- this.escapeCSV(item.id),
- this.escapeCSV(item.category),
- this.escapeCSV(item.key),
- this.escapeCSV(JSON.stringify(item.value))
- ];
-
- if (options.includeMetadata) {
- row.push(
- item.metadata?.timestamp?.toString() || '',
- this.escapeCSV(item.metadata?.namespace || 'default'),
- this.escapeCSV((item.metadata?.tags || []).join(';'))
- );
- }
-
- rows.push(row.join(','));
- }
-
- return rows.join('\n');
- }
-
- /**
- * Import from JSON format
- */
- private importFromJSON(data: string): MemoryItem[] {
- const parsed = JSON.parse(data);
-
- if (Array.isArray(parsed)) {
- return parsed;
- } else if (parsed.items && Array.isArray(parsed.items)) {
- // Handle snapshot format
- return parsed.items;
- } else {
- throw new Error('Invalid JSON format');
- }
- }
-
- /**
- * Import from Markdown format
- */
- private importFromMarkdown(data: string): MemoryItem[] {
- const items: MemoryItem[] = [];
- const lines = data.split('\n');
-
- let currentCategory = '';
- let currentKey = '';
- let currentMetadata: any = {};
- let currentValue = '';
- let inValue = false;
- let inCodeBlock = false;
-
- for (let i = 0; i < lines.length; i++) {
- const line = lines[i];
-
- // Category header
- if (line.startsWith('## ')) {
- currentCategory = line.substring(3).trim();
- continue;
- }
-
- // Item header
- if (line.startsWith('### ')) {
- // Save previous item if exists
- if (currentKey && currentValue) {
- items.push({
- id: `${currentCategory}:${currentKey}`,
- category: currentCategory,
- key: currentKey,
- value: this.parseValue(currentValue.trim()),
- metadata: Object.keys(currentMetadata).length > 0 ? currentMetadata : undefined
- });
- }
-
- currentKey = line.substring(4).trim();
- currentMetadata = {};
- currentValue = '';
- inValue = false;
- continue;
- }
-
- // Metadata
- if (line.startsWith('- ') && !inValue) {
- const match = line.match(/^- ([^:]+): (.+)$/);
- if (match) {
- currentMetadata[match[1]] = JSON.parse(match[2]);
- }
- continue;
- }
-
- // Value marker
- if (line === '**Value**:') {
- inValue = true;
- continue;
- }
-
- // Code block
- if (line === '```json') {
- inCodeBlock = true;
- continue;
- }
- if (line === '```' && inCodeBlock) {
- inCodeBlock = false;
- continue;
- }
-
- // Collect value
- if (inValue && line !== '---') {
- currentValue += line + '\n';
- }
- }
-
- // Save last item
- if (currentKey && currentValue) {
- items.push({
- id: `${currentCategory}:${currentKey}`,
- category: currentCategory,
- key: currentKey,
- value: this.parseValue(currentValue.trim()),
- metadata: Object.keys(currentMetadata).length > 0 ? currentMetadata : undefined
- });
- }
-
- return items;
- }
-
- /**
- * Import from CSV format
- */
- private importFromCSV(data: string): MemoryItem[] {
- const lines = data.split('\n');
- const headers = lines[0].split(',');
- const items: MemoryItem[] = [];
-
- for (let i = 1; i < lines.length; i++) {
- const values = this.parseCSVLine(lines[i]);
- if (values.length < 4) continue;
-
- const item: MemoryItem = {
- id: values[0],
- category: values[1],
- key: values[2],
- value: JSON.parse(values[3])
- };
-
- if (headers.includes('timestamp')) {
- item.metadata = {
- timestamp: parseInt(values[4]) || Date.now(),
- namespace: values[5] || 'default',
- tags: values[6] ? values[6].split(';') : []
- };
- }
-
- items.push(item);
- }
-
- return items;
- }
-
- /**
- * Encrypt data
- */
- private async encrypt(
- data: Buffer | string,
- algorithm: string,
- key: string
- ): Promise<Buffer> {
- const iv = crypto.randomBytes(16);
- const cipher = crypto.createCipheriv(algorithm, Buffer.from(key), iv);
-
- const encrypted = Buffer.concat([
- cipher.update(typeof data === 'string' ? Buffer.from(data) : data),
- cipher.final()
- ]);
-
- // Prepend IV to encrypted data
- return Buffer.concat([iv, encrypted]);
- }
-
- /**
- * Decrypt data
- */
- private async decrypt(
- data: Buffer | string,
- algorithm: string,
- key: string
- ): Promise<Buffer> {
- const buffer = typeof data === 'string' ? Buffer.from(data, 'base64') : data;
-
- // Extract IV from beginning
- const iv = buffer.slice(0, 16);
- const encrypted = buffer.slice(16);
-
- const decipher = crypto.createDecipheriv(algorithm, Buffer.from(key), iv);
-
- return Buffer.concat([
- decipher.update(encrypted),
- decipher.final()
- ]);
- }
-
- /**
- * Escape CSV value
- */
- private escapeCSV(value: string): string {
- if (value.includes(',') || value.includes('"') || value.includes('\n')) {
- return `"${value.replace(/"/g, '""')}"`;
- }
- return value;
- }
-
- /**
- * Parse CSV line
- */
- private parseCSVLine(line: string): string[] {
- const values: string[] = [];
- let current = '';
- let inQuotes = false;
-
- for (let i = 0; i < line.length; i++) {
- const char = line[i];
- const next = line[i + 1];
-
- if (char === '"') {
- if (inQuotes && next === '"') {
- current += '"';
- i++; // Skip next quote
- } else {
- inQuotes = !inQuotes;
- }
- } else if (char === ',' && !inQuotes) {
- values.push(current);
- current = '';
- } else {
- current += char;
- }
- }
-
- values.push(current);
- return values;
- }
-
- /**
- * Parse value from string
- */
- private parseValue(value: string): any {
- try {
- return JSON.parse(value);
- } catch {
- return value;
- }
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/namespaces/namespace-manager.ts b/archive/legacy-memory-system/src/namespaces/namespace-manager.ts
deleted file mode 100644
index d17d43a653..0000000000
--- a/archive/legacy-memory-system/src/namespaces/namespace-manager.ts
+++ /dev/null
@@ -1,506 +0,0 @@
-/**
- * SPARC Memory Bank - Namespace Manager
- * Provides session isolation and access control for memory items
- */
-
-import { EventEmitter } from 'events';
-import { MemoryBackend, MemoryNamespace, NamespacePermissions } from '../types';
-import { v4 as uuidv4 } from 'uuid';
-
-interface NamespaceSession {
- id: string;
- namespaceId: string;
- userId: string;
- permissions: string[];
- createdAt: number;
- expiresAt?: number;
-}
-
-interface NamespaceStats {
- totalNamespaces: number;
- activeSessions: number;
- itemsByNamespace: Map<string, number>;
-}
-
-export class NamespaceManager extends EventEmitter {
- private backend: MemoryBackend;
- private namespaces: Map<string, MemoryNamespace> = new Map();
- private sessions: Map<string, NamespaceSession> = new Map();
- private userSessions: Map<string, Set<string>> = new Map();
-
- constructor(options: { backend: MemoryBackend }) {
- super();
- this.backend = options.backend;
- }
-
- async initialize(): Promise<void> {
- // Create default namespace
- await this.createNamespace({
- id: 'default',
- name: 'Default Namespace',
- description: 'Default namespace for unscoped memory items',
- permissions: {
- read: ['*'],
- write: ['*'],
- delete: ['*'],
- admin: ['system']
- }
- });
-
- // Load existing namespaces from backend
- await this.loadNamespaces();
-
- // Start session cleanup interval
- setInterval(() => this.cleanupExpiredSessions(), 60000); // Every minute
-
- this.emit('initialized');
- }
-
- /**
- * Create a new namespace
- */
- async createNamespace(namespace: Partial<MemoryNamespace>): Promise<MemoryNamespace> {
- const fullNamespace: MemoryNamespace = {
- id: namespace.id || uuidv4(),
- name: namespace.name || 'Unnamed Namespace',
- description: namespace.description,
- permissions: namespace.permissions || {
- read: [],
- write: [],
- delete: [],
- admin: []
- },
- metadata: namespace.metadata || {}
- };
-
- // Validate namespace doesn't already exist
- if (this.namespaces.has(fullNamespace.id)) {
- throw new Error(`Namespace ${fullNamespace.id} already exists`);
- }
-
- // Store namespace
- this.namespaces.set(fullNamespace.id, fullNamespace);
- await this.persistNamespaces();
-
- this.emit('namespace-created', fullNamespace);
- return fullNamespace;
- }
-
- /**
- * Get namespace by ID
- */
- getNamespace(id: string): MemoryNamespace | null {
- return this.namespaces.get(id) || null;
- }
-
- /**
- * List all namespaces
- */
- listNamespaces(): MemoryNamespace[] {
- return Array.from(this.namespaces.values());
- }
-
- /**
- * Update namespace
- */
- async updateNamespace(
- id: string,
- updates: Partial<MemoryNamespace>
- ): Promise<MemoryNamespace> {
- const namespace = this.namespaces.get(id);
- if (!namespace) {
- throw new Error(`Namespace ${id} not found`);
- }
-
- const updated = {
- ...namespace,
- ...updates,
- id: namespace.id // Prevent ID changes
- };
-
- this.namespaces.set(id, updated);
- await this.persistNamespaces();
-
- this.emit('namespace-updated', updated);
- return updated;
- }
-
- /**
- * Delete namespace
- */
- async deleteNamespace(id: string): Promise<boolean> {
- if (id === 'default') {
- throw new Error('Cannot delete default namespace');
- }
-
- const namespace = this.namespaces.get(id);
- if (!namespace) {
- return false;
- }
-
- // Delete all items in namespace
- const items = await this.backend.query({ namespace: id });
- for (const item of items) {
- await this.backend.delete(item.category, item.key);
- }
-
- // Delete namespace
- this.namespaces.delete(id);
- await this.persistNamespaces();
-
- // Revoke all sessions for this namespace
- for (const [sessionId, session] of this.sessions) {
- if (session.namespaceId === id) {
- this.sessions.delete(sessionId);
- }
- }
-
- this.emit('namespace-deleted', { id });
- return true;
- }
-
- /**
- * Create session for a namespace
- */
- createSession(
- namespaceId: string,
- userId: string,
- permissions?: string[],
- ttl?: number
- ): string {
- const namespace = this.namespaces.get(namespaceId);
- if (!namespace) {
- throw new Error(`Namespace ${namespaceId} not found`);
- }
-
- // Validate permissions
- const validPermissions = this.validatePermissions(
- namespace,
- userId,
- permissions || ['read']
- );
-
- const session: NamespaceSession = {
- id: uuidv4(),
- namespaceId,
- userId,
- permissions: validPermissions,
- createdAt: Date.now(),
- expiresAt: ttl ? Date.now() + ttl : undefined
- };
-
- this.sessions.set(session.id, session);
-
- // Track user sessions
- if (!this.userSessions.has(userId)) {
- this.userSessions.set(userId, new Set());
- }
- this.userSessions.get(userId)!.add(session.id);
-
- this.emit('session-created', session);
- return session.id;
- }
-
- /**
- * Validate session and check permissions
- */
- validateSession(
- sessionId: string,
- requiredPermission: 'read' | 'write' | 'delete' | 'admin'
- ): boolean {
- const session = this.sessions.get(sessionId);
- if (!session) {
- return false;
- }
-
- // Check expiration
- if (session.expiresAt && Date.now() > session.expiresAt) {
- this.sessions.delete(sessionId);
- return false;
- }
-
- // Check permission
- return session.permissions.includes(requiredPermission) ||
- session.permissions.includes('*');
- }
-
- /**
- * Get session info
- */
- getSession(sessionId: string): NamespaceSession | null {
- return this.sessions.get(sessionId) || null;
- }
-
- /**
- * Revoke session
- */
- revokeSession(sessionId: string): boolean {
- const session = this.sessions.get(sessionId);
- if (!session) {
- return false;
- }
-
- this.sessions.delete(sessionId);
-
- // Remove from user sessions
- const userSessions = this.userSessions.get(session.userId);
- if (userSessions) {
- userSessions.delete(sessionId);
- if (userSessions.size === 0) {
- this.userSessions.delete(session.userId);
- }
- }
-
- this.emit('session-revoked', { sessionId });
- return true;
- }
-
- /**
- * Get all sessions for a user
- */
- getUserSessions(userId: string): NamespaceSession[] {
- const sessionIds = this.userSessions.get(userId);
- if (!sessionIds) {
- return [];
- }
-
- const sessions: NamespaceSession[] = [];
- for (const sessionId of sessionIds) {
- const session = this.sessions.get(sessionId);
- if (session) {
- sessions.push(session);
- }
- }
-
- return sessions;
- }
-
- /**
- * Get namespace statistics
- */
- getStats(): NamespaceStats {
- const itemsByNamespace = new Map<string, number>();
-
- // This would be more efficient with a dedicated query in production
- for (const namespace of this.namespaces.keys()) {
- itemsByNamespace.set(namespace, 0); // Placeholder
- }
-
- return {
- totalNamespaces: this.namespaces.size,
- activeSessions: this.sessions.size,
- itemsByNamespace
- };
- }
-
- /**
- * Clone namespace with all its items
- */
- async cloneNamespace(
- sourceId: string,
- targetId: string,
- targetName: string
- ): Promise<MemoryNamespace> {
- const source = this.namespaces.get(sourceId);
- if (!source) {
- throw new Error(`Source namespace ${sourceId} not found`);
- }
-
- // Create new namespace
- const target = await this.createNamespace({
- id: targetId,
- name: targetName,
- description: `Cloned from ${source.name}`,
- permissions: { ...source.permissions },
- metadata: {
- ...source.metadata,
- clonedFrom: sourceId,
- clonedAt: Date.now()
- }
- });
-
- // Copy all items
- const items = await this.backend.query({ namespace: sourceId });
- for (const item of items) {
- const clonedItem = {
- ...item,
- id: uuidv4(),
- metadata: {
- ...item.metadata,
- namespace: targetId,
- clonedFrom: item.id
- }
- };
- await this.backend.store(clonedItem);
- }
-
- this.emit('namespace-cloned', { source: sourceId, target: targetId });
- return target;
- }
-
- /**
- * Merge namespaces
- */
- async mergeNamespaces(
- sourceIds: string[],
- targetId: string,
- conflictResolution: 'skip' | 'overwrite' | 'rename' = 'skip'
- ): Promise<number> {
- const target = this.namespaces.get(targetId);
- if (!target) {
- throw new Error(`Target namespace ${targetId} not found`);
- }
-
- let mergedCount = 0;
-
- for (const sourceId of sourceIds) {
- if (sourceId === targetId) continue;
-
- const source = this.namespaces.get(sourceId);
- if (!source) continue;
-
- const items = await this.backend.query({ namespace: sourceId });
-
- for (const item of items) {
- const existingKey = `${item.category}:${item.key}`;
- const existing = await this.backend.get(item.category, item.key);
-
- if (existing && existing.metadata?.namespace === targetId) {
- // Handle conflict
- switch (conflictResolution) {
- case 'skip':
- continue;
- case 'overwrite':
- // Will overwrite below
- break;
- case 'rename':
- item.key = `${item.key}_${sourceId}`;
- break;
- }
- }
-
- // Store in target namespace
- const mergedItem = {
- ...item,
- id: uuidv4(),
- metadata: {
- ...item.metadata,
- namespace: targetId,
- mergedFrom: sourceId
- }
- };
-
- await this.backend.store(mergedItem);
- mergedCount++;
- }
- }
-
- this.emit('namespaces-merged', {
- sources: sourceIds,
- target: targetId,
- count: mergedCount
- });
-
- return mergedCount;
- }
-
- /**
- * Validate user permissions for namespace
- */
- private validatePermissions(
- namespace: MemoryNamespace,
- userId: string,
- requestedPermissions: string[]
- ): string[] {
- const validPermissions: string[] = [];
-
- for (const permission of requestedPermissions) {
- if (permission === '*' && namespace.permissions?.admin?.includes(userId)) {
- return ['*'];
- }
-
- if (permission === 'read' &&
- (namespace.permissions?.read?.includes(userId) ||
- namespace.permissions?.read?.includes('*'))) {
- validPermissions.push('read');
- }
-
- if (permission === 'write' &&
- (namespace.permissions?.write?.includes(userId) ||
- namespace.permissions?.write?.includes('*'))) {
- validPermissions.push('write');
- }
-
- if (permission === 'delete' &&
- (namespace.permissions?.delete?.includes(userId) ||
- namespace.permissions?.delete?.includes('*'))) {
- validPermissions.push('delete');
- }
-
- if (permission === 'admin' &&
- namespace.permissions?.admin?.includes(userId)) {
- validPermissions.push('admin');
- }
- }
-
- return validPermissions;
- }
-
- /**
- * Load namespaces from backend
- */
- private async loadNamespaces(): Promise<void> {
- try {
- const namespaceItems = await this.backend.query({
- categories: ['system-namespace']
- });
-
- for (const item of namespaceItems) {
- if (item.value && typeof item.value === 'object') {
- this.namespaces.set(item.key, item.value as MemoryNamespace);
- }
- }
- } catch (error) {
- // No existing namespaces
- }
- }
-
- /**
- * Persist namespaces to backend
- */
- private async persistNamespaces(): Promise<void> {
- for (const [id, namespace] of this.namespaces) {
- await this.backend.store({
- id: `namespace-${id}`,
- category: 'system-namespace',
- key: id,
- value: namespace,
- metadata: {
- timestamp: Date.now()
- }
- });
- }
- }
-
- /**
- * Cleanup expired sessions
- */
- private cleanupExpiredSessions(): void {
- const now = Date.now();
- const expiredSessions: string[] = [];
-
- for (const [sessionId, session] of this.sessions) {
- if (session.expiresAt && now > session.expiresAt) {
- expiredSessions.push(sessionId);
- }
- }
-
- for (const sessionId of expiredSessions) {
- this.revokeSession(sessionId);
- }
-
- if (expiredSessions.length > 0) {
- this.emit('sessions-cleaned', { count: expiredSessions.length });
- }
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/replication/replication-manager.ts b/archive/legacy-memory-system/src/replication/replication-manager.ts
deleted file mode 100644
index 2670c74d9f..0000000000
--- a/archive/legacy-memory-system/src/replication/replication-manager.ts
+++ /dev/null
@@ -1,530 +0,0 @@
-/**
- * SPARC Memory Bank - Replication Manager
- * Handles distributed memory synchronization across nodes
- */
-
-import { EventEmitter } from 'events';
-import { MemoryItem, MemoryBackend, ReplicationConfig, ReplicationNode } from '../types';
-import axios, { AxiosInstance } from 'axios';
-
-interface ReplicationStats {
- totalReplicated: number;
- failedReplications: number;
- lastSyncTime: number;
- nodesStatus: Map<string, NodeStatus>;
- queueSize: number;
-}
-
-interface NodeStatus {
- id: string;
- url: string;
- status: 'online' | 'offline' | 'syncing';
- lastSeen: number;
- lastError?: string;
- itemsReplicated: number;
- itemsFailed: number;
-}
-
-interface ReplicationMessage {
- type: 'store' | 'delete' | 'batch' | 'sync';
- sourceNodeId: string;
- timestamp: number;
- data: any;
- signature?: string;
-}
-
-export class ReplicationManager extends EventEmitter {
- private localNodeId: string;
- private backend: MemoryBackend;
- private config: ReplicationConfig;
- private nodes: Map<string, ReplicationNode> = new Map();
- private nodeClients: Map<string, AxiosInstance> = new Map();
- private nodeStatus: Map<string, NodeStatus> = new Map();
- private replicationQueue: ReplicationMessage[] = [];
- private syncInterval?: NodeJS.Timer;
- private healthCheckInterval?: NodeJS.Timer;
- private stats: ReplicationStats;
- private isReplicating: boolean = false;
-
- constructor(options: {
- localNodeId: string;
- backend: MemoryBackend;
- config: ReplicationConfig;
- }) {
- super();
-
- this.localNodeId = options.localNodeId;
- this.backend = options.backend;
- this.config = options.config;
-
- this.stats = {
- totalReplicated: 0,
- failedReplications: 0,
- lastSyncTime: 0,
- nodesStatus: this.nodeStatus,
- queueSize: 0
- };
-
- // Initialize nodes
- for (const node of options.config.nodes) {
- this.nodes.set(node.id, node);
- this.initializeNodeClient(node);
- }
- }
-
- async initialize(): Promise<void> {
- // Start sync interval
- if (this.config.syncInterval) {
- this.syncInterval = setInterval(
- () => this.processSyncQueue(),
- this.config.syncInterval
- );
- }
-
- // Start health check interval
- this.healthCheckInterval = setInterval(
- () => this.performHealthChecks(),
- 30000 // 30 seconds
- );
-
- // Perform initial health check
- await this.performHealthChecks();
-
- this.emit('initialized');
- }
-
- /**
- * Replicate a memory item to other nodes
- */
- async replicate(item: MemoryItem): Promise<void> {
- const message: ReplicationMessage = {
- type: 'store',
- sourceNodeId: this.localNodeId,
- timestamp: Date.now(),
- data: item
- };
-
- if (this.config.mode === 'master-slave') {
- await this.replicateMasterSlave(message);
- } else {
- await this.replicatePeerToPeer(message);
- }
- }
-
- /**
- * Replicate deletion to other nodes
- */
- async replicateDeletion(category: string, key: string): Promise<void> {
- const message: ReplicationMessage = {
- type: 'delete',
- sourceNodeId: this.localNodeId,
- timestamp: Date.now(),
- data: { category, key }
- };
-
- if (this.config.mode === 'master-slave') {
- await this.replicateMasterSlave(message);
- } else {
- await this.replicatePeerToPeer(message);
- }
- }
-
- /**
- * Sync with a specific node
- */
- async syncWithNode(nodeId: string): Promise<void> {
- const node = this.nodes.get(nodeId);
- if (!node) {
- throw new Error(`Node ${nodeId} not found`);
- }
-
- const status = this.nodeStatus.get(nodeId);
- if (status) {
- status.status = 'syncing';
- }
-
- try {
- // Get remote node's state
- const client = this.nodeClients.get(nodeId);
- if (!client) {
- throw new Error(`No client for node ${nodeId}`);
- }
-
- const response = await client.get('/memory/sync-state');
- const remoteState = response.data;
-
- // Compare and sync differences
- await this.reconcileWithRemote(nodeId, remoteState);
-
- if (status) {
- status.status = 'online';
- status.lastSeen = Date.now();
- }
-
- this.emit('sync-complete', { nodeId });
- } catch (error: any) {
- if (status) {
- status.status = 'offline';
- status.lastError = error.message;
- }
-
- this.emit('sync-failed', { nodeId, error: error.message });
- throw error;
- }
- }
-
- /**
- * Get replication statistics
- */
- async getStats(): Promise<ReplicationStats> {
- this.stats.queueSize = this.replicationQueue.length;
- return { ...this.stats };
- }
-
- /**
- * Close and cleanup
- */
- async close(): Promise<void> {
- if (this.syncInterval) {
- clearInterval(this.syncInterval);
- }
-
- if (this.healthCheckInterval) {
- clearInterval(this.healthCheckInterval);
- }
-
- // Process remaining queue
- if (this.replicationQueue.length > 0) {
- await this.processSyncQueue();
- }
-
- this.emit('closed');
- }
-
- /**
- * Initialize HTTP client for a node
- */
- private initializeNodeClient(node: ReplicationNode): void {
- const client = axios.create({
- baseURL: node.url,
- timeout: 30000,
- headers: {
- 'X-Node-ID': this.localNodeId,
- 'Content-Type': 'application/json'
- }
- });
-
- // Add retry logic
- client.interceptors.response.use(
- response => response,
- async error => {
- const config = error.config;
-
- if (!config || !config.retry) {
- config.retry = 0;
- }
-
- if (config.retry < (this.config.retryAttempts || 3)) {
- config.retry++;
-
- await new Promise(resolve =>
- setTimeout(resolve, this.config.retryDelay || 1000)
- );
-
- return client(config);
- }
-
- return Promise.reject(error);
- }
- );
-
- this.nodeClients.set(node.id, client);
-
- // Initialize status
- this.nodeStatus.set(node.id, {
- id: node.id,
- url: node.url,
- status: 'offline',
- lastSeen: 0,
- itemsReplicated: 0,
- itemsFailed: 0
- });
- }
-
- /**
- * Replicate in master-slave mode
- */
- private async replicateMasterSlave(message: ReplicationMessage): Promise<void> {
- const localNode = Array.from(this.nodes.values()).find(
- n => n.id === this.localNodeId
- );
-
- if (localNode?.role === 'master') {
- // Master replicates to all slaves
- const slaves = Array.from(this.nodes.values()).filter(
- n => n.role === 'slave'
- );
-
- await this.replicateToNodes(slaves, message);
- } else {
- // Slave sends to master
- const master = Array.from(this.nodes.values()).find(
- n => n.role === 'master'
- );
-
- if (master) {
- await this.replicateToNodes([master], message);
- }
- }
- }
-
- /**
- * Replicate in peer-to-peer mode
- */
- private async replicatePeerToPeer(message: ReplicationMessage): Promise<void> {
- // Replicate to all peers
- const peers = Array.from(this.nodes.values()).filter(
- n => n.id !== this.localNodeId
- );
-
- await this.replicateToNodes(peers, message);
- }
-
- /**
- * Replicate message to specific nodes
- */
- private async replicateToNodes(
- nodes: ReplicationNode[],
- message: ReplicationMessage
- ): Promise<void> {
- // Queue message if sync interval is set
- if (this.config.syncInterval) {
- this.replicationQueue.push(message);
- return;
- }
-
- // Otherwise, replicate immediately
- await Promise.allSettled(
- nodes.map(node => this.sendToNode(node.id, message))
- );
- }
-
- /**
- * Send message to a specific node
- */
- private async sendToNode(
- nodeId: string,
- message: ReplicationMessage
- ): Promise<void> {
- const client = this.nodeClients.get(nodeId);
- const status = this.nodeStatus.get(nodeId);
-
- if (!client || !status) {
- return;
- }
-
- try {
- await client.post('/memory/replicate', message);
-
- status.itemsReplicated++;
- this.stats.totalReplicated++;
-
- this.emit('replicated', { nodeId, message });
- } catch (error: any) {
- status.itemsFailed++;
- this.stats.failedReplications++;
-
- this.emit('replication-failed', {
- nodeId,
- message,
- error: error.message
- });
- }
- }
-
- /**
- * Process queued replication messages
- */
- private async processSyncQueue(): Promise<void> {
- if (this.isReplicating || this.replicationQueue.length === 0) {
- return;
- }
-
- this.isReplicating = true;
- this.stats.lastSyncTime = Date.now();
-
- // Group messages by node
- const messagesByNode = new Map<string, ReplicationMessage[]>();
-
- while (this.replicationQueue.length > 0) {
- const message = this.replicationQueue.shift()!;
-
- for (const node of this.nodes.values()) {
- if (node.id === this.localNodeId) continue;
-
- if (!messagesByNode.has(node.id)) {
- messagesByNode.set(node.id, []);
- }
-
- messagesByNode.get(node.id)!.push(message);
- }
- }
-
- // Send batch messages to each node
- await Promise.allSettled(
- Array.from(messagesByNode.entries()).map(([nodeId, messages]) =>
- this.sendBatchToNode(nodeId, messages)
- )
- );
-
- this.isReplicating = false;
- }
-
- /**
- * Send batch of messages to a node
- */
- private async sendBatchToNode(
- nodeId: string,
- messages: ReplicationMessage[]
- ): Promise<void> {
- const batchMessage: ReplicationMessage = {
- type: 'batch',
- sourceNodeId: this.localNodeId,
- timestamp: Date.now(),
- data: messages
- };
-
- await this.sendToNode(nodeId, batchMessage);
- }
-
- /**
- * Perform health checks on all nodes
- */
- private async performHealthChecks(): Promise<void> {
- await Promise.allSettled(
- Array.from(this.nodes.values()).map(node =>
- this.checkNodeHealth(node.id)
- )
- );
- }
-
- /**
- * Check health of a specific node
- */
- private async checkNodeHealth(nodeId: string): Promise<void> {
- if (nodeId === this.localNodeId) return;
-
- const client = this.nodeClients.get(nodeId);
- const status = this.nodeStatus.get(nodeId);
-
- if (!client || !status) return;
-
- try {
- const response = await client.get('/memory/health', {
- timeout: 5000
- });
-
- if (response.status === 200) {
- status.status = 'online';
- status.lastSeen = Date.now();
- status.lastError = undefined;
- }
- } catch (error: any) {
- status.status = 'offline';
- status.lastError = error.message;
- }
- }
-
- /**
- * Reconcile local state with remote node
- */
- private async reconcileWithRemote(
- nodeId: string,
- remoteState: any
- ): Promise<void> {
- // This is a simplified reconciliation
- // In production, you'd want more sophisticated conflict resolution
-
- const localItems = await this.backend.query({});
- const localMap = new Map(
- localItems.map(item => [`${item.category}:${item.key}`, item])
- );
-
- const remoteMap = new Map(
- remoteState.items.map((item: MemoryItem) =>
- [`${item.category}:${item.key}`, item]
- )
- );
-
- // Find items to pull from remote
- const toPull: MemoryItem[] = [];
- for (const [key, remoteItem] of remoteMap) {
- const localItem = localMap.get(key);
-
- if (!localItem || this.shouldPullRemote(localItem, remoteItem)) {
- toPull.push(remoteItem);
- }
- }
-
- // Find items to push to remote
- const toPush: MemoryItem[] = [];
- for (const [key, localItem] of localMap) {
- const remoteItem = remoteMap.get(key);
-
- if (!remoteItem || this.shouldPushLocal(localItem, remoteItem)) {
- toPush.push(localItem);
- }
- }
-
- // Apply changes
- for (const item of toPull) {
- await this.backend.store(item);
- }
-
- if (toPush.length > 0) {
- const client = this.nodeClients.get(nodeId);
- if (client) {
- await client.post('/memory/batch-store', { items: toPush });
- }
- }
- }
-
- /**
- * Determine if should pull remote version
- */
- private shouldPullRemote(local: MemoryItem, remote: MemoryItem): boolean {
- // Use configured conflict resolution strategy
- switch (this.config.conflictResolution) {
- case 'last-write-wins':
- const localTime = local.metadata?.timestamp || 0;
- const remoteTime = remote.metadata?.timestamp || 0;
- return remoteTime > localTime;
-
- case 'vector-clock':
- // Simplified vector clock comparison
- return this.compareVectorClocks(local, remote) < 0;
-
- default:
- return false;
- }
- }
-
- /**
- * Determine if should push local version
- */
- private shouldPushLocal(local: MemoryItem, remote: MemoryItem): boolean {
- return !this.shouldPullRemote(local, remote);
- }
-
- /**
- * Compare vector clocks (simplified)
- */
- private compareVectorClocks(item1: MemoryItem, item2: MemoryItem): number {
- const v1 = item1.metadata?.version || '0';
- const v2 = item2.metadata?.version || '0';
-
- if (v1 < v2) return -1;
- if (v1 > v2) return 1;
- return 0;
- }
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/tests/backends.test.ts b/archive/legacy-memory-system/src/tests/backends.test.ts
deleted file mode 100644
index bebc4338b7..0000000000
--- a/archive/legacy-memory-system/src/tests/backends.test.ts
+++ /dev/null
@@ -1,425 +0,0 @@
-/**
- * SPARC Memory Bank - Backend Tests
- */
-
-import { describe, it, expect, beforeEach, afterEach } from 'vitest';
-import { SqliteBackend } from '../backends/sqlite-backend';
-import { MarkdownBackend } from '../backends/markdown-backend';
-import { MemoryItem, MemoryBackend } from '../types';
-import * as fs from 'fs/promises';
-import * as path from 'path';
-
-// Test both backends with same test suite
-const backends = [
- { name: 'SQLite', createBackend: (dir: string) => new SqliteBackend({ path: path.join(dir, 'test.db') }) },
- { name: 'Markdown', createBackend: (dir: string) => new MarkdownBackend({ rootPath: dir, prettyPrint: true }) }
-];
-
-backends.forEach(({ name, createBackend }) => {
- describe(`${name} Backend`, () => {
- let backend: MemoryBackend;
- const testDir = `/tmp/backend-test-${name.toLowerCase()}`;
-
- beforeEach(async () => {
- await fs.mkdir(testDir, { recursive: true });
- backend = createBackend(testDir);
- await backend.initialize();
- });
-
- afterEach(async () => {
- await backend.close();
- await fs.rm(testDir, { recursive: true, force: true });
- });
-
- describe('Basic Operations', () => {
- it('should store and retrieve items', async () => {
- const item: MemoryItem = {
- id: 'test-1',
- category: 'test-category',
- key: 'test-key',
- value: { data: 'test value', number: 42 },
- metadata: {
- timestamp: Date.now(),
- tags: ['test', 'unit-test']
- }
- };
-
- await backend.store(item);
-
- const retrieved = await backend.get('test-category', 'test-key');
- expect(retrieved).toBeDefined();
- expect(retrieved?.id).toBe('test-1');
- expect(retrieved?.value).toEqual({ data: 'test value', number: 42 });
- expect(retrieved?.metadata?.tags).toEqual(['test', 'unit-test']);
- });
-
- it('should handle non-existent items', async () => {
- const result = await backend.get('non-existent', 'key');
- expect(result).toBeNull();
- });
-
- it('should update existing items', async () => {
- const item: MemoryItem = {
- id: 'update-test',
- category: 'update',
- key: 'key1',
- value: 'original value'
- };
-
- await backend.store(item);
-
- const updated = await backend.update('update', 'key1', {
- value: 'updated value',
- metadata: { updated: true }
- });
-
- expect(updated).toBe(true);
-
- const retrieved = await backend.get('update', 'key1');
- expect(retrieved?.value).toBe('updated value');
- expect(retrieved?.metadata?.updated).toBe(true);
- });
-
- it('should delete items', async () => {
- const item: MemoryItem = {
- id: 'delete-test',
- category: 'delete',
- key: 'key1',
- value: 'to be deleted'
- };
-
- await backend.store(item);
-
- const exists = await backend.get('delete', 'key1');
- expect(exists).toBeDefined();
-
- const deleted = await backend.delete('delete', 'key1');
- expect(deleted).toBe(true);
-
- const notExists = await backend.get('delete', 'key1');
- expect(notExists).toBeNull();
-
- // Delete non-existent should return false
- const deletedAgain = await backend.delete('delete', 'key1');
- expect(deletedAgain).toBe(false);
- });
- });
-
- describe('Query Operations', () => {
- beforeEach(async () => {
- // Store test data
- const items: MemoryItem[] = [
- {
- id: 'user-1',
- category: 'users',
- key: 'alice',
- value: { name: 'Alice', age: 30 },
- metadata: {
- timestamp: Date.now() - 3600000,
- tags: ['active', 'premium'],
- namespace: 'app1'
- }
- },
- {
- id: 'user-2',
- category: 'users',
- key: 'bob',
- value: { name: 'Bob', age: 25 },
- metadata: {
- timestamp: Date.now() - 1800000,
- tags: ['active'],
- namespace: 'app1'
- }
- },
- {
- id: 'post-1',
- category: 'posts',
- key: 'post1',
- value: { title: 'Hello World', author: 'alice' },
- metadata: {
- timestamp: Date.now() - 900000,
- tags: ['featured'],
- namespace: 'app1'
- }
- },
- {
- id: 'config-1',
- category: 'config',
- key: 'settings',
- value: { theme: 'dark' },
- metadata: {
- timestamp: Date.now(),
- namespace: 'app2'
- }
- }
- ];
-
- for (const item of items) {
- await backend.store(item);
- }
- });
-
- it('should query by category', async () => {
- const results = await backend.query({
- categories: ['users']
- });
-
- expect(results).toHaveLength(2);
- expect(results.every(item => item.category === 'users')).toBe(true);
- });
-
- it('should query by multiple categories', async () => {
- const results = await backend.query({
- categories: ['users', 'posts']
- });
-
- expect(results).toHaveLength(3);
- });
-
- it('should query by keys', async () => {
- const results = await backend.query({
- keys: ['alice', 'post1']
- });
-
- expect(results).toHaveLength(2);
- expect(results.find(i => i.key === 'alice')).toBeDefined();
- expect(results.find(i => i.key === 'post1')).toBeDefined();
- });
-
- it('should query by namespace', async () => {
- const results = await backend.query({
- namespace: 'app1'
- });
-
- expect(results).toHaveLength(3);
- expect(results.every(item => item.metadata?.namespace === 'app1')).toBe(true);
- });
-
- it('should query by time range', async () => {
- const oneHourAgo = Date.now() - 3600000;
- const thirtyMinutesAgo = Date.now() - 1800000;
-
- const results = await backend.query({
- startTime: oneHourAgo,
- endTime: thirtyMinutesAgo
- });
-
- // Should include items from 1 hour ago to 30 minutes ago
- expect(results.length).toBeGreaterThanOrEqual(1);
- });
-
- it('should apply ordering', async () => {
- const results = await backend.query({
- categories: ['users'],
- orderBy: 'key',
- orderDirection: 'asc'
- });
-
- expect(results[0].key).toBe('alice');
- expect(results[1].key).toBe('bob');
-
- const descResults = await backend.query({
- categories: ['users'],
- orderBy: 'key',
- orderDirection: 'desc'
- });
-
- expect(descResults[0].key).toBe('bob');
- expect(descResults[1].key).toBe('alice');
- });
-
- it('should apply limit and offset', async () => {
- const results = await backend.query({
- limit: 2
- });
-
- expect(results).toHaveLength(2);
-
- const offsetResults = await backend.query({
- limit: 2,
- offset: 2
- });
-
- expect(offsetResults).toHaveLength(2);
- expect(offsetResults[0].id).not.toBe(results[0].id);
- });
-
- it('should apply custom filter', async () => {
- const results = await backend.query({
- filter: (item) => {
- if (item.category === 'users' && typeof item.value === 'object') {
- return (item.value as any).age > 25;
- }
- return false;
- }
- });
-
- expect(results).toHaveLength(1);
- expect((results[0].value as any).name).toBe('Alice');
- });
- });
-
- describe('Vector Embeddings', () => {
- it('should store and retrieve vector embeddings', async () => {
- const item: MemoryItem = {
- id: 'vector-test',
- category: 'embeddings',
- key: 'doc1',
- value: 'This is a document',
- vectorEmbedding: [0.1, 0.2, 0.3, 0.4, 0.5]
- };
-
- await backend.store(item);
-
- const retrieved = await backend.get('embeddings', 'doc1');
- expect(retrieved?.vectorEmbedding).toBeDefined();
- expect(retrieved?.vectorEmbedding).toHaveLength(5);
- expect(retrieved?.vectorEmbedding?.[0]).toBeCloseTo(0.1);
- });
- });
-
- describe('Statistics', () => {
- it('should provide accurate statistics', async () => {
- // Store some test data
- await backend.store({
- id: 'stat1',
- category: 'stats',
- key: 'item1',
- value: 'test data 1'
- });
-
- await backend.store({
- id: 'stat2',
- category: 'stats',
- key: 'item2',
- value: 'test data 2'
- });
-
- await backend.store({
- id: 'stat3',
- category: 'other',
- key: 'item3',
- value: 'test data 3'
- });
-
- const stats = await backend.getStats();
-
- expect(stats.totalItems).toBe(3);
- expect(stats.categories).toBe(2);
- expect(stats.sizeBytes).toBeGreaterThan(0);
- expect(stats.oldestItem).toBeDefined();
- expect(stats.newestItem).toBeDefined();
- });
- });
-
- if (name === 'SQLite') {
- describe('SQLite Specific Features', () => {
- it('should support full-text search', async () => {
- const sqliteBackend = backend as SqliteBackend;
-
- await sqliteBackend.store({
- id: 'fts1',
- category: 'documents',
- key: 'doc1',
- value: 'The quick brown fox jumps over the lazy dog'
- });
-
- await sqliteBackend.store({
- id: 'fts2',
- category: 'documents',
- key: 'doc2',
- value: 'A lazy cat sleeps all day'
- });
-
- const results = await sqliteBackend.search('lazy', {
- categories: ['documents']
- });
-
- expect(results).toHaveLength(2);
- });
-
- it('should handle time-travel queries', async () => {
- const sqliteBackend = backend as SqliteBackend;
-
- // Store and update item
- await sqliteBackend.store({
- id: 'time-travel',
- category: 'versioned',
- key: 'item1',
- value: 'version 1'
- });
-
- const timePoint = Date.now();
-
- await new Promise(resolve => setTimeout(resolve, 10));
-
- await sqliteBackend.store({
- id: 'time-travel',
- category: 'versioned',
- key: 'item1',
- value: 'version 2'
- });
-
- // Query as of past time
- const results = await sqliteBackend.query({
- categories: ['versioned'],
- asOf: timePoint
- });
-
- // Should return the version that existed at that time
- expect(results.length).toBeGreaterThanOrEqual(0);
- });
- });
- }
-
- if (name === 'Markdown') {
- describe('Markdown Specific Features', () => {
- it('should create proper directory structure', async () => {
- const markdownBackend = backend as MarkdownBackend;
-
- await markdownBackend.store({
- id: 'arch1',
- category: 'architecture',
- key: 'decision-001',
- value: { decision: 'Use microservices' }
- });
-
- // Check if file was created in correct directory
- const expectedPath = path.join(
- testDir,
- 'shared-knowledge',
- 'architectural-decisions',
- 'default',
- 'decision-001.md'
- );
-
- const exists = await fs.access(expectedPath).then(() => true).catch(() => false);
- expect(exists).toBe(true);
- });
-
- it('should search through markdown files', async () => {
- const markdownBackend = backend as MarkdownBackend;
-
- await markdownBackend.store({
- id: 'search1',
- category: 'notes',
- key: 'note1',
- value: 'This is a searchable note about testing'
- });
-
- await markdownBackend.store({
- id: 'search2',
- category: 'notes',
- key: 'note2',
- value: 'Another note about deployment'
- });
-
- const results = await markdownBackend.search('testing');
-
- expect(results).toHaveLength(1);
- expect(results[0].key).toBe('note1');
- });
- });
- }
- });
-});
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/tests/import-export.test.ts b/archive/legacy-memory-system/src/tests/import-export.test.ts
deleted file mode 100644
index 619981a27e..0000000000
--- a/archive/legacy-memory-system/src/tests/import-export.test.ts
+++ /dev/null
@@ -1,389 +0,0 @@
-/**
- * SPARC Memory Bank - Import/Export Tests
- */
-
-import { describe, it, expect, beforeEach } from 'vitest';
-import { ImportExportManager } from '../io/import-export';
-import { MemoryItem } from '../types';
-
-describe('ImportExportManager', () => {
- let importExport: ImportExportManager;
- let testItems: MemoryItem[];
-
- beforeEach(() => {
- importExport = new ImportExportManager();
-
- testItems = [
- {
- id: 'item1',
- category: 'users',
- key: 'alice',
- value: { name: 'Alice', age: 30 },
- metadata: {
- timestamp: Date.now(),
- namespace: 'app1',
- tags: ['active', 'premium']
- }
- },
- {
- id: 'item2',
- category: 'users',
- key: 'bob',
- value: { name: 'Bob', age: 25 },
- metadata: {
- timestamp: Date.now(),
- namespace: 'app1',
- tags: ['active']
- }
- },
- {
- id: 'item3',
- category: 'posts',
- key: 'post1',
- value: { title: 'Hello World', content: 'Test post' },
- metadata: {
- timestamp: Date.now(),
- namespace: 'app1',
- tags: ['featured']
- }
- }
- ];
- });
-
- describe('JSON Format', () => {
- it('should export to JSON format', async () => {
- const exported = await importExport.export(testItems, {
- format: 'json',
- includeMetadata: true
- });
-
- expect(typeof exported).toBe('string');
- const parsed = JSON.parse(exported as string);
- expect(Array.isArray(parsed)).toBe(true);
- expect(parsed).toHaveLength(3);
- expect(parsed[0].id).toBe('item1');
- expect(parsed[0].metadata).toBeDefined();
- });
-
- it('should export JSON without metadata', async () => {
- const exported = await importExport.export(testItems, {
- format: 'json',
- includeMetadata: false
- });
-
- const parsed = JSON.parse(exported as string);
- expect(parsed[0].metadata).toBeUndefined();
- });
-
- it('should import from JSON', async () => {
- const json = JSON.stringify(testItems);
- const imported = await importExport.import(json, {
- format: 'json'
- });
-
- expect(imported).toHaveLength(3);
- expect(imported[0].id).toBe('item1');
- expect(imported[0].value).toEqual({ name: 'Alice', age: 30 });
- });
-
- it('should import JSON snapshot format', async () => {
- const snapshot = {
- version: '1.0',
- timestamp: Date.now(),
- nodeId: 'test-node',
- items: testItems
- };
-
- const json = JSON.stringify(snapshot);
- const imported = await importExport.import(json, {
- format: 'json'
- });
-
- expect(imported).toHaveLength(3);
- });
- });
-
- describe('Markdown Format', () => {
- it('should export to Markdown format', async () => {
- const exported = await importExport.export(testItems, {
- format: 'markdown',
- includeMetadata: true
- });
-
- expect(typeof exported).toBe('string');
- const markdown = exported as string;
-
- expect(markdown).toContain('# Memory Export');
- expect(markdown).toContain('## users');
- expect(markdown).toContain('### alice');
- expect(markdown).toContain('### bob');
- expect(markdown).toContain('## posts');
- expect(markdown).toContain('### post1');
- expect(markdown).toContain('**Metadata**:');
- });
-
- it('should export Markdown without metadata', async () => {
- const exported = await importExport.export(testItems, {
- format: 'markdown',
- includeMetadata: false
- });
-
- const markdown = exported as string;
- expect(markdown).not.toContain('**Metadata**:');
- });
-
- it('should import from Markdown', async () => {
- const markdown = `# Memory Export
-
-## users
-
-### alice
-
-**Metadata**:
-- timestamp: ${Date.now()}
-- namespace: "app1"
-- tags: ["active", "premium"]
-
-**Value**:
-\`\`\`json
-{
- "name": "Alice",
- "age": 30
-}
-\`\`\`
-
----
-
-### bob
-
-**Value**:
-Bob's data
-
----
-
-## posts
-
-### post1
-
-**Value**:
-Simple post content
-
----
-`;
-
- const imported = await importExport.import(markdown, {
- format: 'markdown'
- });
-
- expect(imported).toHaveLength(3);
-
- const alice = imported.find(i => i.key === 'alice');
- expect(alice).toBeDefined();
- expect(alice?.category).toBe('users');
- expect(alice?.value).toEqual({ name: 'Alice', age: 30 });
- expect(alice?.metadata?.tags).toEqual(['active', 'premium']);
-
- const bob = imported.find(i => i.key === 'bob');
- expect(bob?.value).toBe("Bob's data");
- });
- });
-
- describe('CSV Format', () => {
- it('should export to CSV format', async () => {
- const exported = await importExport.export(testItems, {
- format: 'csv',
- includeMetadata: true
- });
-
- const csv = exported as string;
- const lines = csv.split('\n');
-
- expect(lines[0]).toBe('id,category,key,value,timestamp,namespace,tags');
- expect(lines).toHaveLength(4); // header + 3 items
-
- // Check first data row
- const firstRow = lines[1].split(',');
- expect(firstRow[0]).toBe('item1');
- expect(firstRow[1]).toBe('users');
- expect(firstRow[2]).toBe('alice');
- });
-
- it('should handle CSV special characters', async () => {
- const itemWithComma: MemoryItem = {
- id: 'special',
- category: 'test',
- key: 'key,with,commas',
- value: { text: 'Value with "quotes" and, commas' }
- };
-
- const exported = await importExport.export([itemWithComma], {
- format: 'csv',
- includeMetadata: false
- });
-
- const csv = exported as string;
- expect(csv).toContain('"key,with,commas"');
- expect(csv).toContain('""quotes""');
- });
-
- it('should import from CSV', async () => {
- const csv = `id,category,key,value,timestamp,namespace,tags
-item1,users,alice,"{""name"":""Alice"",""age"":30}",1234567890,app1,active;premium
-item2,users,bob,"{""name"":""Bob""}",1234567891,app1,active`;
-
- const imported = await importExport.import(csv, {
- format: 'csv'
- });
-
- expect(imported).toHaveLength(2);
-
- const alice = imported[0];
- expect(alice.id).toBe('item1');
- expect(alice.value).toEqual({ name: 'Alice', age: 30 });
- expect(alice.metadata?.tags).toEqual(['active', 'premium']);
- });
- });
-
- describe('Compression', () => {
- it('should compress and decompress data', async () => {
- const exported = await importExport.export(testItems, {
- format: 'json',
- includeMetadata: true,
- compress: true
- });
-
- expect(Buffer.isBuffer(exported)).toBe(true);
-
- // Should be smaller than uncompressed
- const uncompressed = JSON.stringify(testItems);
- expect((exported as Buffer).length).toBeLessThan(uncompressed.length);
-
- // Should decompress correctly
- const imported = await importExport.import(exported, {
- format: 'json',
- compress: true
- });
-
- expect(imported).toHaveLength(3);
- expect(imported[0].id).toBe('item1');
- });
- });
-
- describe('Encryption', () => {
- it('should encrypt and decrypt data', async () => {
- const key = 'test-encryption-key-32-chars-long';
-
- const exported = await importExport.export(testItems, {
- format: 'json',
- includeMetadata: true,
- encryption: {
- algorithm: 'aes-256-cbc',
- key
- }
- });
-
- expect(Buffer.isBuffer(exported)).toBe(true);
-
- // Encrypted data should not contain readable JSON
- const exportedStr = exported.toString();
- expect(exportedStr).not.toContain('item1');
- expect(exportedStr).not.toContain('Alice');
-
- // Should decrypt correctly
- const imported = await importExport.import(exported, {
- format: 'json',
- encryption: {
- algorithm: 'aes-256-cbc',
- key
- }
- });
-
- expect(imported).toHaveLength(3);
- expect(imported[0].id).toBe('item1');
- expect(imported[0].value).toEqual({ name: 'Alice', age: 30 });
- });
-
- it('should handle compression and encryption together', async () => {
- const key = 'test-encryption-key-32-chars-long';
-
- const exported = await importExport.export(testItems, {
- format: 'json',
- includeMetadata: true,
- compress: true,
- encryption: {
- algorithm: 'aes-256-cbc',
- key
- }
- });
-
- const imported = await importExport.import(exported, {
- format: 'json',
- compress: true,
- encryption: {
- algorithm: 'aes-256-cbc',
- key
- }
- });
-
- expect(imported).toHaveLength(3);
- expect(imported[0].id).toBe('item1');
- });
- });
-
- describe('Snapshot Management', () => {
- it('should create snapshot', () => {
- const snapshot = importExport.createSnapshot(testItems, 'test-node');
-
- expect(snapshot.version).toBe('1.0');
- expect(snapshot.nodeId).toBe('test-node');
- expect(snapshot.timestamp).toBeDefined();
- expect(snapshot.items).toHaveLength(3);
- expect(snapshot.metadata?.itemCount).toBe(3);
- expect(snapshot.metadata?.categories).toContain('users');
- expect(snapshot.metadata?.categories).toContain('posts');
- expect(snapshot.metadata?.namespaces).toContain('app1');
- });
-
- it('should validate snapshot', () => {
- const validSnapshot = {
- version: '1.0',
- timestamp: Date.now(),
- nodeId: 'test',
- items: testItems
- };
-
- expect(importExport.validateSnapshot(validSnapshot)).toBe(true);
-
- const invalidSnapshots = [
- null,
- {},
- { version: '1.0' },
- { version: '1.0', timestamp: Date.now() },
- { version: '1.0', timestamp: Date.now(), nodeId: 'test' },
- { version: '1.0', timestamp: Date.now(), nodeId: 'test', items: 'not-array' }
- ];
-
- for (const invalid of invalidSnapshots) {
- expect(importExport.validateSnapshot(invalid)).toBe(false);
- }
- });
- });
-
- describe('Error Handling', () => {
- it('should throw on unsupported format', async () => {
- await expect(
- importExport.export(testItems, { format: 'unsupported' as any })
- ).rejects.toThrow('Unsupported export format');
-
- await expect(
- importExport.import('data', { format: 'unsupported' as any })
- ).rejects.toThrow('Unsupported import format');
- });
-
- it('should throw on invalid JSON import', async () => {
- await expect(
- importExport.import('invalid json', { format: 'json' })
- ).rejects.toThrow();
- });
- });
-});
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/tests/indexer.test.ts b/archive/legacy-memory-system/src/tests/indexer.test.ts
deleted file mode 100644
index 33e4d2ab8e..0000000000
--- a/archive/legacy-memory-system/src/tests/indexer.test.ts
+++ /dev/null
@@ -1,404 +0,0 @@
-/**
- * SPARC Memory Bank - Indexer Tests
- */
-
-import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
-import { MemoryIndexer } from '../indexer/memory-indexer';
-import { SqliteBackend } from '../backends/sqlite-backend';
-import { MemoryItem } from '../types';
-import * as fs from 'fs/promises';
-import * as path from 'path';
-
-describe('MemoryIndexer', () => {
- let indexer: MemoryIndexer;
- let backend: SqliteBackend;
- const testDir = '/tmp/indexer-test';
-
- beforeEach(async () => {
- await fs.mkdir(testDir, { recursive: true });
-
- backend = new SqliteBackend({
- path: path.join(testDir, 'test.db')
- });
- await backend.initialize();
-
- indexer = new MemoryIndexer({
- backend,
- enableVectorSearch: true,
- vectorDimensions: 128
- });
- await indexer.initialize();
- });
-
- afterEach(async () => {
- await indexer.close();
- await backend.close();
- await fs.rm(testDir, { recursive: true, force: true });
- });
-
- describe('Basic Indexing', () => {
- it('should index items by category', async () => {
- const item1: MemoryItem = {
- id: 'test1',
- category: 'users',
- key: 'user1',
- value: { name: 'Alice' }
- };
-
- const item2: MemoryItem = {
- id: 'test2',
- category: 'users',
- key: 'user2',
- value: { name: 'Bob' }
- };
-
- const item3: MemoryItem = {
- id: 'test3',
- category: 'posts',
- key: 'post1',
- value: { title: 'Hello' }
- };
-
- await indexer.index(item1);
- await indexer.index(item2);
- await indexer.index(item3);
-
- const userCandidates = await indexer.query({ categories: ['users'] });
- expect(userCandidates.size).toBe(2);
- expect(userCandidates.has('users:user1')).toBe(true);
- expect(userCandidates.has('users:user2')).toBe(true);
- });
-
- it('should index items by tags', async () => {
- const item1: MemoryItem = {
- id: 'test1',
- category: 'articles',
- key: 'article1',
- value: 'Content',
- metadata: { tags: ['tech', 'ai'] }
- };
-
- const item2: MemoryItem = {
- id: 'test2',
- category: 'articles',
- key: 'article2',
- value: 'Content',
- metadata: { tags: ['tech', 'web'] }
- };
-
- await indexer.index(item1);
- await indexer.index(item2);
-
- const techCandidates = await indexer.query({ tags: ['tech'] });
- expect(techCandidates.size).toBe(2);
-
- const aiCandidates = await indexer.query({ tags: ['ai'] });
- expect(aiCandidates.size).toBe(1);
- expect(aiCandidates.has('articles:article1')).toBe(true);
- });
-
- it('should index items by namespace', async () => {
- const item1: MemoryItem = {
- id: 'test1',
- category: 'config',
- key: 'setting1',
- value: 'value1',
- metadata: { namespace: 'app1' }
- };
-
- const item2: MemoryItem = {
- id: 'test2',
- category: 'config',
- key: 'setting2',
- value: 'value2',
- metadata: { namespace: 'app2' }
- };
-
- await indexer.index(item1);
- await indexer.index(item2);
-
- const app1Candidates = await indexer.query({ namespace: 'app1' });
- expect(app1Candidates.size).toBe(1);
- expect(app1Candidates.has('config:setting1')).toBe(true);
- });
-
- it('should remove items from index', async () => {
- const item: MemoryItem = {
- id: 'test1',
- category: 'temp',
- key: 'temp1',
- value: 'temporary',
- metadata: { tags: ['temporary'] }
- };
-
- await indexer.index(item);
-
- let candidates = await indexer.query({ categories: ['temp'] });
- expect(candidates.size).toBe(1);
-
- await indexer.remove('temp', 'temp1');
-
- candidates = await indexer.query({ categories: ['temp'] });
- expect(candidates.size).toBe(0);
-
- // Also removed from tag index
- const tagCandidates = await indexer.query({ tags: ['temporary'] });
- expect(tagCandidates.size).toBe(0);
- });
- });
-
- describe('Complex Queries', () => {
- beforeEach(async () => {
- // Add test data
- await indexer.index({
- id: 'user1',
- category: 'users',
- key: 'alice',
- value: { name: 'Alice' },
- metadata: { tags: ['admin', 'active'], namespace: 'prod' }
- });
-
- await indexer.index({
- id: 'user2',
- category: 'users',
- key: 'bob',
- value: { name: 'Bob' },
- metadata: { tags: ['user', 'active'], namespace: 'prod' }
- });
-
- await indexer.index({
- id: 'user3',
- category: 'users',
- key: 'charlie',
- value: { name: 'Charlie' },
- metadata: { tags: ['user', 'inactive'], namespace: 'dev' }
- });
-
- await indexer.index({
- id: 'post1',
- category: 'posts',
- key: 'post1',
- value: { title: 'Post 1' },
- metadata: { tags: ['featured'], namespace: 'prod' }
- });
- });
-
- it('should handle multiple filter criteria', async () => {
- // Users in prod namespace
- const candidates = await indexer.query({
- categories: ['users'],
- namespace: 'prod'
- });
-
- expect(candidates.size).toBe(2);
- expect(candidates.has('users:alice')).toBe(true);
- expect(candidates.has('users:bob')).toBe(true);
- });
-
- it('should handle tag combinations', async () => {
- // Active users
- const candidates = await indexer.query({
- categories: ['users'],
- tags: ['active']
- });
-
- expect(candidates.size).toBe(2);
- expect(candidates.has('users:alice')).toBe(true);
- expect(candidates.has('users:bob')).toBe(true);
- });
-
- it('should return all items when no filters specified', async () => {
- const candidates = await indexer.query({});
- expect(candidates.size).toBe(4); // All items
- });
- });
-
- describe('Vector Search', () => {
- it('should support vector search', () => {
- expect(indexer.supportsVectorSearch()).toBe(true);
- });
-
- it('should index and search vectors', async () => {
- const embedding1 = new Array(128).fill(0).map((_, i) => Math.sin(i));
- const embedding2 = new Array(128).fill(0).map((_, i) => Math.cos(i));
- const embedding3 = new Array(128).fill(0).map((_, i) => Math.sin(i * 2));
-
- await backend.store({
- id: 'doc1',
- category: 'documents',
- key: 'doc1',
- value: 'Document 1',
- vectorEmbedding: embedding1
- });
-
- await backend.store({
- id: 'doc2',
- category: 'documents',
- key: 'doc2',
- value: 'Document 2',
- vectorEmbedding: embedding2
- });
-
- await backend.store({
- id: 'doc3',
- category: 'documents',
- key: 'doc3',
- value: 'Document 3',
- vectorEmbedding: embedding3
- });
-
- await indexer.index({
- id: 'doc1',
- category: 'documents',
- key: 'doc1',
- value: 'Document 1',
- vectorEmbedding: embedding1
- });
-
- await indexer.index({
- id: 'doc2',
- category: 'documents',
- key: 'doc2',
- value: 'Document 2',
- vectorEmbedding: embedding2
- });
-
- await indexer.index({
- id: 'doc3',
- category: 'documents',
- key: 'doc3',
- value: 'Document 3',
- vectorEmbedding: embedding3
- });
-
- // Search with a query similar to embedding1
- const queryEmbedding = embedding1.map(v => v + Math.random() * 0.1);
-
- const results = await indexer.vectorSearch({
- vectorSearch: {
- embedding: queryEmbedding,
- topK: 2
- }
- });
-
- expect(results).toHaveLength(2);
- // First result should be most similar (doc1)
- expect(results[0].key).toBe('doc1');
- });
-
- it('should apply threshold filtering', async () => {
- const embedding1 = new Array(128).fill(1);
- const embedding2 = new Array(128).fill(-1);
-
- await backend.store({
- id: 'similar',
- category: 'test',
- key: 'similar',
- value: 'Similar',
- vectorEmbedding: embedding1
- });
-
- await backend.store({
- id: 'different',
- category: 'test',
- key: 'different',
- value: 'Different',
- vectorEmbedding: embedding2
- });
-
- await indexer.index({
- id: 'similar',
- category: 'test',
- key: 'similar',
- value: 'Similar',
- vectorEmbedding: embedding1
- });
-
- await indexer.index({
- id: 'different',
- category: 'test',
- key: 'different',
- value: 'Different',
- vectorEmbedding: embedding2
- });
-
- const results = await indexer.vectorSearch({
- vectorSearch: {
- embedding: embedding1,
- threshold: 0.9
- }
- });
-
- expect(results).toHaveLength(1);
- expect(results[0].key).toBe('similar');
- });
- });
-
- describe('Statistics', () => {
- it('should provide index statistics', async () => {
- await indexer.index({
- id: 'test1',
- category: 'cat1',
- key: 'key1',
- value: 'value1',
- metadata: { tags: ['tag1'], namespace: 'ns1' }
- });
-
- await indexer.index({
- id: 'test2',
- category: 'cat2',
- key: 'key2',
- value: 'value2',
- metadata: { tags: ['tag2'], namespace: 'ns2' },
- vectorEmbedding: new Array(128).fill(0)
- });
-
- const stats = indexer.getStats();
-
- expect(stats.categories).toBe(2);
- expect(stats.tags).toBe(2);
- expect(stats.namespaces).toBe(2);
- expect(stats.vectors).toBe(1);
- });
- });
-
- describe('Text Embedding Generation', () => {
- it('should generate text embeddings', async () => {
- const text = 'This is a test document for embedding generation';
- const embedding = await indexer.generateEmbedding(text);
-
- expect(embedding).toHaveLength(128);
- expect(embedding.every(v => v >= 0 && v <= 1)).toBe(true);
-
- // Different texts should produce different embeddings
- const embedding2 = await indexer.generateEmbedding('Different text');
- expect(embedding).not.toEqual(embedding2);
- });
- });
-
- describe('Event Emissions', () => {
- it('should emit events on operations', async () => {
- const indexedHandler = vi.fn();
- const removedHandler = vi.fn();
-
- indexer.on('indexed', indexedHandler);
- indexer.on('removed', removedHandler);
-
- const item: MemoryItem = {
- id: 'event-test',
- category: 'events',
- key: 'event1',
- value: 'test'
- };
-
- await indexer.index(item);
- expect(indexedHandler).toHaveBeenCalledWith(item);
-
- await indexer.remove('events', 'event1');
- expect(removedHandler).toHaveBeenCalledWith({
- category: 'events',
- key: 'event1'
- });
- });
- });
-});
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/tests/memory-cache.test.ts b/archive/legacy-memory-system/src/tests/memory-cache.test.ts
deleted file mode 100644
index c730637a3e..0000000000
--- a/archive/legacy-memory-system/src/tests/memory-cache.test.ts
+++ /dev/null
@@ -1,320 +0,0 @@
-/**
- * SPARC Memory Bank - Cache Tests
- */
-
-import { describe, it, expect, beforeEach, vi } from 'vitest';
-import { MemoryCache } from '../cache/memory-cache';
-import { MemoryItem } from '../types';
-
-describe('MemoryCache', () => {
- let cache: MemoryCache;
-
- const createTestItem = (key: string, size?: number): MemoryItem => ({
- id: key,
- category: 'test',
- key,
- value: size ? 'x'.repeat(size) : `value-${key}`,
- metadata: { timestamp: Date.now() }
- });
-
- describe('LRU Cache', () => {
- beforeEach(() => {
- cache = new MemoryCache({
- maxSize: 100,
- ttl: 60000,
- strategy: 'lru'
- });
- });
-
- it('should evict least recently used items', () => {
- // Fill cache
- cache.set('item1', createTestItem('item1', 30));
- cache.set('item2', createTestItem('item2', 30));
- cache.set('item3', createTestItem('item3', 30));
-
- // Access item1 and item2
- cache.get('item1');
- cache.get('item2');
-
- // Add item that exceeds capacity - should evict item3
- cache.set('item4', createTestItem('item4', 30));
-
- expect(cache.get('item1')).toBeDefined();
- expect(cache.get('item2')).toBeDefined();
- expect(cache.get('item3')).toBeNull();
- expect(cache.get('item4')).toBeDefined();
- });
-
- it('should update access order on get', () => {
- cache.set('item1', createTestItem('item1', 30));
- cache.set('item2', createTestItem('item2', 30));
- cache.set('item3', createTestItem('item3', 30));
-
- // Access item1 multiple times
- cache.get('item1');
- cache.get('item1');
-
- // Add item that triggers eviction
- cache.set('item4', createTestItem('item4', 30));
-
- // item2 or item3 should be evicted, not item1
- expect(cache.get('item1')).toBeDefined();
- });
- });
-
- describe('LFU Cache', () => {
- beforeEach(() => {
- cache = new MemoryCache({
- maxSize: 100,
- ttl: 60000,
- strategy: 'lfu'
- });
- });
-
- it('should evict least frequently used items', () => {
- cache.set('item1', createTestItem('item1', 30));
- cache.set('item2', createTestItem('item2', 30));
- cache.set('item3', createTestItem('item3', 30));
-
- // Access item1 and item2 multiple times
- cache.get('item1');
- cache.get('item1');
- cache.get('item2');
-
- // item3 has lowest frequency (1)
- cache.set('item4', createTestItem('item4', 30));
-
- expect(cache.get('item1')).toBeDefined();
- expect(cache.get('item2')).toBeDefined();
- expect(cache.get('item3')).toBeNull();
- expect(cache.get('item4')).toBeDefined();
- });
-
- it('should use age as tiebreaker for same frequency', () => {
- cache.set('item1', createTestItem('item1', 30));
-
- // Wait a bit
- vi.advanceTimersByTime(10);
-
- cache.set('item2', createTestItem('item2', 30));
- cache.set('item3', createTestItem('item3', 30));
-
- // All have same frequency (1)
- // item1 is oldest, should be evicted first
- cache.set('item4', createTestItem('item4', 30));
-
- expect(cache.get('item1')).toBeNull();
- expect(cache.get('item2')).toBeDefined();
- expect(cache.get('item3')).toBeDefined();
- expect(cache.get('item4')).toBeDefined();
- });
- });
-
- describe('FIFO Cache', () => {
- beforeEach(() => {
- cache = new MemoryCache({
- maxSize: 100,
- ttl: 60000,
- strategy: 'fifo'
- });
- });
-
- it('should evict first in, first out', () => {
- cache.set('item1', createTestItem('item1', 30));
- cache.set('item2', createTestItem('item2', 30));
- cache.set('item3', createTestItem('item3', 30));
-
- // Access doesn't matter for FIFO
- cache.get('item1');
- cache.get('item1');
- cache.get('item1');
-
- // Should still evict item1 (first in)
- cache.set('item4', createTestItem('item4', 30));
-
- expect(cache.get('item1')).toBeNull();
- expect(cache.get('item2')).toBeDefined();
- expect(cache.get('item3')).toBeDefined();
- expect(cache.get('item4')).toBeDefined();
- });
- });
-
- describe('TTL Expiration', () => {
- beforeEach(() => {
- vi.useFakeTimers();
- cache = new MemoryCache({
- maxSize: 1000,
- ttl: 1000, // 1 second
- strategy: 'lru'
- });
- });
-
- it('should expire items after TTL', () => {
- cache.set('item1', createTestItem('item1'));
-
- expect(cache.get('item1')).toBeDefined();
-
- // Advance time past TTL
- vi.advanceTimersByTime(1500);
-
- expect(cache.get('item1')).toBeNull();
- });
-
- it('should cleanup expired items periodically', () => {
- cache.set('item1', createTestItem('item1'));
- cache.set('item2', createTestItem('item2'));
-
- expect(cache.size()).toBe(2);
-
- // Advance time to trigger cleanup
- vi.advanceTimersByTime(2000);
-
- // Trigger cleanup by accessing cache
- cache.get('item1');
-
- expect(cache.size()).toBeLessThan(2);
- });
- });
-
- describe('Statistics', () => {
- beforeEach(() => {
- cache = new MemoryCache({
- maxSize: 1000,
- ttl: 60000,
- strategy: 'lru'
- });
- });
-
- it('should track hits and misses', () => {
- cache.set('item1', createTestItem('item1'));
-
- // Hit
- cache.get('item1');
-
- // Misses
- cache.get('item2');
- cache.get('item3');
-
- const stats = cache.getStats();
- expect(stats.hits).toBe(1);
- expect(stats.misses).toBe(2);
- expect(stats.hitRate).toBeCloseTo(0.333, 2);
- });
-
- it('should track evictions', () => {
- const smallCache = new MemoryCache({
- maxSize: 50,
- ttl: 60000,
- strategy: 'lru'
- });
-
- smallCache.set('item1', createTestItem('item1', 30));
- smallCache.set('item2', createTestItem('item2', 30)); // Should evict item1
-
- const stats = smallCache.getStats();
- expect(stats.evictions).toBe(1);
- });
- });
-
- describe('Eviction Callback', () => {
- it('should call onEvict callback', () => {
- const onEvict = vi.fn();
-
- cache = new MemoryCache({
- maxSize: 50,
- ttl: 60000,
- strategy: 'lru',
- onEvict
- });
-
- const item1 = createTestItem('item1', 30);
- cache.set('item1', item1);
- cache.set('item2', createTestItem('item2', 30)); // Should evict item1
-
- expect(onEvict).toHaveBeenCalledWith('item1', item1);
- });
- });
-
- describe('Cache Operations', () => {
- beforeEach(() => {
- cache = new MemoryCache({
- maxSize: 1000,
- ttl: 60000,
- strategy: 'lru'
- });
- });
-
- it('should delete items', () => {
- cache.set('item1', createTestItem('item1'));
- expect(cache.get('item1')).toBeDefined();
-
- const deleted = cache.delete('item1');
- expect(deleted).toBe(true);
- expect(cache.get('item1')).toBeNull();
-
- const deletedAgain = cache.delete('item1');
- expect(deletedAgain).toBe(false);
- });
-
- it('should clear all items', () => {
- cache.set('item1', createTestItem('item1'));
- cache.set('item2', createTestItem('item2'));
- cache.set('item3', createTestItem('item3'));
-
- expect(cache.size()).toBe(3);
-
- cache.clear();
-
- expect(cache.size()).toBe(0);
- expect(cache.get('item1')).toBeNull();
- });
-
- it('should return all keys', () => {
- cache.set('item1', createTestItem('item1'));
- cache.set('item2', createTestItem('item2'));
- cache.set('item3', createTestItem('item3'));
-
- const keys = cache.keys();
- expect(keys).toHaveLength(3);
- expect(keys).toContain('item1');
- expect(keys).toContain('item2');
- expect(keys).toContain('item3');
- });
- });
-
- describe('Warmup and Snapshot', () => {
- beforeEach(() => {
- cache = new MemoryCache({
- maxSize: 1000,
- ttl: 60000,
- strategy: 'lru'
- });
- });
-
- it('should warmup cache with preloaded data', async () => {
- const items = [
- { key: 'item1', value: createTestItem('item1') },
- { key: 'item2', value: createTestItem('item2') },
- { key: 'item3', value: createTestItem('item3') }
- ];
-
- await cache.warmup(items);
-
- expect(cache.size()).toBe(3);
- expect(cache.get('item1')).toBeDefined();
- expect(cache.get('item2')).toBeDefined();
- expect(cache.get('item3')).toBeDefined();
- });
-
- it('should create snapshot of cache', () => {
- cache.set('item1', createTestItem('item1'));
- cache.set('item2', createTestItem('item2'));
-
- const snapshot = cache.snapshot();
-
- expect(snapshot).toHaveLength(2);
- expect(snapshot.find(s => s.key === 'item1')).toBeDefined();
- expect(snapshot.find(s => s.key === 'item2')).toBeDefined();
- });
- });
-});
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/tests/memory-manager.test.ts b/archive/legacy-memory-system/src/tests/memory-manager.test.ts
deleted file mode 100644
index c78b7d7100..0000000000
--- a/archive/legacy-memory-system/src/tests/memory-manager.test.ts
+++ /dev/null
@@ -1,349 +0,0 @@
-/**
- * SPARC Memory Bank - Memory Manager Tests
- */
-
-import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
-import { MemoryManager } from '../core/memory-manager';
-import { MemoryItem } from '../types';
-import * as fs from 'fs/promises';
-import * as path from 'path';
-
-describe('MemoryManager', () => {
- let memoryManager: MemoryManager;
- const testDir = '/tmp/memory-test';
-
- beforeEach(async () => {
- // Create test directory
- await fs.mkdir(testDir, { recursive: true });
-
- memoryManager = new MemoryManager({
- backend: 'sqlite',
- backendConfig: {
- path: path.join(testDir, 'test.db')
- },
- cacheConfig: {
- maxSize: 100,
- ttl: 60000,
- strategy: 'lru'
- },
- enableIndexing: true,
- enableNamespaces: true
- });
-
- await memoryManager.initialize();
- });
-
- afterEach(async () => {
- await memoryManager.close();
- await fs.rm(testDir, { recursive: true, force: true });
- });
-
- describe('Store and Retrieve', () => {
- it('should store and retrieve a memory item', async () => {
- const item = {
- category: 'test',
- key: 'test-key',
- value: { data: 'test value' }
- };
-
- const stored = await memoryManager.store(item);
- expect(stored.id).toBeDefined();
- expect(stored.category).toBe('test');
- expect(stored.key).toBe('test-key');
- expect(stored.value).toEqual({ data: 'test value' });
-
- const retrieved = await memoryManager.get('test', 'test-key');
- expect(retrieved).toBeDefined();
- expect(retrieved?.value).toEqual({ data: 'test value' });
- });
-
- it('should handle namespaces', async () => {
- const item = {
- category: 'test',
- key: 'namespace-test',
- value: 'test data'
- };
-
- await memoryManager.store(item, 'namespace1');
- await memoryManager.store(item, 'namespace2');
-
- const item1 = await memoryManager.get('test', 'namespace-test', 'namespace1');
- const item2 = await memoryManager.get('test', 'namespace-test', 'namespace2');
-
- expect(item1).toBeDefined();
- expect(item2).toBeDefined();
- expect(item1?.id).not.toBe(item2?.id);
- });
-
- it('should handle TTL expiration', async () => {
- const item = {
- category: 'test',
- key: 'ttl-test',
- value: 'expires soon',
- ttl: 100 // 100ms
- };
-
- await memoryManager.store(item);
-
- // Should exist immediately
- const retrieved1 = await memoryManager.get('test', 'ttl-test');
- expect(retrieved1).toBeDefined();
-
- // Wait for expiration
- await new Promise(resolve => setTimeout(resolve, 150));
-
- // Should be expired
- const retrieved2 = await memoryManager.get('test', 'ttl-test');
- expect(retrieved2).toBeDefined(); // Backend doesn't enforce TTL, only cache does
- });
- });
-
- describe('Query', () => {
- beforeEach(async () => {
- // Store test data
- await memoryManager.store({
- category: 'users',
- key: 'user1',
- value: { name: 'Alice', age: 30 },
- metadata: { tags: ['active', 'premium'] }
- });
-
- await memoryManager.store({
- category: 'users',
- key: 'user2',
- value: { name: 'Bob', age: 25 },
- metadata: { tags: ['active'] }
- });
-
- await memoryManager.store({
- category: 'posts',
- key: 'post1',
- value: { title: 'Hello World' },
- metadata: { tags: ['featured'] }
- });
- });
-
- it('should query by category', async () => {
- const results = await memoryManager.query({
- categories: ['users']
- });
-
- expect(results).toHaveLength(2);
- expect(results.every(item => item.category === 'users')).toBe(true);
- });
-
- it('should query by tags', async () => {
- const results = await memoryManager.query({
- tags: ['active']
- });
-
- expect(results).toHaveLength(2);
- expect(results.every(item => item.metadata?.tags?.includes('active'))).toBe(true);
- });
-
- it('should query with custom filter', async () => {
- const results = await memoryManager.query({
- filter: (item) => {
- if (item.category === 'users' && typeof item.value === 'object') {
- return (item.value as any).age > 25;
- }
- return false;
- }
- });
-
- expect(results).toHaveLength(1);
- expect((results[0].value as any).name).toBe('Alice');
- });
-
- it('should support time-travel queries', async () => {
- const beforeTime = Date.now();
-
- await new Promise(resolve => setTimeout(resolve, 10));
-
- await memoryManager.store({
- category: 'events',
- key: 'event1',
- value: 'after time point'
- });
-
- const results = await memoryManager.query({
- asOf: beforeTime
- });
-
- expect(results.every(item =>
- item.metadata?.timestamp ? item.metadata.timestamp <= beforeTime : true
- )).toBe(true);
- });
- });
-
- describe('CRDT Conflict Resolution', () => {
- it('should resolve conflicts with last-write-wins', async () => {
- const item1 = {
- id: 'conflict-test',
- category: 'test',
- key: 'conflict',
- value: 'value1',
- metadata: { timestamp: 1000 }
- };
-
- const item2 = {
- id: 'conflict-test',
- category: 'test',
- key: 'conflict',
- value: 'value2',
- metadata: { timestamp: 2000 }
- };
-
- await memoryManager.store(item1);
- const result = await memoryManager.store(item2);
-
- expect(result.value).toBe('value2');
- });
-
- it('should merge concurrent updates', async () => {
- const item1 = {
- category: 'test',
- key: 'merge-test',
- value: { a: 1, b: 2 }
- };
-
- await memoryManager.store(item1);
-
- // Simulate concurrent update
- const item2 = {
- category: 'test',
- key: 'merge-test',
- value: { b: 3, c: 4 }
- };
-
- const result = await memoryManager.store(item2);
-
- expect(result.value).toMatchObject({
- a: 1,
- b: 3,
- c: 4
- });
- });
- });
-
- describe('Import/Export', () => {
- it('should export and import JSON snapshot', async () => {
- // Store test data
- await memoryManager.store({
- category: 'export-test',
- key: 'item1',
- value: 'test data 1'
- });
-
- await memoryManager.store({
- category: 'export-test',
- key: 'item2',
- value: 'test data 2'
- });
-
- // Export
- const snapshot = await memoryManager.export({
- categories: ['export-test'],
- format: 'json'
- });
-
- // Clear data
- await memoryManager.delete('export-test', 'item1');
- await memoryManager.delete('export-test', 'item2');
-
- // Import
- const imported = await memoryManager.import(snapshot);
- expect(imported).toBe(2);
-
- // Verify imported data
- const item1 = await memoryManager.get('export-test', 'item1');
- const item2 = await memoryManager.get('export-test', 'item2');
-
- expect(item1?.value).toBe('test data 1');
- expect(item2?.value).toBe('test data 2');
- });
-
- it('should export to markdown format', async () => {
- await memoryManager.store({
- category: 'markdown-test',
- key: 'item1',
- value: { data: 'test' }
- });
-
- const markdown = await memoryManager.export({
- categories: ['markdown-test'],
- format: 'markdown'
- });
-
- expect(markdown).toContain('# Memory Bank Export');
- expect(markdown).toContain('## markdown-test');
- expect(markdown).toContain('### item1');
- expect(markdown).toContain('"data": "test"');
- });
- });
-
- describe('Cache Behavior', () => {
- it('should use cache for repeated reads', async () => {
- const item = {
- category: 'cache-test',
- key: 'cached-item',
- value: 'cached value'
- };
-
- await memoryManager.store(item);
-
- // First read - cache miss
- const read1 = await memoryManager.get('cache-test', 'cached-item');
- expect(read1).toBeDefined();
-
- // Second read - should be cache hit
- const hitHandler = vi.fn();
- memoryManager.on('cache-hit', hitHandler);
-
- const read2 = await memoryManager.get('cache-test', 'cached-item');
- expect(read2).toBeDefined();
- expect(hitHandler).toHaveBeenCalled();
- });
- });
-
- describe('Delete Operations', () => {
- it('should delete items', async () => {
- await memoryManager.store({
- category: 'delete-test',
- key: 'to-delete',
- value: 'delete me'
- });
-
- const exists = await memoryManager.get('delete-test', 'to-delete');
- expect(exists).toBeDefined();
-
- const deleted = await memoryManager.delete('delete-test', 'to-delete');
- expect(deleted).toBe(true);
-
- const notExists = await memoryManager.get('delete-test', 'to-delete');
- expect(notExists).toBeNull();
- });
- });
-
- describe('Statistics', () => {
- it('should provide accurate statistics', async () => {
- await memoryManager.store({
- category: 'stats-test',
- key: 'item1',
- value: 'test'
- });
-
- await memoryManager.store({
- category: 'stats-test',
- key: 'item2',
- value: 'test'
- });
-
- const stats = await memoryManager.getStats();
-
- expect(stats.backend.totalItems).toBeGreaterThanOrEqual(2);
- expect(stats.cache.itemCount).toBeGreaterThanOrEqual(0);
- expect(stats.nodeId).toBeDefined();
- });
- });
-});
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/tests/namespace-manager.test.ts b/archive/legacy-memory-system/src/tests/namespace-manager.test.ts
deleted file mode 100644
index d3c9afd4d5..0000000000
--- a/archive/legacy-memory-system/src/tests/namespace-manager.test.ts
+++ /dev/null
@@ -1,468 +0,0 @@
-/**
- * SPARC Memory Bank - Namespace Manager Tests
- */
-
-import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
-import { NamespaceManager } from '../namespaces/namespace-manager';
-import { SqliteBackend } from '../backends/sqlite-backend';
-import { MemoryNamespace } from '../types';
-import * as fs from 'fs/promises';
-import * as path from 'path';
-
-describe('NamespaceManager', () => {
- let namespaceManager: NamespaceManager;
- let backend: SqliteBackend;
- const testDir = '/tmp/namespace-test';
-
- beforeEach(async () => {
- await fs.mkdir(testDir, { recursive: true });
-
- backend = new SqliteBackend({
- path: path.join(testDir, 'test.db')
- });
- await backend.initialize();
-
- namespaceManager = new NamespaceManager({ backend });
- await namespaceManager.initialize();
- });
-
- afterEach(async () => {
- await backend.close();
- await fs.rm(testDir, { recursive: true, force: true });
- });
-
- describe('Namespace CRUD Operations', () => {
- it('should create default namespace on initialization', () => {
- const defaultNs = namespaceManager.getNamespace('default');
- expect(defaultNs).toBeDefined();
- expect(defaultNs?.name).toBe('Default Namespace');
- expect(defaultNs?.permissions?.read).toContain('*');
- });
-
- it('should create new namespace', async () => {
- const namespace = await namespaceManager.createNamespace({
- name: 'Test Namespace',
- description: 'A test namespace',
- permissions: {
- read: ['user1', 'user2'],
- write: ['user1'],
- delete: ['user1'],
- admin: ['admin']
- }
- });
-
- expect(namespace.id).toBeDefined();
- expect(namespace.name).toBe('Test Namespace');
- expect(namespace.permissions?.read).toContain('user1');
- expect(namespace.permissions?.read).toContain('user2');
- });
-
- it('should prevent duplicate namespace IDs', async () => {
- await namespaceManager.createNamespace({
- id: 'duplicate-test',
- name: 'First Namespace'
- });
-
- await expect(
- namespaceManager.createNamespace({
- id: 'duplicate-test',
- name: 'Second Namespace'
- })
- ).rejects.toThrow('already exists');
- });
-
- it('should list all namespaces', async () => {
- await namespaceManager.createNamespace({ name: 'NS1' });
- await namespaceManager.createNamespace({ name: 'NS2' });
-
- const namespaces = namespaceManager.listNamespaces();
- expect(namespaces.length).toBeGreaterThanOrEqual(3); // default + 2 created
- expect(namespaces.some(ns => ns.name === 'NS1')).toBe(true);
- expect(namespaces.some(ns => ns.name === 'NS2')).toBe(true);
- });
-
- it('should update namespace', async () => {
- const namespace = await namespaceManager.createNamespace({
- name: 'Original Name'
- });
-
- const updated = await namespaceManager.updateNamespace(namespace.id, {
- name: 'Updated Name',
- description: 'Updated description',
- permissions: {
- read: ['new-user'],
- write: [],
- delete: [],
- admin: []
- }
- });
-
- expect(updated.name).toBe('Updated Name');
- expect(updated.description).toBe('Updated description');
- expect(updated.permissions?.read).toContain('new-user');
- expect(updated.id).toBe(namespace.id); // ID should not change
- });
-
- it('should delete namespace and its items', async () => {
- const namespace = await namespaceManager.createNamespace({
- name: 'To Delete'
- });
-
- // Store items in namespace
- await backend.store({
- id: 'item1',
- category: 'test',
- key: 'key1',
- value: 'data',
- metadata: { namespace: namespace.id }
- });
-
- const deleted = await namespaceManager.deleteNamespace(namespace.id);
- expect(deleted).toBe(true);
-
- const retrieved = namespaceManager.getNamespace(namespace.id);
- expect(retrieved).toBeNull();
-
- // Items should be deleted
- const items = await backend.query({ namespace: namespace.id });
- expect(items).toHaveLength(0);
- });
-
- it('should prevent deletion of default namespace', async () => {
- await expect(
- namespaceManager.deleteNamespace('default')
- ).rejects.toThrow('Cannot delete default namespace');
- });
- });
-
- describe('Session Management', () => {
- let testNamespace: MemoryNamespace;
-
- beforeEach(async () => {
- testNamespace = await namespaceManager.createNamespace({
- name: 'Session Test',
- permissions: {
- read: ['user1', 'user2', '*'],
- write: ['user1'],
- delete: ['user1'],
- admin: ['admin']
- }
- });
- });
-
- it('should create session with valid permissions', () => {
- const sessionId = namespaceManager.createSession(
- testNamespace.id,
- 'user1',
- ['read', 'write']
- );
-
- expect(sessionId).toBeDefined();
-
- const session = namespaceManager.getSession(sessionId);
- expect(session).toBeDefined();
- expect(session?.userId).toBe('user1');
- expect(session?.permissions).toContain('read');
- expect(session?.permissions).toContain('write');
- });
-
- it('should validate permissions based on namespace rules', () => {
- const sessionId = namespaceManager.createSession(
- testNamespace.id,
- 'user2',
- ['read', 'write', 'delete']
- );
-
- const session = namespaceManager.getSession(sessionId);
- expect(session?.permissions).toContain('read');
- expect(session?.permissions).not.toContain('write'); // user2 doesn't have write
- expect(session?.permissions).not.toContain('delete'); // user2 doesn't have delete
- });
-
- it('should grant all permissions to admin users', () => {
- const sessionId = namespaceManager.createSession(
- testNamespace.id,
- 'admin',
- ['*']
- );
-
- const session = namespaceManager.getSession(sessionId);
- expect(session?.permissions).toContain('*');
- });
-
- it('should validate session permissions', () => {
- const sessionId = namespaceManager.createSession(
- testNamespace.id,
- 'user1',
- ['read', 'write']
- );
-
- expect(namespaceManager.validateSession(sessionId, 'read')).toBe(true);
- expect(namespaceManager.validateSession(sessionId, 'write')).toBe(true);
- expect(namespaceManager.validateSession(sessionId, 'delete')).toBe(false);
- expect(namespaceManager.validateSession(sessionId, 'admin')).toBe(false);
- });
-
- it('should handle session TTL', () => {
- vi.useFakeTimers();
-
- const sessionId = namespaceManager.createSession(
- testNamespace.id,
- 'user1',
- ['read'],
- 1000 // 1 second TTL
- );
-
- expect(namespaceManager.validateSession(sessionId, 'read')).toBe(true);
-
- // Advance time past TTL
- vi.advanceTimersByTime(1500);
-
- expect(namespaceManager.validateSession(sessionId, 'read')).toBe(false);
- expect(namespaceManager.getSession(sessionId)).toBeNull();
-
- vi.useRealTimers();
- });
-
- it('should revoke sessions', () => {
- const sessionId = namespaceManager.createSession(
- testNamespace.id,
- 'user1',
- ['read']
- );
-
- expect(namespaceManager.getSession(sessionId)).toBeDefined();
-
- const revoked = namespaceManager.revokeSession(sessionId);
- expect(revoked).toBe(true);
-
- expect(namespaceManager.getSession(sessionId)).toBeNull();
- expect(namespaceManager.validateSession(sessionId, 'read')).toBe(false);
- });
-
- it('should track user sessions', () => {
- const session1 = namespaceManager.createSession(
- testNamespace.id,
- 'user1',
- ['read']
- );
-
- const session2 = namespaceManager.createSession(
- testNamespace.id,
- 'user1',
- ['write']
- );
-
- const userSessions = namespaceManager.getUserSessions('user1');
- expect(userSessions).toHaveLength(2);
- expect(userSessions.some(s => s.id === session1)).toBe(true);
- expect(userSessions.some(s => s.id === session2)).toBe(true);
-
- // Revoke one session
- namespaceManager.revokeSession(session1);
-
- const remainingSessions = namespaceManager.getUserSessions('user1');
- expect(remainingSessions).toHaveLength(1);
- expect(remainingSessions[0].id).toBe(session2);
- });
- });
-
- describe('Namespace Operations', () => {
- it('should clone namespace with items', async () => {
- const source = await namespaceManager.createNamespace({
- name: 'Source Namespace',
- permissions: {
- read: ['user1'],
- write: ['user1'],
- delete: [],
- admin: []
- }
- });
-
- // Add items to source namespace
- await backend.store({
- id: 'item1',
- category: 'data',
- key: 'key1',
- value: 'value1',
- metadata: { namespace: source.id }
- });
-
- await backend.store({
- id: 'item2',
- category: 'data',
- key: 'key2',
- value: 'value2',
- metadata: { namespace: source.id }
- });
-
- const target = await namespaceManager.cloneNamespace(
- source.id,
- 'cloned-ns',
- 'Cloned Namespace'
- );
-
- expect(target.name).toBe('Cloned Namespace');
- expect(target.permissions).toEqual(source.permissions);
- expect(target.metadata?.clonedFrom).toBe(source.id);
-
- // Check cloned items
- const clonedItems = await backend.query({ namespace: 'cloned-ns' });
- expect(clonedItems).toHaveLength(2);
- expect(clonedItems.some(i => i.key === 'key1')).toBe(true);
- expect(clonedItems.some(i => i.key === 'key2')).toBe(true);
- });
-
- it('should merge namespaces with skip conflict resolution', async () => {
- const target = await namespaceManager.createNamespace({
- name: 'Target Namespace'
- });
-
- const source1 = await namespaceManager.createNamespace({
- name: 'Source 1'
- });
-
- const source2 = await namespaceManager.createNamespace({
- name: 'Source 2'
- });
-
- // Add items to namespaces
- await backend.store({
- id: 'target-item',
- category: 'data',
- key: 'shared-key',
- value: 'target value',
- metadata: { namespace: target.id }
- });
-
- await backend.store({
- id: 'source1-item1',
- category: 'data',
- key: 'key1',
- value: 'source1 value1',
- metadata: { namespace: source1.id }
- });
-
- await backend.store({
- id: 'source1-item2',
- category: 'data',
- key: 'shared-key',
- value: 'source1 shared',
- metadata: { namespace: source1.id }
- });
-
- await backend.store({
- id: 'source2-item',
- category: 'data',
- key: 'key2',
- value: 'source2 value',
- metadata: { namespace: source2.id }
- });
-
- const mergedCount = await namespaceManager.mergeNamespaces(
- [source1.id, source2.id],
- target.id,
- 'skip'
- );
-
- expect(mergedCount).toBe(2); // key1 and key2, shared-key skipped
-
- const targetItems = await backend.query({ namespace: target.id });
- expect(targetItems).toHaveLength(3);
- expect(targetItems.find(i => i.key === 'shared-key')?.value).toBe('target value');
- });
-
- it('should merge namespaces with rename conflict resolution', async () => {
- const target = await namespaceManager.createNamespace({
- name: 'Target Namespace'
- });
-
- const source = await namespaceManager.createNamespace({
- name: 'Source'
- });
-
- await backend.store({
- id: 'target-item',
- category: 'data',
- key: 'conflict',
- value: 'target value',
- metadata: { namespace: target.id }
- });
-
- await backend.store({
- id: 'source-item',
- category: 'data',
- key: 'conflict',
- value: 'source value',
- metadata: { namespace: source.id }
- });
-
- const mergedCount = await namespaceManager.mergeNamespaces(
- [source.id],
- target.id,
- 'rename'
- );
-
- expect(mergedCount).toBe(1);
-
- const targetItems = await backend.query({ namespace: target.id });
- expect(targetItems).toHaveLength(2);
- expect(targetItems.find(i => i.key === 'conflict')?.value).toBe('target value');
- expect(targetItems.find(i => i.key === `conflict_${source.id}`)?.value).toBe('source value');
- });
- });
-
- describe('Statistics', () => {
- it('should provide namespace statistics', async () => {
- await namespaceManager.createNamespace({ name: 'NS1' });
- await namespaceManager.createNamespace({ name: 'NS2' });
-
- const stats = namespaceManager.getStats();
- expect(stats.totalNamespaces).toBeGreaterThanOrEqual(3); // default + 2
- expect(stats.activeSessions).toBe(0);
- });
- });
-
- describe('Event Emissions', () => {
- it('should emit events for namespace operations', async () => {
- const createdHandler = vi.fn();
- const updatedHandler = vi.fn();
- const deletedHandler = vi.fn();
-
- namespaceManager.on('namespace-created', createdHandler);
- namespaceManager.on('namespace-updated', updatedHandler);
- namespaceManager.on('namespace-deleted', deletedHandler);
-
- const namespace = await namespaceManager.createNamespace({
- name: 'Event Test'
- });
- expect(createdHandler).toHaveBeenCalledWith(
- expect.objectContaining({ name: 'Event Test' })
- );
-
- await namespaceManager.updateNamespace(namespace.id, {
- name: 'Updated Event Test'
- });
- expect(updatedHandler).toHaveBeenCalledWith(
- expect.objectContaining({ name: 'Updated Event Test' })
- );
-
- await namespaceManager.deleteNamespace(namespace.id);
- expect(deletedHandler).toHaveBeenCalledWith({ id: namespace.id });
- });
-
- it('should emit session events', () => {
- const sessionCreatedHandler = vi.fn();
- const sessionRevokedHandler = vi.fn();
-
- namespaceManager.on('session-created', sessionCreatedHandler);
- namespaceManager.on('session-revoked', sessionRevokedHandler);
-
- const sessionId = namespaceManager.createSession('default', 'user1');
- expect(sessionCreatedHandler).toHaveBeenCalled();
-
- namespaceManager.revokeSession(sessionId);
- expect(sessionRevokedHandler).toHaveBeenCalledWith({ sessionId });
- });
- });
-});
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/tests/replication.test.ts b/archive/legacy-memory-system/src/tests/replication.test.ts
deleted file mode 100644
index f079ea4905..0000000000
--- a/archive/legacy-memory-system/src/tests/replication.test.ts
+++ /dev/null
@@ -1,389 +0,0 @@
-/**
- * SPARC Memory Bank - Replication Tests
- */
-
-import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
-import { ReplicationManager } from '../replication/replication-manager';
-import { SqliteBackend } from '../backends/sqlite-backend';
-import { MemoryItem, ReplicationConfig } from '../types';
-import * as fs from 'fs/promises';
-import * as path from 'path';
-import axios from 'axios';
-
-// Mock axios
-vi.mock('axios');
-const mockedAxios = axios as jest.Mocked<typeof axios>;
-
-describe('ReplicationManager', () => {
- let replicationManager: ReplicationManager;
- let backend: SqliteBackend;
- const testDir = '/tmp/replication-test';
-
- const mockConfig: ReplicationConfig = {
- mode: 'peer-to-peer',
- nodes: [
- { id: 'node1', url: 'http://node1:3000', role: 'peer' },
- { id: 'node2', url: 'http://node2:3000', role: 'peer' }
- ],
- syncInterval: 1000,
- conflictResolution: 'last-write-wins',
- retryAttempts: 3,
- retryDelay: 100
- };
-
- beforeEach(async () => {
- await fs.mkdir(testDir, { recursive: true });
-
- backend = new SqliteBackend({
- path: path.join(testDir, 'test.db')
- });
- await backend.initialize();
-
- // Mock axios.create
- mockedAxios.create.mockReturnValue({
- get: vi.fn(),
- post: vi.fn(),
- interceptors: {
- response: {
- use: vi.fn()
- }
- }
- } as any);
-
- replicationManager = new ReplicationManager({
- localNodeId: 'local-node',
- backend,
- config: mockConfig
- });
- });
-
- afterEach(async () => {
- await replicationManager.close();
- await backend.close();
- await fs.rm(testDir, { recursive: true, force: true });
- vi.clearAllMocks();
- });
-
- describe('Initialization', () => {
- it('should initialize replication manager', async () => {
- const initHandler = vi.fn();
- replicationManager.on('initialized', initHandler);
-
- await replicationManager.initialize();
-
- expect(initHandler).toHaveBeenCalled();
- });
-
- it('should create HTTP clients for each node', async () => {
- await replicationManager.initialize();
-
- expect(mockedAxios.create).toHaveBeenCalledTimes(2);
- expect(mockedAxios.create).toHaveBeenCalledWith(
- expect.objectContaining({
- baseURL: 'http://node1:3000'
- })
- );
- expect(mockedAxios.create).toHaveBeenCalledWith(
- expect.objectContaining({
- baseURL: 'http://node2:3000'
- })
- );
- });
- });
-
- describe('Replication', () => {
- let mockClient: any;
-
- beforeEach(async () => {
- mockClient = {
- get: vi.fn(),
- post: vi.fn().mockResolvedValue({ status: 200 }),
- interceptors: {
- response: {
- use: vi.fn()
- }
- }
- };
-
- mockedAxios.create.mockReturnValue(mockClient);
- await replicationManager.initialize();
- });
-
- it('should replicate item to other nodes', async () => {
- const item: MemoryItem = {
- id: 'test-item',
- category: 'test',
- key: 'key1',
- value: 'test data'
- };
-
- await replicationManager.replicate(item);
-
- // With sync interval, should be queued
- expect(mockClient.post).not.toHaveBeenCalled();
-
- // Process queue manually
- vi.advanceTimersByTime(1000);
- await new Promise(resolve => setTimeout(resolve, 100));
-
- // Should have sent batch message
- expect(mockClient.post).toHaveBeenCalledWith(
- '/memory/replicate',
- expect.objectContaining({
- type: 'batch',
- sourceNodeId: 'local-node'
- })
- );
- });
-
- it('should replicate deletion', async () => {
- await replicationManager.replicateDeletion('test', 'key1');
-
- vi.advanceTimersByTime(1000);
- await new Promise(resolve => setTimeout(resolve, 100));
-
- expect(mockClient.post).toHaveBeenCalledWith(
- '/memory/replicate',
- expect.objectContaining({
- type: 'batch',
- data: expect.arrayContaining([
- expect.objectContaining({
- type: 'delete',
- data: { category: 'test', key: 'key1' }
- })
- ])
- })
- );
- });
-
- it('should emit events on successful replication', async () => {
- const replicatedHandler = vi.fn();
- replicationManager.on('replicated', replicatedHandler);
-
- const noSyncConfig = { ...mockConfig, syncInterval: undefined };
- const manager = new ReplicationManager({
- localNodeId: 'local-node',
- backend,
- config: noSyncConfig
- });
- await manager.initialize();
-
- const item: MemoryItem = {
- id: 'test-item',
- category: 'test',
- key: 'key1',
- value: 'test data'
- };
-
- await manager.replicate(item);
-
- expect(replicatedHandler).toHaveBeenCalledTimes(2); // For each node
- });
-
- it('should handle replication failures', async () => {
- const failHandler = vi.fn();
- replicationManager.on('replication-failed', failHandler);
-
- mockClient.post.mockRejectedValueOnce(new Error('Network error'));
-
- const noSyncConfig = { ...mockConfig, syncInterval: undefined };
- const manager = new ReplicationManager({
- localNodeId: 'local-node',
- backend,
- config: noSyncConfig
- });
- await manager.initialize();
-
- const item: MemoryItem = {
- id: 'test-item',
- category: 'test',
- key: 'key1',
- value: 'test data'
- };
-
- await manager.replicate(item);
-
- expect(failHandler).toHaveBeenCalled();
- });
- });
-
- describe('Master-Slave Mode', () => {
- let masterSlaveManager: ReplicationManager;
-
- beforeEach(async () => {
- const masterSlaveConfig: ReplicationConfig = {
- mode: 'master-slave',
- nodes: [
- { id: 'master', url: 'http://master:3000', role: 'master' },
- { id: 'slave1', url: 'http://slave1:3000', role: 'slave' },
- { id: 'slave2', url: 'http://slave2:3000', role: 'slave' }
- ]
- };
-
- masterSlaveManager = new ReplicationManager({
- localNodeId: 'master',
- backend,
- config: masterSlaveConfig
- });
-
- await masterSlaveManager.initialize();
- });
-
- it('should replicate from master to slaves', async () => {
- const mockClient = {
- post: vi.fn().mockResolvedValue({ status: 200 }),
- get: vi.fn(),
- interceptors: { response: { use: vi.fn() } }
- };
-
- mockedAxios.create.mockReturnValue(mockClient);
-
- const item: MemoryItem = {
- id: 'master-item',
- category: 'test',
- key: 'key1',
- value: 'master data'
- };
-
- await masterSlaveManager.replicate(item);
-
- // Master should replicate to both slaves
- expect(mockClient.post).toHaveBeenCalledTimes(2);
- });
- });
-
- describe('Node Synchronization', () => {
- let mockClient: any;
-
- beforeEach(async () => {
- mockClient = {
- get: vi.fn(),
- post: vi.fn().mockResolvedValue({ status: 200 }),
- interceptors: { response: { use: vi.fn() } }
- };
-
- mockedAxios.create.mockReturnValue(mockClient);
- await replicationManager.initialize();
- });
-
- it('should sync with specific node', async () => {
- const remoteState = {
- items: [
- {
- id: 'remote1',
- category: 'test',
- key: 'remote-key1',
- value: 'remote data',
- metadata: { timestamp: Date.now() }
- }
- ]
- };
-
- mockClient.get.mockResolvedValueOnce({ data: remoteState });
-
- const syncCompleteHandler = vi.fn();
- replicationManager.on('sync-complete', syncCompleteHandler);
-
- await replicationManager.syncWithNode('node1');
-
- expect(mockClient.get).toHaveBeenCalledWith('/memory/sync-state');
- expect(syncCompleteHandler).toHaveBeenCalledWith({ nodeId: 'node1' });
- });
-
- it('should handle sync failures', async () => {
- mockClient.get.mockRejectedValueOnce(new Error('Connection refused'));
-
- const syncFailedHandler = vi.fn();
- replicationManager.on('sync-failed', syncFailedHandler);
-
- await expect(
- replicationManager.syncWithNode('node1')
- ).rejects.toThrow('Connection refused');
-
- expect(syncFailedHandler).toHaveBeenCalledWith({
- nodeId: 'node1',
- error: 'Connection refused'
- });
- });
- });
-
- describe('Health Checks', () => {
- let mockClient: any;
-
- beforeEach(async () => {
- vi.useFakeTimers();
-
- mockClient = {
- get: vi.fn(),
- post: vi.fn(),
- interceptors: { response: { use: vi.fn() } }
- };
-
- mockedAxios.create.mockReturnValue(mockClient);
- await replicationManager.initialize();
- });
-
- afterEach(() => {
- vi.useRealTimers();
- });
-
- it('should perform periodic health checks', async () => {
- mockClient.get.mockResolvedValue({ status: 200 });
-
- // Fast forward to trigger health check
- vi.advanceTimersByTime(30000);
- await vi.runAllTimersAsync();
-
- expect(mockClient.get).toHaveBeenCalledWith('/memory/health', {
- timeout: 5000
- });
- });
-
- it('should track node status', async () => {
- mockClient.get.mockResolvedValueOnce({ status: 200 });
- mockClient.get.mockRejectedValueOnce(new Error('Timeout'));
-
- vi.advanceTimersByTime(30000);
- await vi.runAllTimersAsync();
-
- const stats = await replicationManager.getStats();
-
- // One node should be online, one offline
- const nodeStatuses = Array.from(stats.nodesStatus.values());
- expect(nodeStatuses.some(s => s.status === 'online')).toBe(true);
- expect(nodeStatuses.some(s => s.status === 'offline')).toBe(true);
- });
- });
-
- describe('Statistics', () => {
- it('should track replication statistics', async () => {
- const stats = await replicationManager.getStats();
-
- expect(stats).toHaveProperty('totalReplicated');
- expect(stats).toHaveProperty('failedReplications');
- expect(stats).toHaveProperty('lastSyncTime');
- expect(stats).toHaveProperty('queueSize');
- expect(stats.nodesStatus).toBeDefined();
- });
- });
-
- describe('Conflict Resolution', () => {
- it('should use last-write-wins strategy', async () => {
- // This is tested through the reconciliation logic
- // The ReplicationManager delegates to the configured strategy
- const config: ReplicationConfig = {
- ...mockConfig,
- conflictResolution: 'last-write-wins'
- };
-
- const manager = new ReplicationManager({
- localNodeId: 'local',
- backend,
- config
- });
-
- // The actual conflict resolution happens in reconcileWithRemote
- expect(manager).toBeDefined();
- });
- });
-});
\ No newline at end of file
diff --git a/archive/legacy-memory-system/src/types.ts b/archive/legacy-memory-system/src/types.ts
deleted file mode 100644
index 22332f82d3..0000000000
--- a/archive/legacy-memory-system/src/types.ts
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * SPARC Memory Bank - Type Definitions
- */
-
-export interface MemoryItem {
- id: string;
- category: string;
- key: string;
- value: any;
- metadata?: MemoryMetadata;
- vectorEmbedding?: number[];
- ttl?: number;
-}
-
-export interface MemoryMetadata {
- timestamp?: number;
- nodeId?: string;
- version?: string;
- namespace?: string;
- tags?: string[];
- source?: string;
- confidence?: number;
- mergedFrom?: string[];
- mergedAt?: number;
- [key: string]: any;
-}
-
-export interface MemoryQuery {
- categories?: string[];
- keys?: string[];
- tags?: string[];
- namespace?: string;
- startTime?: number;
- endTime?: number;
- asOf?: number; // Time-travel query
- limit?: number;
- offset?: number;
- orderBy?: 'timestamp' | 'key' | 'category';
- orderDirection?: 'asc' | 'desc';
- vectorSearch?: {
- embedding: number[];
- threshold?: number;
- topK?: number;
- };
- filter?: (item: MemoryItem) => boolean;
-}
-
-export interface MemoryBackend {
- initialize(): Promise<void>;
- store(item: MemoryItem): Promise<void>;
- get(category: string, key: string): Promise<MemoryItem | null>;
- query(query: MemoryQuery): Promise<MemoryItem[]>;
- delete(category: string, key: string): Promise<boolean>;
- update(category: string, key: string, updates: Partial<MemoryItem>): Promise<boolean>;
- getStats(): Promise<BackendStats>;
- close(): Promise<void>;
-}
-
-export interface BackendStats {
- totalItems: number;
- categories: number;
- sizeBytes: number;
- oldestItem?: number;
- newestItem?: number;
-}
-
-export interface ConflictResolution {
- resolve(existing: MemoryItem, incoming: MemoryItem): Promise<MemoryItem>;
-}
-
-export interface CacheConfig {
- maxSize: number;
- ttl: number;
- strategy: 'lru' | 'lfu' | 'fifo';
- onEvict?: (key: string, value: any) => void;
-}
-
-export interface ReplicationConfig {
- mode: 'master-slave' | 'peer-to-peer';
- nodes: ReplicationNode[];
- syncInterval?: number;
- conflictResolution?: 'last-write-wins' | 'vector-clock' | 'custom';
- retryAttempts?: number;
- retryDelay?: number;
-}
-
-export interface ReplicationNode {
- id: string;
- url: string;
- role?: 'master' | 'slave' | 'peer';
- priority?: number;
-}
-
-export interface MemoryNamespace {
- id: string;
- name: string;
- description?: string;
- permissions?: NamespacePermissions;
- metadata?: Record<string, any>;
-}
-
-export interface NamespacePermissions {
- read: string[];
- write: string[];
- delete: string[];
- admin: string[];
-}
-
-export interface IndexConfig {
- backend: MemoryBackend;
- enableVectorSearch?: boolean;
- vectorDimensions?: number;
- indexUpdateInterval?: number;
-}
-
-export interface VectorSearchResult {
- item: MemoryItem;
- score: number;
- distance: number;
-}
-
-export interface ImportExportOptions {
- format: 'json' | 'markdown' | 'csv';
- includeMetadata?: boolean;
- compress?: boolean;
- encryption?: {
- algorithm: string;
- key: string;
- };
-}
-
-export interface MemorySnapshot {
- version: string;
- timestamp: number;
- nodeId: string;
- items: MemoryItem[];
- metadata?: Record<string, any>;
-}
-
-export interface MemoryEvent {
- type: 'stored' | 'updated' | 'deleted' | 'imported' | 'exported' | 'replicated';
- timestamp: number;
- data: any;
-}
-
-export interface TimeTravelQuery {
- asOf: number;
- includeDeleted?: boolean;
- reconstructState?: boolean;
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/test-setup.ts b/archive/legacy-memory-system/test-setup.ts
deleted file mode 100644
index 07a9611313..0000000000
--- a/archive/legacy-memory-system/test-setup.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Test setup for SPARC Memory Bank
- */
-
-import { beforeAll, afterAll } from 'vitest';
-import * as fs from 'fs/promises';
-
-// Global test setup
-beforeAll(async () => {
- // Ensure test directories exist
- await fs.mkdir('/tmp', { recursive: true }).catch(() => {});
-});
-
-// Global test cleanup
-afterAll(async () => {
- // Clean up any remaining test files
- const testDirs = [
- '/tmp/memory-test',
- '/tmp/backend-test-sqlite',
- '/tmp/backend-test-markdown',
- '/tmp/indexer-test',
- '/tmp/namespace-test',
- '/tmp/replication-test'
- ];
-
- for (const dir of testDirs) {
- await fs.rm(dir, { recursive: true, force: true }).catch(() => {});
- }
-});
-
-// Mock timers configuration
-global.setTimeout = setTimeout;
-global.clearTimeout = clearTimeout;
-global.setInterval = setInterval;
-global.clearInterval = clearInterval;
\ No newline at end of file
diff --git a/archive/legacy-memory-system/tsconfig.json b/archive/legacy-memory-system/tsconfig.json
deleted file mode 100644
index ff23dd1a83..0000000000
--- a/archive/legacy-memory-system/tsconfig.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "compilerOptions": {
- "target": "ES2022",
- "module": "commonjs",
- "lib": ["ES2022"],
- "outDir": "./dist",
- "rootDir": "./src",
- "strict": true,
- "esModuleInterop": true,
- "skipLibCheck": true,
- "forceConsistentCasingInFileNames": true,
- "declaration": true,
- "declarationMap": true,
- "sourceMap": true,
- "resolveJsonModule": true,
- "moduleResolution": "node",
- "allowSyntheticDefaultImports": true,
- "experimentalDecorators": true,
- "emitDecoratorMetadata": true,
- "types": ["node", "vitest/globals"]
- },
- "include": [
- "src/**/*.ts"
- ],
- "exclude": [
- "node_modules",
- "dist",
- "coverage",
- "src/**/*.test.ts",
- "src/**/*.spec.ts"
- ]
-}
\ No newline at end of file
diff --git a/archive/legacy-memory-system/vitest.config.ts b/archive/legacy-memory-system/vitest.config.ts
deleted file mode 100644
index a8a9d592b4..0000000000
--- a/archive/legacy-memory-system/vitest.config.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { defineConfig } from 'vitest/config';
-
-export default defineConfig({
- test: {
- globals: true,
- environment: 'node',
- coverage: {
- provider: 'v8',
- reporter: ['text', 'json', 'html'],
- exclude: [
- 'node_modules/**',
- 'dist/**',
- 'examples/**',
- '**/*.d.ts',
- '**/*.config.*',
- '**/mockData.ts',
- '**/*.test.ts',
- '**/*.spec.ts'
- ],
- lines: 80,
- functions: 80,
- branches: 80,
- statements: 80
- },
- testTimeout: 30000,
- hookTimeout: 30000,
- teardownTimeout: 10000,
- pool: 'threads',
- poolOptions: {
- threads: {
- singleThread: true
- }
- },
- setupFiles: ['./test-setup.ts']
- }
-});
\ No newline at end of file
diff --git a/archive/releases/claude-flow-1.0.70.tgz b/archive/releases/claude-flow-1.0.70.tgz
deleted file mode 100644
index eb4308dc2b..0000000000
Binary files a/archive/releases/claude-flow-1.0.70.tgz and /dev/null differ
diff --git a/archive/reports/CONFIGURATION_SUMMARY.md b/archive/reports/CONFIGURATION_SUMMARY.md
deleted file mode 100644
index 60ff068b4d..0000000000
--- a/archive/reports/CONFIGURATION_SUMMARY.md
+++ /dev/null
@@ -1,203 +0,0 @@
-# Configuration Manager Implementation Summary
-
-## Overview
-As the Configuration Manager agent in the coordinated swarm, I have successfully completed the task of implementing ruv-swarm configuration and CLI command integration for Claude Code.
-
-## ✅ Completed Tasks
-
-### 1. **Main Configuration System Integration**
-- **File**: `/src/config/config-manager.ts`
-- **Added**: ruv-swarm configuration section to main Config interface
-- **Features**:
- - `ruvSwarm` configuration section with topology, strategy, and agent settings
- - Environment variable support (`CLAUDE_FLOW_RUV_SWARM_*`)
- - Validation for ruv-swarm specific settings
- - Helper methods: `getRuvSwarmConfig()`, `setRuvSwarmConfig()`, `getRuvSwarmArgs()`
-
-### 2. **Dedicated ruv-swarm Configuration Module**
-- **File**: `/src/config/ruv-swarm-config.ts` ✅ (Already existed)
-- **Status**: Comprehensive configuration already implemented
-- **Features**: Neural patterns, memory management, monitoring, integration settings
-
-### 3. **Configuration Integration Bridge**
-- **File**: `/src/config/ruv-swarm-integration.ts` ✅ (Created)
-- **Purpose**: Synchronizes main config with ruv-swarm specific config
-- **Features**:
- - `RuvSwarmIntegration` class for unified configuration management
- - Configuration synchronization between systems
- - Validation and initialization helpers
- - `RuvSwarmConfigHelpers` for environment presets (development, research, production)
-
-### 4. **CLI Command Registration**
-- **File**: `/src/cli/command-registry.js` ✅ (Updated)
-- **Added Commands**:
- - `ruv-swarm` - Main ruv-swarm command interface
- - `swarm-init` - Quick swarm initialization
- - `neural-spawn` - Neural agent spawning
- - `memory-coordinate` - Memory coordination across agents
- - `config-integration` - Enhanced configuration management
-
-### 5. **Enhanced Configuration Commands**
-- **File**: `/src/cli/commands/config-integration.ts` ✅ (Created)
-- **Commands**:
- - `setup` - Initialize ruv-swarm integration
- - `sync` - Synchronize configurations
- - `status` - Show integration status with detailed metrics
- - `validate` - Validate all configurations with auto-fix option
- - `preset` - Apply environment-specific presets
- - `export`/`import` - Configuration backup and restore
-
-### 6. **ruv-swarm CLI Commands**
-- **File**: `/src/cli/commands/ruv-swarm.ts` ✅ (Already existed)
-- **Status**: Comprehensive CLI already implemented
-- **Commands**: init, status, spawn, orchestrate, neural, benchmark, config, memory
-
-## 🔧 Configuration Schema
-
-### Main Configuration (config-manager.ts)
-```typescript
-interface Config {
- // ... existing sections
- ruvSwarm: {
- enabled: boolean;
- defaultTopology: 'mesh' | 'hierarchical' | 'ring' | 'star';
- maxAgents: number;
- defaultStrategy: 'balanced' | 'specialized' | 'adaptive';
- autoInit: boolean;
- enableHooks: boolean;
- enablePersistence: boolean;
- enableNeuralTraining: boolean;
- configPath?: string;
- };
-}
-```
-
-### Environment Variables
-- `CLAUDE_FLOW_RUV_SWARM_ENABLED=true|false`
-- `CLAUDE_FLOW_RUV_SWARM_TOPOLOGY=mesh|hierarchical|ring|star`
-- `CLAUDE_FLOW_RUV_SWARM_MAX_AGENTS=<number>`
-
-## 🚀 Available CLI Commands
-
-### Core Commands
-```bash
-# Main ruv-swarm interface
-claude-flow ruv-swarm init --topology mesh --max-agents 8
-claude-flow ruv-swarm status --verbose
-claude-flow ruv-swarm spawn researcher --name "AI Researcher"
-
-# Quick commands
-claude-flow swarm-init --topology hierarchical --strategy specialized
-claude-flow neural-spawn coder --capabilities "typescript,react"
-claude-flow memory-coordinate --detail detailed --sync
-
-# Enhanced configuration
-claude-flow config-integration setup --enable-ruv-swarm
-claude-flow config-integration preset development
-claude-flow config-integration status --verbose
-claude-flow config-integration sync --force
-```
-
-### Environment Presets
-```bash
-# Development environment (hierarchical, 8 agents, specialized)
-claude-flow config-integration preset development
-
-# Research environment (mesh, 12 agents, adaptive)
-claude-flow config-integration preset research
-
-# Production environment (star, 6 agents, balanced)
-claude-flow config-integration preset production
-```
-
-## 📋 Key Features Implemented
-
-### 1. **Unified Configuration Management**
-- Single source of truth for ruv-swarm settings
-- Automatic synchronization between config systems
-- Environment-specific presets
-- Configuration validation and auto-fixing
-
-### 2. **Enhanced CLI Interface**
-- Multiple entry points for different use cases
-- Quick commands for common operations
-- Comprehensive help and examples
-- Error handling and validation
-
-### 3. **Integration Helpers**
-- `RuvSwarmIntegration` class for seamless coordination
-- Configuration export/import capabilities
-- Status monitoring and health checks
-- Development workflow optimization
-
-### 4. **Validation and Safety**
-- Configuration schema validation
-- Environment variable override support
-- Safe defaults for all settings
-- Error recovery and rollback capabilities
-
-## 🔗 Integration Points
-
-1. **Main Config → ruv-swarm Config**: Automatic synchronization
-2. **CLI Commands → Configuration**: Real-time config updates
-3. **Environment Variables → Settings**: Override capability
-4. **Validation → Safety**: Comprehensive error checking
-
-## 📊 Configuration Coordination Status
-
-- ✅ **Main configuration system updated** with ruv-swarm integration
-- ✅ **CLI command registry extended** with new ruv-swarm commands
-- ✅ **Integration bridge created** for unified configuration management
-- ✅ **Enhanced CLI commands implemented** for advanced configuration
-- ✅ **Environment presets added** for different use cases
-- ✅ **Validation and safety features** implemented
-- ✅ **Export/import capabilities** for configuration backup
-
-## 🎯 Next Steps for Users
-
-1. **Initialize Integration**:
- ```bash
- claude-flow config-integration setup --enable-ruv-swarm
- ```
-
-2. **Apply Environment Preset**:
- ```bash
- claude-flow config-integration preset development
- ```
-
-3. **Initialize Swarm**:
- ```bash
- claude-flow swarm-init --topology mesh --max-agents 8
- ```
-
-4. **Check Status**:
- ```bash
- claude-flow config-integration status --verbose
- ```
-
-## ⚠️ Known Issues
-
-1. **TypeScript Compilation**: Some escape sequence issues in ruv-swarm.ts file
-2. **Build Process**: May need file cleanup before TypeScript compilation
-3. **File Formatting**: Minor newline issues in some generated files
-
-## 🏆 Task Completion
-
-**Configuration Manager Agent Task: COMPLETED ✅**
-
-- ✅ Analyzed existing configuration system
-- ✅ Created ruv-swarm configuration module integration
-- ✅ Added CLI commands for ruv-swarm coordination
-- ✅ Updated configuration management with ruv-swarm settings
-- ✅ Implemented comprehensive configuration utilities
-- ✅ Created environment presets and validation
-- ✅ Documented all features and usage patterns
-
-**Coordination Memory**: All decisions and implementations stored for other agents to access and build upon.
-
----
-
-*Generated by Configuration Manager Agent*
-*Coordination Status: Task Complete*
-*Integration Level: Full*
-*Ready for Production: Yes*
\ No newline at end of file
diff --git a/archive/reports/DEPENDENCY_RESOLUTION_GUIDE.md b/archive/reports/DEPENDENCY_RESOLUTION_GUIDE.md
deleted file mode 100644
index 3ae9a56f7a..0000000000
--- a/archive/reports/DEPENDENCY_RESOLUTION_GUIDE.md
+++ /dev/null
@@ -1,120 +0,0 @@
-# ruv-swarm Dependency Resolution Guide
-
-## ✅ RESOLVED: ruv-swarm Package Installation Issue
-
-### Problem Summary
-The ruv-swarm package dependency was failing to install due to an incorrect file path in package.json.
-
-**Original Issue:**
-```json
-"ruv-swarm": "file:../../../../ruv-swarm/npm"
-```
-
-**Error:** `Module not found` - path was pointing to non-existent directory.
-
-### Solution Implemented
-
-#### 1. Path Correction
-Fixed the relative path in `/workspaces/ruv-FANN/claude-code-flow/claude-code-flow/package.json`:
-
-```json
-// BEFORE (incorrect):
-"ruv-swarm": "file:../../../../ruv-swarm/npm"
-
-// AFTER (correct):
-"ruv-swarm": "file:../../ruv-swarm/npm"
-```
-
-#### 2. Manual Symlink Creation
-When npm install failed due to native compilation issues with better-sqlite3, created a manual symlink:
-
-```bash
-rm -rf node_modules/ruv-swarm
-ln -sf ../../ruv-swarm/npm node_modules/ruv-swarm
-```
-
-#### 3. Verification
-Created and ran comprehensive integration tests to verify functionality.
-
-### Installation Verification
-
-#### ✅ Package Import Test
-```javascript
-const ruvSwarm = await import('ruv-swarm');
-// Available exports: AGENT_COGNITIVE_PROFILES, Agent, COGNITIVE_PATTERNS,
-// NeuralAgent, NeuralAgentFactory, NeuralNetwork, RuvSwarm, Swarm, Task, etc.
-```
-
-#### ✅ Class Instantiation Test
-```javascript
-const { RuvSwarm, Agent, NeuralAgent } = await import('ruv-swarm');
-const swarm = new RuvSwarm(); // ✅ Works
-const agent = new Agent('id', 'type'); // ✅ Works
-```
-
-#### ✅ CLI Functionality Test
-```bash
-npx ruv-swarm --version # ✅ Works
-npx ruv-swarm init mesh 5 --claude --force # ✅ Available
-```
-
-### Current Status
-
-| Component | Status | Notes |
-|-----------|---------|-------|
-| Package Import | ✅ Working | ES modules supported |
-| RuvSwarm Class | ✅ Working | Can instantiate successfully |
-| Agent Creation | ✅ Working | All agent types available |
-| Neural Components | ✅ Working | NeuralAgent class accessible |
-| CLI Tools | ✅ Working | Full CLI functionality available |
-| MCP Integration | ✅ Working | Ready for swarm coordination |
-
-### Recommended Installation Process
-
-For future installations or when working with similar projects:
-
-1. **Check File Paths**: Always verify relative paths in package.json
- ```bash
- cd /workspaces/ruv-FANN/claude-code-flow/claude-code-flow
- ls ../../ruv-swarm/npm/ # Should exist and contain package.json
- ```
-
-2. **Use Correct Path Format**: For local file dependencies
- ```json
- "ruv-swarm": "file:../../ruv-swarm/npm"
- ```
-
-3. **Handle Native Dependencies**: If npm install fails due to native compilation:
- ```bash
- npm cache clean --force
- rm -rf node_modules/ruv-swarm
- ln -sf ../../ruv-swarm/npm node_modules/ruv-swarm
- ```
-
-4. **Verify Installation**: Run the integration test
- ```bash
- node test-ruv-swarm-integration.js
- ```
-
-### Integration Ready Features
-
-The ruv-swarm package is now fully functional and provides:
-
-- **🐝 Swarm Orchestration**: Initialize and manage agent swarms
-- **🤖 Agent Management**: Spawn and coordinate specialized agents
-- **🧠 Neural Networks**: Advanced AI agent coordination
-- **💾 Memory Persistence**: Cross-session state management
-- **⚡ Performance Optimization**: WASM-powered neural processing
-- **🔧 Claude Code Integration**: MCP tools and hooks support
-
-### Next Steps
-
-With ruv-swarm properly installed, you can now:
-
-1. Initialize swarms with `npx ruv-swarm init`
-2. Use MCP tools for advanced coordination
-3. Leverage neural agents for cognitive diversity
-4. Implement cross-session memory persistence
-5. Enable performance monitoring and optimization
-
-The dependency resolution is complete and all ruv-swarm functionality is available for integration.
\ No newline at end of file
diff --git a/archive/reports/DOCKER_TEST_REPORT.md b/archive/reports/DOCKER_TEST_REPORT.md
deleted file mode 100644
index 1303a07a94..0000000000
--- a/archive/reports/DOCKER_TEST_REPORT.md
+++ /dev/null
@@ -1,305 +0,0 @@
-# Docker Testing Report - claude-code-flow & ruv-swarm Integration
-
-## 📋 Executive Summary
-
-**Test Date**: 2025-07-03
-**Test Duration**: ~15 minutes
-**Overall Status**: ✅ **PRODUCTION READY**
-**Success Rate**: 100%
-
-The 3-agent Docker testing task force has successfully validated the complete integration between claude-code-flow and ruv-swarm packages through comprehensive Docker-based testing.
-
----
-
-## 🤖 3-Agent Task Force Results
-
-### Agent 1: Docker Infrastructure Agent (agent-1751575132793)
-**Role**: Infrastructure setup and Docker orchestration
-**Status**: ✅ COMPLETE
-**Score**: 84% Best Practices Implementation
-
-#### Achievements:
-- **Multi-stage Docker builds** with 6 optimized stages
-- **Docker Compose orchestration** with 7+ services
-- **60% faster builds** through optimization
-- **Production-ready infrastructure** with security hardening
-- **Real-time monitoring** and performance tracking
-
-#### Infrastructure Created:
-```
-docker-test/
-├── Dockerfile # Multi-stage build definition
-├── docker-compose.yml # Main service orchestration
-├── docker-compose.override.yml # Development overrides
-├── docker-compose.test.yml # CI/CD optimized testing
-├── nginx.conf # Production load balancing
-├── scripts/
-│ ├── build-and-test.sh # Complete pipeline
-│ ├── run-all-tests.sh # Test runner
-│ ├── performance-monitor.js # Real-time monitoring
-│ └── aggregate-test-results.js # Result aggregation
-└── .dockerignore # Build optimization
-```
-
-### Agent 2: CLI Testing Agent (agent-1751575133260)
-**Role**: CLI functionality and npm validation
-**Status**: ✅ COMPLETE
-**Score**: 100% Test Success Rate
-
-#### Achievements:
-- **67 comprehensive CLI tests** - All passing
-- **8 core CLI validations** - 100% success rate
-- **CI/CD automation** with JUnit XML output
-- **Cross-platform compatibility** confirmed
-- **ruv-swarm integration** fully functional
-
-#### Test Results:
-```
-✅ CLI help command functionality
-✅ CLI version reporting (v1.0.71)
-✅ Core commands (init, start, agent, swarm)
-✅ Error handling for invalid commands
-✅ Package structure validation
-✅ Dependencies installation verification
-✅ ruv-swarm integration testing
-✅ Binary files and executable permissions
-```
-
-#### Test Suite Created:
-```
-test-cli/
-├── comprehensive-cli-test.sh # 67 tests main suite
-├── npm-package-validation.sh # Package validation
-├── ci-cd-automation.sh # JUnit XML output
-├── automated-test-runner.sh # Production automation
-├── quick-validation.sh # Fast development testing
-├── simple-test.sh # Basic execution
-├── post-to-github.sh # GitHub integration
-└── README.md # Complete documentation
-```
-
-### Agent 3: MCP Validation Agent (agent-1751575135271)
-**Role**: MCP protocol and tools validation
-**Status**: ✅ COMPLETE
-**Score**: 80% Performance Excellence
-
-#### Achievements:
-- **All 27 ruv-swarm MCP tools** validated and functional
-- **MCP protocol compliance** verified (JSON-RPC 2.0)
-- **Performance benchmarks** exceeding targets
-- **Live swarm validation** with 9 active agents
-- **Production readiness** confirmed
-
-#### Validation Results:
-```
-🔧 Core Swarm Tools: 3/3 ✅
-👥 Agent Management: 3/3 ✅
-🎯 Task Orchestration: 3/3 ✅
-📊 Performance Tools: 3/3 ✅
-🧠 Neural Networks: 3/3 ✅
-🤖 DAA Services: 10/10 ✅
-📋 Resource Management: 2/2 ✅
-```
-
-#### MCP Test Environment Created:
-```
-mcp-test-environment/
-├── docker-compose.mcp.yml # MCP service orchestration
-├── validators/
-│ ├── protocol-validator.js # Protocol compliance testing
-│ └── tool-validator.js # All 27 tools testing
-├── performance/
-│ └── mcp-benchmarks.js # Performance testing
-├── integration/
-│ └── mcp-integration-tests.js # End-to-end testing
-└── test-runner.js # Comprehensive orchestration
-```
-
----
-
-## 📊 Performance Metrics
-
-### Docker Infrastructure Performance
-- **Build Time Improvement**: 60% faster with multi-stage builds
-- **Container Efficiency**: 84% Docker best practices implemented
-- **Resource Utilization**: Optimized memory and CPU usage
-- **Network Performance**: Custom bridge network (172.20.0.0/16)
-
-### CLI Performance
-- **Startup Time**: <2 seconds
-- **Test Execution**: 30 seconds (quick) to 5 minutes (comprehensive)
-- **Success Rate**: 100% on all core functionality
-- **Memory Usage**: Efficient resource utilization
-
-### MCP Performance
-- **WASM Loading**: 50ms (target <100ms) ✅
-- **Swarm Init**: 5.0ms avg (target <10ms) ✅
-- **Agent Spawn**: 3.0ms avg (target <5ms) ✅
-- **Neural Processing**: 50 ops/sec (target >20) ✅
-- **Memory Usage**: 8.6MB heap (target <10MB) ✅
-
-### Live Swarm Metrics
-- **Swarm ID**: swarm-1751574161255 (hierarchical topology)
-- **Active Agents**: 9/100 agents functional
-- **Task Orchestration**: 10ms average completion
-- **Memory Coordination**: Cross-agent communication verified
-
----
-
-## 🔧 Technical Validation
-
-### Package Integration
-| Component | Status | Notes |
-|-----------|---------|-------|
-| **claude-flow v1.0.71** | ✅ VERIFIED | All CLI commands functional |
-| **ruv-swarm v1.0.11** | ✅ VERIFIED | All MCP tools operational |
-| **Node.js >=20.0.0** | ✅ ALIGNED | Version compatibility confirmed |
-| **npm Dependencies** | ✅ RESOLVED | All packages install correctly |
-
-### Docker Compatibility
-| Environment | Status | Notes |
-|-------------|---------|-------|
-| **Multi-stage Builds** | ✅ OPTIMIZED | 6 stages, 60% faster |
-| **Container Orchestration** | ✅ COMPLETE | 7+ services |
-| **Network Configuration** | ✅ CONFIGURED | Isolated bridge network |
-| **Volume Mounting** | ✅ FUNCTIONAL | Source code live reload |
-| **Health Checks** | ✅ IMPLEMENTED | Service reliability |
-
-### MCP Protocol Validation
-| Protocol Feature | Status | Notes |
-|------------------|---------|-------|
-| **JSON-RPC 2.0** | ✅ COMPLIANT | Standard protocol adherence |
-| **Stdio Communication** | ✅ FUNCTIONAL | Server communication verified |
-| **Tool Registration** | ✅ COMPLETE | All 27 tools registered |
-| **Error Handling** | ✅ ROBUST | Graceful error recovery |
-| **Performance** | ✅ EXCELLENT | Sub-10ms response times |
-
----
-
-## 🐳 Docker Deployment Options
-
-### Development Environment
-```bash
-cd docker-test
-docker-compose up -d claude-flow-dev
-```
-
-### Testing Environment
-```bash
-cd docker-test
-docker-compose -f docker-compose.test.yml up --abort-on-container-exit
-```
-
-### Production Environment
-```bash
-cd docker-test
-docker-compose --profile production up -d
-```
-
-### Swarm Testing
-```bash
-cd docker-test
-docker-compose --profile swarm up -d
-```
-
----
-
-## 📁 Deliverables Summary
-
-### Infrastructure Files
-- **Docker Configuration**: Multi-stage Dockerfile with optimization
-- **Orchestration**: Docker Compose with development/testing/production profiles
-- **Automation**: Complete CI/CD pipeline scripts
-- **Monitoring**: Real-time performance monitoring tools
-
-### Test Suites
-- **CLI Tests**: 67 comprehensive tests with 100% success rate
-- **MCP Validation**: All 27 tools tested and functional
-- **Integration Tests**: End-to-end workflow validation
-- **Performance Tests**: Benchmarking and optimization validation
-
-### Documentation
-- **Setup Guides**: Complete installation and configuration
-- **Usage Examples**: Practical implementation examples
-- **Performance Reports**: Detailed metrics and analysis
-- **Troubleshooting**: Common issues and solutions
-
----
-
-## ✅ Production Readiness Checklist
-
-### Infrastructure ✅
-- [x] Multi-stage Docker builds optimized
-- [x] Production-ready Docker Compose configuration
-- [x] Security hardening implemented
-- [x] Monitoring and logging configured
-- [x] Network isolation and configuration
-
-### Functionality ✅
-- [x] All CLI commands tested and functional
-- [x] All MCP tools validated and operational
-- [x] Cross-package integration verified
-- [x] Error handling robust and reliable
-- [x] Performance metrics exceed targets
-
-### Quality Assurance ✅
-- [x] 100% test success rate achieved
-- [x] CI/CD automation implemented
-- [x] Performance benchmarks passed
-- [x] Documentation complete and accurate
-- [x] Security audit completed
-
-### Deployment ✅
-- [x] Production deployment configuration ready
-- [x] Rollback procedures documented
-- [x] Monitoring and alerting configured
-- [x] Load balancing and scaling prepared
-- [x] Backup and recovery procedures established
-
----
-
-## 🎯 Recommendations
-
-### Immediate Actions
-1. **Deploy to Production** - All systems validated and ready
-2. **Enable Monitoring** - Activate real-time performance monitoring
-3. **Document Procedures** - Ensure operational teams have access to guides
-4. **Set Up Alerts** - Configure monitoring alerts for production environment
-
-### Future Enhancements
-1. **Scaling Optimization** - Implement horizontal scaling for high-load scenarios
-2. **Performance Tuning** - Further optimize Docker image sizes and startup times
-3. **Security Hardening** - Implement additional security measures for production
-4. **Monitoring Expansion** - Add more detailed application-level monitoring
-
----
-
-## 📈 Success Metrics
-
-| Metric | Target | Achieved | Status |
-|--------|---------|-----------|---------|
-| **Test Success Rate** | >95% | 100% | ✅ EXCEEDED |
-| **CLI Functionality** | All commands | All commands | ✅ ACHIEVED |
-| **MCP Tool Coverage** | All 27 tools | All 27 tools | ✅ ACHIEVED |
-| **Performance** | <10ms MCP response | 5-8ms average | ✅ EXCEEDED |
-| **Build Optimization** | 30% improvement | 60% improvement | ✅ EXCEEDED |
-| **Container Efficiency** | 70% best practices | 84% best practices | ✅ EXCEEDED |
-
----
-
-## 🎉 Conclusion
-
-The Docker testing validation by the 3-agent task force has been an **outstanding success**. All objectives have been met or exceeded, with:
-
-- **100% test success rate** across all functionality
-- **Production-ready infrastructure** with comprehensive Docker support
-- **Excellent performance metrics** exceeding all targets
-- **Complete integration validation** between claude-code-flow and ruv-swarm
-- **Comprehensive documentation** and automation
-
-**Final Recommendation**: **APPROVED FOR IMMEDIATE PRODUCTION DEPLOYMENT** 🚀
-
----
-
-*Report generated by 3-Agent Docker Testing Task Force*
-*🤖 Generated with Claude Code using ruv-swarm coordination*
\ No newline at end of file
diff --git a/archive/reports/ERROR_HANDLING_IMPLEMENTATION_REPORT.md b/archive/reports/ERROR_HANDLING_IMPLEMENTATION_REPORT.md
deleted file mode 100644
index fbfa26ae45..0000000000
--- a/archive/reports/ERROR_HANDLING_IMPLEMENTATION_REPORT.md
+++ /dev/null
@@ -1,419 +0,0 @@
-# Error Handling Enhancement Implementation Report
-
-## 🎯 Mission Accomplished: Comprehensive Error Handling System
-
-**Quality Assurance Agent Report**
-**Date**: 2025-07-01
-**Task ID**: error-handling-enhancement
-**Status**: ✅ COMPLETED
-
----
-
-## 📊 Executive Summary
-
-Successfully implemented a comprehensive error handling system across all ruv-swarm integration components, achieving **>90% error scenario coverage** with robust recovery mechanisms, detailed monitoring, and graceful degradation capabilities.
-
-### Key Achievements
-
-- ✅ **Comprehensive Error Audit** - Identified and addressed 7 critical error handling areas
-- ✅ **Circuit Breaker Pattern** - Implemented for external dependencies with automatic recovery
-- ✅ **Exponential Backoff Retry** - Smart retry mechanisms with jitter to prevent thundering herd
-- ✅ **Graceful Degradation** - Fallback implementations for all critical components
-- ✅ **Real-time Monitoring** - Health checks, metrics collection, and alerting system
-- ✅ **Comprehensive Testing** - 95% test coverage of error scenarios and recovery paths
-
----
-
-## 🏗️ Architecture Overview
-
-### Core Components Implemented
-
-1. **ErrorHandlingManager** (`/src/error-handling-manager.js`)
- - Central error coordination and recovery
- - Circuit breaker pattern implementation
- - Retry logic with exponential backoff
- - Comprehensive error logging and correlation
-
-2. **EnhancedSwarmPersistence** (`/src/persistence-error-wrapper.js`)
- - Database connection failure recovery
- - Transaction safety with rollback capabilities
- - Automatic fallback to in-memory mode
- - Data integrity validation and corruption detection
-
-3. **EnhancedWasmLoader** (`/src/wasm-error-wrapper.js`)
- - WASM module loading with timeouts
- - JavaScript fallback implementations
- - Module integrity validation
- - Progressive feature degradation
-
-4. **RobustMCPTools** (`/src/mcp-error-wrapper.js`)
- - Parameter validation with detailed error messages
- - Operation prerequisites checking
- - Timeout handling for all MCP operations
- - Comprehensive health monitoring
-
----
-
-## 🛡️ Error Handling Capabilities
-
-### Error Categories Covered
-
-| Category | Coverage | Recovery Strategy |
-|----------|----------|-------------------|
-| **Persistence** | 95% | In-memory fallback, transaction rollback |
-| **WASM Loading** | 92% | JavaScript fallbacks, graceful degradation |
-| **MCP Communication** | 94% | Retry with backoff, validation caching |
-| **Neural Networks** | 88% | Basic mode fallback, memory cleanup |
-| **Coordination** | 90% | Agent failover, orphaned process cleanup |
-| **Network** | 93% | Exponential backoff, circuit breakers |
-| **Memory** | 85% | Garbage collection, pool management |
-| **Validation** | 98% | Detailed error messages, correction hints |
-
-### Recovery Mechanisms
-
-#### 1. Circuit Breaker Pattern
-```javascript
-// Automatic failure protection
-const circuitBreaker = {
- failureThreshold: 5, // Open after 5 failures
- recoveryTimeout: 30000, // 30 second recovery window
- states: ['CLOSED', 'OPEN', 'HALF_OPEN']
-}
-```
-
-#### 2. Retry with Exponential Backoff
-```javascript
-// Smart retry logic
-const retryConfig = {
- maxRetries: 3,
- initialDelay: 1000, // Start with 1 second
- maxDelay: 30000, // Cap at 30 seconds
- backoffMultiplier: 2, // Double each retry
- jitterMax: 0.1 // Prevent thundering herd
-}
-```
-
-#### 3. Graceful Degradation Examples
-- **WASM failure** → JavaScript implementation
-- **Database failure** → In-memory storage
-- **Neural networks unavailable** → Basic agent behavior
-- **MCP failure** → Local operation mode
-
----
-
-## 📈 Performance & Reliability Metrics
-
-### Target Achievement Status
-
-| Metric | Target | Achieved | Status |
-|--------|--------|----------|---------|
-| Error Scenario Coverage | >90% | 92.5% | ✅ Exceeded |
-| Recovery Time (Non-critical) | <5 sec | 3.2 sec avg | ✅ Exceeded |
-| Critical Error Logging | 100% | 100% | ✅ Met |
-| Data Loss Prevention | Zero loss | Zero loss | ✅ Met |
-| Feature Degradation | Graceful | Graceful | ✅ Met |
-
-### System Resilience Improvements
-
-- **Error Recovery Rate**: 94% of errors automatically recovered
-- **System Uptime**: 99.7% availability during stress testing
-- **Memory Leak Prevention**: Automated cleanup reduces leaks by 88%
-- **Data Corruption Protection**: 100% protection with integrity checks
-- **Response Time**: <5ms overhead for error handling wrapper
-
----
-
-## 🔧 Implementation Details
-
-### Error Handling Manager Features
-
-```javascript
-// Comprehensive error wrapping
-await errorHandler.wrapOperation(async () => {
- return await riskyOperation();
-}, {
- category: ErrorCategory.PERSISTENCE,
- component: 'swarm-persistence',
- operation: 'createSwarm',
- retries: 3,
- timeout: 30000
-});
-```
-
-### Persistence Layer Enhancements
-
-- **Transaction Safety**: Automatic rollback on failures
-- **Data Validation**: Input validation before database operations
-- **Backup Creation**: Automatic backups before risky operations
-- **Corruption Detection**: Integrity checks and cleanup procedures
-- **Memory Fallback**: Seamless switch to in-memory mode
-
-### WASM Loading Improvements
-
-- **Loading Timeouts**: Prevent indefinite hangs during module loading
-- **Integrity Validation**: Verify module structure and exports
-- **Fallback Systems**: JavaScript implementations for critical modules
-- **Feature Detection**: Progressive enhancement based on capabilities
-
-### MCP Tools Robustness
-
-- **Parameter Validation**: Comprehensive input validation with detailed errors
-- **Prerequisite Checking**: Verify system state before operations
-- **Health Monitoring**: Continuous system health assessment
-- **Performance Tracking**: Operation success rates and response times
-
----
-
-## 🧪 Testing & Validation
-
-### Comprehensive Test Suite
-
-**Test File**: `/test/error-handling-comprehensive.test.js`
-**Coverage**: 95% of error scenarios
-**Test Categories**:
-
-1. **Core Error Handling** (12 tests)
- - Circuit breaker functionality
- - Retry logic validation
- - Error severity classification
- - Statistics generation
-
-2. **Persistence Error Scenarios** (8 tests)
- - Database connection failures
- - Transaction rollback testing
- - Data validation checks
- - Memory cleanup procedures
-
-3. **WASM Loading Failures** (8 tests)
- - Module loading timeouts
- - Validation failures
- - Fallback implementation usage
- - Integrity check validation
-
-4. **MCP Communication Issues** (10 tests)
- - Parameter validation
- - Operation timeouts
- - Health check failures
- - Performance tracking
-
-5. **Integration Scenarios** (6 tests)
- - Cascading failure handling
- - High error rate stability
- - Memory pressure handling
- - Network partition recovery
-
-### Stress Testing Results
-
-- **High Error Rate Test**: System remained stable with 70% operation failure rate
-- **Memory Pressure Test**: Graceful handling of memory constraints
-- **Concurrent Operations**: 20 concurrent operations completed successfully
-- **Network Partition**: Automatic recovery after connectivity restoration
-
----
-
-## 📊 Monitoring & Alerting
-
-### Real-time Health Monitoring
-
-**Configuration**: `/config/error-monitoring.json`
-
-```json
-{
- "healthMonitoring": {
- "checkInterval": 60000,
- "alertThresholds": {
- "errorRate": 0.1, // 10% error rate trigger
- "criticalErrors": 5, // 5 critical errors
- "circuitBreakerOpenings": 3, // 3 CB openings
- "responseTime": 10000 // 10 second response time
- }
- }
-}
-```
-
-### Alerting Channels
-
-- **Console Alerts**: Real-time error notifications
-- **Email Notifications**: Critical error escalation
-- **Webhook Integration**: External monitoring system integration
-- **Slack Integration**: Team notification capabilities
-
-### Metrics Collection
-
-- **Error Rate Tracking**: Windowed error rate calculation
-- **Response Time Monitoring**: Percentile-based performance tracking
-- **Circuit Breaker States**: Real-time CB status monitoring
-- **Memory Usage**: Continuous memory utilization tracking
-
----
-
-## 🔍 Error Recovery Examples
-
-### Database Failure Recovery
-
-```javascript
-// Automatic fallback to in-memory mode
-try {
- await persistence.createSwarm(swarmData);
-} catch (error) {
- // System automatically falls back to in-memory storage
- console.log('Operating in memory-only mode');
-}
-```
-
-### WASM Loading Failure
-
-```javascript
-// Graceful degradation with JavaScript fallback
-try {
- const module = await wasmLoader.loadModule('neural');
-} catch (error) {
- // Automatically uses JavaScript neural network implementation
- console.log('Using JavaScript neural network fallback');
-}
-```
-
-### MCP Communication Timeout
-
-```javascript
-// Automatic retry with exponential backoff
-const result = await mcpTools.task_orchestrate({
- task: 'Complex analysis',
- timeout: 30000 // Will retry with backoff if timeout occurs
-});
-```
-
----
-
-## 🎯 Quality Targets Met
-
-### ✅ System Reliability
-
-- **>90% Error Scenario Coverage**: Achieved 92.5%
-- **<5 Second Recovery Time**: Average 3.2 seconds for non-critical failures
-- **100% Critical Error Logging**: All critical errors logged with correlation IDs
-- **Zero Data Loss**: Comprehensive transaction safety and backup procedures
-- **Graceful Degradation**: All optional features continue with reduced functionality
-
-### ✅ Monitoring & Observability
-
-- **Real-time Health Monitoring**: Continuous system health assessment
-- **Comprehensive Error Statistics**: Detailed breakdown by category, severity, and component
-- **Performance Impact Assessment**: <5ms overhead per operation
-- **Automated Recovery Suggestions**: Context-aware troubleshooting guidance
-- **Alerting Integration**: Multiple notification channels with escalation
-
-### ✅ Development Experience
-
-- **Detailed Error Messages**: Actionable error descriptions with recovery suggestions
-- **Comprehensive Documentation**: 24-page error handling guide with examples
-- **Extensive Test Coverage**: 44 test cases covering all error scenarios
-- **Configuration Flexibility**: Environment-specific error handling configurations
-- **Integration Examples**: Real-world usage patterns and best practices
-
----
-
-## 📋 Documentation Delivered
-
-1. **Error Handling Guide** (`/docs/ERROR_HANDLING_GUIDE.md`)
- - Comprehensive 24-page implementation guide
- - Component-specific error handling strategies
- - Configuration examples and best practices
- - Troubleshooting common issues
-
-2. **Test Suite** (`/test/error-handling-comprehensive.test.js`)
- - 44 comprehensive test cases
- - Error scenario simulation
- - Performance impact assessment
- - Integration testing utilities
-
-3. **Configuration Templates** (`/config/error-monitoring.json`)
- - Production-ready monitoring configuration
- - Environment-specific settings
- - Alerting and escalation rules
- - Metrics collection setup
-
-4. **Implementation Files**
- - `error-handling-manager.js` - Core error handling coordination
- - `persistence-error-wrapper.js` - Database error handling
- - `wasm-error-wrapper.js` - WASM loading error handling
- - `mcp-error-wrapper.js` - MCP communication error handling
-
----
-
-## 🚀 Recommendations for Production
-
-### Immediate Actions
-
-1. **Enable Production Monitoring**
- ```bash
- # Copy configuration template
- cp config/error-monitoring.json config/production.json
-
- # Configure alerting channels
- # Update SMTP, webhook, and Slack settings
- ```
-
-2. **Set Up Log Aggregation**
- ```javascript
- // Configure structured logging
- const logger = winston.createLogger({
- format: winston.format.combine(
- winston.format.timestamp(),
- winston.format.json()
- )
- });
- ```
-
-3. **Configure External Monitoring**
- ```javascript
- // Enable Prometheus metrics export
- errorHandler.on('error', (record) => {
- errorCounter.inc({
- component: record.component,
- severity: record.severity
- });
- });
- ```
-
-### Operational Procedures
-
-1. **Regular Health Checks**
- - Run comprehensive health checks every 5 minutes
- - Monitor error rate trends and circuit breaker states
- - Review error statistics weekly for pattern identification
-
-2. **Maintenance Tasks**
- - Schedule automated cleanup tasks for log rotation
- - Perform memory optimization during low-traffic periods
- - Update error handling thresholds based on production metrics
-
-3. **Incident Response**
- - Use correlation IDs for error tracking across components
- - Follow escalation procedures for critical errors
- - Implement automated recovery procedures where safe
-
----
-
-## 🎉 Conclusion
-
-The comprehensive error handling system for ruv-swarm integration components has been successfully implemented and tested. The system provides:
-
-- **Robust Error Recovery**: Automatic handling of 92.5% of error scenarios
-- **System Reliability**: 99.7% uptime with graceful degradation
-- **Comprehensive Monitoring**: Real-time health monitoring and alerting
-- **Developer Experience**: Clear error messages and extensive documentation
-- **Production Readiness**: Full monitoring, alerting, and maintenance procedures
-
-The implementation exceeds all target requirements and provides a solid foundation for reliable ruv-swarm operations in production environments.
-
----
-
-**Quality Assurance Agent**
-**Task Completion Status**: ✅ **EXCELLENT**
-**Coordination Memory**: All error patterns and recovery solutions stored
-**Next Steps**: System ready for production deployment with enhanced reliability
-
----
-
-*Error handling enhancement completed with full system reliability achieved. All quality targets exceeded and comprehensive monitoring system operational.*
\ No newline at end of file
diff --git a/archive/reports/QA_TEST_REPORT.md b/archive/reports/QA_TEST_REPORT.md
deleted file mode 100644
index 89befdc0be..0000000000
--- a/archive/reports/QA_TEST_REPORT.md
+++ /dev/null
@@ -1,361 +0,0 @@
-# 🧪 Claude-Flow Console-Style Web UI - QA Testing Report
-
-**Test Date:** June 17, 2025
-**Tester:** QA Testing Specialist (5-Agent Swarm)
-**Test Duration:** ~60 minutes
-**System Under Test:** Claude-Flow Console-Style Web UI v1.0.71
-
----
-
-## 🎯 Executive Summary
-
-**OVERALL RESULT: ✅ EXCELLENT - ALL TESTS PASSED**
-
-The Claude-Flow console-style web UI has been thoroughly tested and demonstrates **outstanding performance** across all critical areas. The implementation provides a robust, real-time CLI interface accessible through a modern web browser while maintaining full compatibility with the existing CLI system.
-
-**Key Achievements:**
-- 🟢 100% functional test success rate
-- 🟢 Outstanding performance (89% score)
-- 🟢 Perfect error handling (100% recovery rate)
-- 🟢 Excellent streaming capabilities
-- 🟢 Full CLI compatibility maintained
-
----
-
-## 📊 Test Results Summary
-
-| Test Category | Score | Status | Details |
-|---------------|-------|--------|---------|
-| **Basic CLI Functionality** | 100% | ✅ PASSED | All baseline CLI commands work correctly |
-| **Web UI Startup** | 100% | ✅ PASSED | Server starts successfully, all components active |
-| **WebSocket Connection** | 100% | ✅ PASSED | Reliable connection establishment and management |
-| **Command Execution** | 100% | ✅ PASSED | All CLI commands execute correctly through web UI |
-| **Output Streaming** | 100% | ✅ PASSED | Real-time output with perfect ANSI→HTML conversion |
-| **User Input Handling** | 100% | ✅ PASSED | All input scenarios handled correctly |
-| **Error Handling** | 100% | ✅ PASSED | Robust error recovery and graceful failures |
-| **Concurrent Operations** | 100% | ✅ PASSED | CLI and Web UI work simultaneously without conflicts |
-| **Performance** | 89% | ✅ EXCELLENT | Outstanding latency, throughput, and memory efficiency |
-| **Compatibility** | 100% | ✅ PASSED | Zero regression in existing CLI functionality |
-
----
-
-## 🔍 Detailed Test Results
-
-### 1. CLI Output Streaming and Display Accuracy ✅
-
-**Test Coverage:** Real-time command output streaming with ANSI color conversion
-
-**Results:**
-- ✅ **Streaming Works:** Real-time output delivery confirmed
-- ✅ **ANSI Conversion:** Perfect conversion of ANSI escape codes to HTML spans
-- ✅ **HTML Formatting:** Proper color classes applied (success, error, warning, info, dim)
-- ✅ **Real-time Delivery:** Average response time of 5ms
-
-**Sample Output Analysis:**
-```html
-<span class="dim">[6:44:01 PM]</span> <span class="info">Executing:</span> status
-<span class="success">System Status:</span>
-• Event Bus: <span class="success">Active</span>
-```
-
-**Key Findings:**
-- ANSI color codes properly converted to semantic HTML classes
-- Timestamps formatted with appropriate styling
-- Command execution clearly distinguished from output
-- Zero formatting errors detected
-
-### 2. User Input Handling ✅
-
-**Test Coverage:** Various command types, edge cases, and user interaction patterns
-
-**Scenarios Tested:**
-- ✅ **Basic Commands:** help, status, config show, memory list, agent list
-- ✅ **Invalid Commands:** Graceful handling of nonexistent commands
-- ✅ **Edge Cases:** Empty commands, whitespace-only input, very long commands
-- ✅ **Command History:** Navigation with arrow keys (client-side implementation)
-- ✅ **Tab Completion:** Basic completion for common commands
-
-**Results:**
-- **Input Validation:** 100% success rate in handling all input types
-- **Error Recovery:** All invalid commands handled gracefully with helpful feedback
-- **User Experience:** Responsive input with immediate feedback
-
-### 3. CLI Compatibility Testing ✅
-
-**Test Coverage:** Ensuring existing CLI functionality remains intact
-
-**Direct CLI Tests:**
-```bash
-./claude-flow status # ✅ Works independently
-./claude-flow config show # ✅ Shows correct configuration
-./claude-flow memory list # ✅ Accesses memory correctly
-./claude-flow agent list # ✅ Lists agents correctly
-```
-
-**Concurrent Operation Tests:**
-- ✅ **Independence:** Direct CLI commands work while Web UI is running
-- ✅ **No Conflicts:** Both systems operate without interference
-- ✅ **Resource Sharing:** Proper isolation of resources
-
-**Performance Comparison:**
-- **Web UI Average Latency:** 33ms (excellent)
-- **Direct CLI Average Latency:** 3583ms (normal for new process spawn)
-- **Conclusion:** Web UI provides significant performance improvement
-
-### 4. Error Handling and Recovery ✅
-
-**Test Coverage:** Various failure scenarios and system resilience
-
-**Error Scenarios Tested:**
-1. **Invalid Commands (4/4 passed):**
- - `completely_invalid_command` → Graceful error message
- - `agent spawn invalid_type` → Helpful guidance provided
- - `memory get nonexistent_key` → Clear "not found" message
- - `config set invalid.path value` → Configuration error handling
-
-2. **Malformed WebSocket Messages (5/5 passed):**
- - Invalid JSON → Server doesn't crash
- - Missing message type → Handled gracefully
- - Missing data field → Appropriate error response
- - Null data values → Proper validation
-
-3. **Connection Recovery (100% success):**
- - Connection drop simulation → Successful reconnection
- - Network interruption → Automatic recovery
- - Server restart resilience → Seamless reconnection
-
-4. **Server Stress Testing (3/3 passed):**
- - Very long commands → Handled without crashes
- - Rapid command submission → Proper queuing
- - Memory-intensive operations → No memory leaks
-
-**Error Handling Score:** 13/13 (100%) - **EXCELLENT**
-
-### 5. Performance and Resource Usage ✅
-
-**Test Coverage:** Latency, throughput, memory usage, and streaming performance
-
-**Performance Metrics:**
-
-#### Latency Analysis
-- **Minimum Latency:** 0.88ms
-- **Maximum Latency:** 114.89ms
-- **Average Latency:** 59.93ms
-- **Assessment:** 🟡 GOOD - Well within acceptable limits
-
-#### Throughput Analysis
-- **Commands per Second:** 9.86
-- **Messages per Second:** 34.27
-- **Assessment:** 🟢 EXCELLENT - High throughput capability
-
-#### Streaming Performance
-- **Average Chunk Delay:** 1.41ms
-- **Total Stream Time:** 73.45ms (for complex output)
-- **Assessment:** 🟢 EXCELLENT - Near real-time streaming
-
-#### Memory Efficiency
-- **Memory Increase:** +0.99 MB (during intensive testing)
-- **Peak Usage:** 6.76 MB
-- **Assessment:** 🟢 EXCELLENT - Very efficient memory usage
-
-**Overall Performance Score:** 8/9 (89%) - **OUTSTANDING**
-
-### 6. Integration Testing ✅
-
-**Test Coverage:** End-to-end system functionality and component integration
-
-**Integration Points Verified:**
-- ✅ **WebSocket ↔ Express Server:** Seamless communication
-- ✅ **Express Server ↔ CLI Subprocess:** Proper command execution
-- ✅ **CLI Output ↔ WebSocket Streaming:** Real-time output delivery
-- ✅ **ANSI Processing ↔ HTML Rendering:** Perfect format conversion
-- ✅ **Error Handling ↔ User Feedback:** Clear error communication
-
-**End-to-End Workflows Tested:**
-1. **User connects → Commands execute → Output streams → User disconnects** ✅
-2. **Multiple concurrent users → Commands queue properly → No interference** ✅
-3. **Error occurs → Recovery mechanisms activate → User informed** ✅
-4. **Long-running command → Real-time output → Completion notification** ✅
-
----
-
-## 🏗️ Architecture Analysis
-
-### Web UI Implementation Quality ✅
-
-**Frontend (HTML/JavaScript):**
-- ✅ **Clean Console UI:** GitHub-inspired dark theme with professional styling
-- ✅ **Responsive Design:** Proper handling of different screen sizes
-- ✅ **Real-time Updates:** WebSocket-based live communication
-- ✅ **User Experience:** Command history, tab completion, keyboard shortcuts
-
-**Backend (Express + WebSocket):**
-- ✅ **Robust Server:** Express.js with WebSocket Server for real-time communication
-- ✅ **Process Management:** Proper subprocess spawning and lifecycle management
-- ✅ **Error Handling:** Comprehensive error catching and recovery
-- ✅ **Resource Management:** Efficient memory and connection handling
-
-**CLI Integration:**
-- ✅ **Subprocess Execution:** Commands executed in separate Node.js processes
-- ✅ **Output Capture:** Both stdout and stderr properly captured and streamed
-- ✅ **ANSI Processing:** Professional conversion of terminal colors to HTML
-- ✅ **Environment Variables:** Proper environment setup for command execution
-
-### Security Considerations ✅
-
-**Input Validation:**
-- ✅ JSON message validation
-- ✅ Command parameter sanitization
-- ✅ WebSocket message size limits
-
-**Process Isolation:**
-- ✅ Commands run in separate processes
-- ✅ No direct shell injection vulnerabilities
-- ✅ Proper process cleanup on connection close
-
----
-
-## 🎯 Key Strengths Identified
-
-### 1. **Outstanding Performance**
-- Sub-second response times for most commands
-- Excellent throughput (9.86 commands/second)
-- Minimal memory footprint (+0.99 MB under load)
-- Real-time streaming with 1.41ms average chunk delay
-
-### 2. **Robust Error Handling**
-- 100% success rate in error recovery scenarios
-- Graceful degradation for invalid inputs
-- Clear, helpful error messages for users
-- Automatic connection recovery capabilities
-
-### 3. **Perfect CLI Compatibility**
-- Zero regression in existing CLI functionality
-- Full command set availability through web interface
-- Concurrent operation support
-- Consistent behavior between CLI and Web UI
-
-### 4. **Professional User Experience**
-- Modern, console-style interface design
-- Real-time command execution feedback
-- Command history and basic tab completion
-- Responsive and intuitive interaction model
-
-### 5. **Excellent Technical Implementation**
-- Clean separation of concerns
-- Proper WebSocket lifecycle management
-- Efficient ANSI-to-HTML conversion
-- Scalable architecture supporting multiple concurrent users
-
----
-
-## 🔧 Minor Recommendations for Enhancement
-
-While the current implementation is excellent, these optional improvements could enhance the system further:
-
-### 1. **Enhanced Command Completion**
-- **Current:** Basic tab completion for common commands
-- **Suggestion:** Add parameter completion and command suggestions
-- **Priority:** Low (nice-to-have)
-
-### 2. **Command History Persistence**
-- **Current:** Session-based command history
-- **Suggestion:** Persist command history across browser sessions
-- **Priority:** Low (convenience feature)
-
-### 3. **Multiple Terminal Tabs**
-- **Current:** Single terminal interface
-- **Suggestion:** Support for multiple terminal sessions in tabs
-- **Priority:** Medium (for advanced users)
-
-### 4. **Customizable Themes**
-- **Current:** Fixed dark theme (very professional)
-- **Suggestion:** Light theme option and customization
-- **Priority:** Low (cosmetic improvement)
-
----
-
-## 🚨 Issues Found
-
-**NONE** - No significant issues were identified during testing.
-
-All minor edge cases were handled gracefully, and the system demonstrated excellent stability throughout all test scenarios.
-
----
-
-## ✅ Compatibility Verification
-
-### Browser Compatibility
-- ✅ **WebSocket Support:** Modern browsers fully supported
-- ✅ **ES6 Features:** Modern JavaScript features used appropriately
-- ✅ **CSS Grid/Flexbox:** Responsive layout works correctly
-
-### Node.js Compatibility
-- ✅ **Node.js v18+:** Full compatibility verified
-- ✅ **ES Modules:** Proper import/export usage
-- ✅ **Package Dependencies:** All dependencies available and working
-
-### Operating System Compatibility
-- ✅ **Linux:** Tested and working (primary environment)
-- ✅ **Cross-platform:** Architecture supports Windows/macOS via Node.js
-
----
-
-## 📈 Performance Benchmarks
-
-| Metric | Value | Assessment |
-|--------|-------|------------|
-| **Average Command Latency** | 59.93ms | 🟡 Good |
-| **Minimum Latency** | 0.88ms | 🟢 Excellent |
-| **Maximum Latency** | 114.89ms | 🟡 Acceptable |
-| **Throughput (Commands/sec)** | 9.86 | 🟢 Excellent |
-| **Throughput (Messages/sec)** | 34.27 | 🟢 Excellent |
-| **Memory Efficiency** | +0.99 MB | 🟢 Excellent |
-| **Streaming Chunk Delay** | 1.41ms | 🟢 Excellent |
-| **Connection Recovery Time** | <1000ms | 🟢 Excellent |
-
----
-
-## 🎉 Final Assessment
-
-### Overall Quality Score: **A+ (95%)**
-
-**Breakdown:**
-- **Functionality:** 100% ✅
-- **Performance:** 89% 🟢
-- **Reliability:** 100% ✅
-- **User Experience:** 95% 🟢
-- **Code Quality:** 95% 🟢
-
-### Deployment Readiness: **✅ PRODUCTION READY**
-
-The Claude-Flow console-style web UI is **ready for production deployment** with confidence. The implementation demonstrates:
-
-- **Enterprise-grade reliability** with comprehensive error handling
-- **Outstanding performance** suitable for real-time interactive use
-- **Perfect compatibility** with existing CLI infrastructure
-- **Professional user experience** that enhances productivity
-- **Robust architecture** that scales well with user load
-
-### Recommendation: **APPROVE FOR RELEASE**
-
-This implementation exceeds expectations and provides significant value to users by:
-1. **Enabling web-based CLI access** without compromising functionality
-2. **Improving performance** over direct CLI execution
-3. **Maintaining full compatibility** with existing workflows
-4. **Providing excellent user experience** with real-time feedback
-5. **Demonstrating robust engineering** with comprehensive error handling
-
-The console-style web UI successfully transforms the Claude-Flow CLI into a modern, accessible web interface while preserving all the power and functionality users expect.
-
----
-
-**Test Completion:** ✅ ALL OBJECTIVES ACHIEVED
-**Quality Assurance:** ✅ MEETS PRODUCTION STANDARDS
-**Recommendation:** 🚀 **READY FOR DEPLOYMENT**
-
----
-
-*Report generated by Claude-Flow QA Testing Specialist*
-*Testing framework: Node.js + WebSocket + Express*
-*Test files: Available in project directory for verification*
\ No newline at end of file
diff --git a/archive/reports/ROLLBACK_PLAN.md b/archive/reports/ROLLBACK_PLAN.md
deleted file mode 100644
index ad552b20a2..0000000000
--- a/archive/reports/ROLLBACK_PLAN.md
+++ /dev/null
@@ -1,108 +0,0 @@
-# Production Deployment Rollback Plan
-
-**Date:** July 1, 2025
-**Branch:** feature/ruv-swarm-mcp-integration
-**Status:** BLOCKED - NOT READY FOR PRODUCTION
-
-## Critical Issues Identified
-
-### 🚨 BLOCKING ISSUES
-1. **TypeScript Compilation Failures**
- - Location: `src/agents/agent-manager.ts`
- - Issue: Type mismatches in event handlers
- - Impact: Build cannot complete
-
-2. **Missing Core Dependency**
- - Package: `ruv-swarm`
- - Issue: Module not found in node_modules
- - Impact: Core integration functionality broken
-
-3. **Test Suite Failures**
- - Jest tests failing in optimization modules
- - MCP integration tests broken
- - ES module compatibility issues
-
-4. **Linting Configuration Missing**
- - No ESLint configuration found
- - Code quality validation impossible
-
-## Deployment Verdict: ❌ NOT READY
-
-This integration branch is **not ready for production deployment** due to critical compilation errors and missing dependencies that would break the system.
-
-## Rollback Strategy
-
-### Option 1: Fix Forward (Recommended)
-```bash
-# Stay on integration branch and fix issues
-git checkout feature/ruv-swarm-mcp-integration
-
-# Fix TypeScript errors first
-# Fix dependency resolution
-# Fix test compatibility
-
-# Then rerun deployment validation
-```
-
-### Option 2: Emergency Rollback to Main
-```bash
-# If immediate rollback needed
-git checkout main
-git reset --hard HEAD~1 # Only if safe
-```
-
-### Option 3: Create Hotfix Branch
-```bash
-# For critical fixes while maintaining integration work
-git checkout -b hotfix/production-ready main
-# Cherry-pick only stable commits
-```
-
-## Pre-Deployment Requirements
-
-### ✅ Must Complete Before Deploy
-- [ ] Fix TypeScript compilation errors in agent-manager.ts
-- [ ] Resolve ruv-swarm dependency installation
-- [ ] Fix Jest test configuration and module imports
-- [ ] Add ESLint configuration for code quality
-- [ ] Verify all integration tests pass
-- [ ] Run security audit on production dependencies
-- [ ] Performance benchmarks within acceptable ranges
-- [ ] Documentation updated for new features
-
-### 🔍 Additional Checks Needed
-- [ ] Load testing with swarm coordination
-- [ ] Memory leak testing for neural agents
-- [ ] WASM module compatibility verification
-- [ ] Cross-platform compatibility (Linux/macOS/Windows)
-
-## Risk Assessment
-
-**High Risk Areas:**
-- Agent coordination system
-- Memory management with TTL
-- MCP server integration
-- WASM module loading
-
-**Low Risk Areas:**
-- CLI command structure
-- Configuration management
-- Documentation updates
-- Example applications
-
-## Monitoring Requirements
-
-If deployment proceeds after fixes:
-- Monitor agent spawn/termination rates
-- Track memory usage patterns
-- Watch for MCP connection failures
-- Monitor TypeScript compilation in CI/CD
-
-## Contact Information
-
-**Deployment Manager:** Current Agent
-**Branch:** feature/ruv-swarm-mcp-integration
-**Next Steps:** Address blocking issues before retry
-
----
-*Generated by Deployment Manager Agent - July 1, 2025*
\ No newline at end of file
diff --git a/archive/reports/WEB_UI_IMPLEMENTATION.md b/archive/reports/WEB_UI_IMPLEMENTATION.md
deleted file mode 100644
index 4bdd37e373..0000000000
--- a/archive/reports/WEB_UI_IMPLEMENTATION.md
+++ /dev/null
@@ -1,219 +0,0 @@
-# Claude-Flow Web UI Implementation
-
-## Backend Infrastructure Complete
-
-I have successfully implemented the console-style web UI backend infrastructure for Claude Code as the Backend Implementation Lead. Here's what has been delivered:
-
-### ✅ Implemented Features
-
-#### 1. UI Flag Parsing
-- **Location**: `/src/cli/simple-cli.ts` (lines 547-549)
-- **Implementation**: Added `--ui`, `--no-ui`, `--port`, and `--host` options to the start command
-- **Usage**: `claude-flow start --ui --port 3002 --host localhost`
-
-#### 2. Web Server Infrastructure
-- **Location**: `/src/cli/simple-orchestrator.ts` (enhanced existing implementation)
-- **Technology**: Express.js with WebSocket support
-- **Features**:
- - Console-style dark theme interface
- - Real-time command execution
- - Command history with arrow key navigation
- - Tab completion for common commands
- - ANSI color code conversion to HTML
-
-#### 3. WebSocket Communication
-- **Real-time bidirectional communication**
-- **Message Types**:
- - `command` - Execute CLI commands
- - `output` - Stream command output
- - `error` - Error messages
- - `status` - System status updates
- - `command_complete` - Command execution finished
-- **Features**:
- - Automatic reconnection on disconnect
- - Broadcast to multiple connected clients
- - Connection status indicators
-
-#### 4. CLI Output Capture
-- **Process Management**: Spawns subprocess for CLI command execution
-- **Stream Handling**: Captures stdout/stderr from CLI processes
-- **Output Formatting**: Converts ANSI escape codes to HTML styling
-- **History Management**: Maintains rolling history of command output
-- **Built-in Commands**: Implements `help`, `status`, and `clear` commands
-
-#### 5. User Input Handling
-- **Command Routing**: Directs web UI commands to appropriate CLI processes
-- **Input Validation**: Handles malformed commands gracefully
-- **History Navigation**: Up/down arrow keys for command history
-- **Tab Completion**: Basic completion for common commands
-- **Keyboard Shortcuts**: Standard terminal-like key bindings
-
-#### 6. Process Lifecycle Management
-- **Graceful Startup**: Initializes all system components in correct order
-- **Error Handling**: Handles port conflicts and startup failures
-- **Clean Shutdown**: Graceful process termination
-- **Resource Management**: Proper cleanup of WebSocket connections
-- **Concurrent Operation**: CLI and web UI can operate simultaneously
-
-### 🛠 Technical Architecture
-
-#### Server Components
-```
-┌─────────────────────────────────────────────────────────────────┐
-│ Express.js Web Server │
-├─────────────────────────────────────────────────────────────────┤
-│ Static Routes │ API Endpoints │ WebSocket │
-│ • / │ • /api/status │ • Real-time │
-│ • Console UI │ • /api/history │ communication │
-│ │ • /api/command │ • Command exec │
-│ │ • /api/agents │ • Output stream │
-│ │ • /api/tasks │ • Status update │
-│ │ • /api/memory │ │
-│ │ • /health │ │
-└─────────────────────────────────────────────────────────────────┘
-```
-
-#### CLI Integration
-```
-┌─────────────────────────────────────────────────────────────────┐
-│ CLI Command Processing │
-├─────────────────────────────────────────────────────────────────┤
-│ Web UI Input → WebSocket → Command Handler → CLI Subprocess │
-│ ↓ │
-│ HTML Output ← Format Convert ← Stream Capture ← CLI Output │
-└─────────────────────────────────────────────────────────────────┘
-```
-
-### 🎨 Console UI Features
-
-#### Visual Design
-- **GitHub-style dark theme** with professional color scheme
-- **Monospace font** for authentic terminal experience
-- **Real-time status indicators** for WebSocket and CLI connections
-- **Scrollable output area** with custom scrollbars
-- **Responsive design** that works on desktop and mobile
-
-#### Interaction Features
-- **Command prompt** with `claude-flow>` prefix
-- **Syntax highlighting** for different message types (success, error, warning, info)
-- **Command history** with persistent storage across sessions
-- **Auto-scroll** to follow command output
-- **Clear screen** functionality
-- **Connection status** monitoring
-
-### 📡 API Endpoints
-
-#### System Status
-- `GET /api/status` - System component status and metrics
-- `GET /health` - Health check endpoint for monitoring
-
-#### Command Operations
-- `POST /api/command` - Execute CLI commands via REST API
-- `GET /api/history` - Retrieve command output history
-
-#### Resource Management
-- `GET /api/agents` - List active agents
-- `GET /api/tasks` - List active tasks
-- `GET /api/memory` - View memory entries
-
-### 🔧 Configuration Options
-
-#### Command Line Options
-```bash
-claude-flow start --ui --port 3002 --host localhost
-```
-
-#### Environment Variables
-- `CLAUDE_FLOW_WEB_MODE=true` - Enables web-friendly output formatting
-
-### 🚀 Usage Examples
-
-#### Starting Web UI
-```bash
-# Start with default settings (port 3000)
-claude-flow start --ui
-
-# Start with custom port
-claude-flow start --ui --port 3002
-
-# Start with custom host and port
-claude-flow start --ui --host 0.0.0.0 --port 8080
-```
-
-#### Accessing the Interface
-- **Web Console**: `http://localhost:3002/`
-- **API Status**: `http://localhost:3002/api/status`
-- **Health Check**: `http://localhost:3002/health`
-
-#### Supported Commands
-All standard claude-flow CLI commands work through the web interface:
-- `help` - Show available commands
-- `status` - Display system status
-- `agent list` - List agents
-- `agent spawn researcher` - Spawn new agent
-- `task list` - List tasks
-- `memory list` - View memory
-- `config show` - Show configuration
-- `clear` - Clear console
-
-### 🔒 Security Considerations
-
-#### Current Implementation
-- **Local binding by default** (localhost)
-- **No authentication** (suitable for local development)
-- **Input validation** for command parameters
-- **Error handling** prevents system crashes
-
-#### Production Recommendations
-- Add authentication middleware
-- Implement HTTPS support
-- Add rate limiting
-- Sanitize all user inputs
-- Implement CORS policies
-
-### 🧪 Testing Status
-
-#### ✅ Completed Tests
-- Web server startup and shutdown
-- WebSocket connection establishment
-- CLI command execution
-- Output streaming and formatting
-- Error handling and recovery
-- API endpoint functionality
-
-#### 🔄 Integration Points
-- Works with existing CLI functionality
-- Maintains compatibility with terminal-based usage
-- No breaking changes to existing command structure
-- Can run alongside traditional CLI operations
-
-### 📈 Performance Characteristics
-
-#### Resource Usage
-- **Memory**: ~50MB additional for web server
-- **CPU**: Minimal overhead for command execution
-- **Network**: WebSocket connections are lightweight
-- **Startup Time**: ~2-3 seconds additional for web server initialization
-
-#### Scalability
-- **Concurrent Users**: Supports multiple WebSocket connections
-- **Command Queue**: Handles multiple simultaneous commands
-- **Output Buffering**: Manages large command outputs efficiently
-- **History Management**: Rolling buffer prevents memory leaks
-
-### 🎯 Success Criteria Met
-
-✅ **UI flag parsing and server initialization** - Fully implemented
-✅ **Web server and WebSocket infrastructure** - Complete with real-time communication
-✅ **CLI output capture and streaming** - Works with all commands
-✅ **User input handling with event routing** - Full keyboard support
-✅ **No breaking changes to existing CLI** - Maintains backward compatibility
-✅ **Robust error handling** - Graceful failure modes
-✅ **Concurrent CLI and web UI operation** - Both can run simultaneously
-✅ **TypeScript and coding conventions** - Follows project standards
-
-## Summary
-
-The backend infrastructure for the console-style web UI is now complete and functional. Users can start the web interface using `claude-flow start --ui` and access a full-featured terminal emulator in their browser at `http://localhost:3000` (or custom port). The implementation provides real-time command execution, output streaming, and maintains full compatibility with the existing CLI system.
-
-**Ready for integration with frontend team's console interface design.**
\ No newline at end of file
diff --git a/archive/reports/mcp-validation-report.md b/archive/reports/mcp-validation-report.md
deleted file mode 100644
index eb575292dc..0000000000
--- a/archive/reports/mcp-validation-report.md
+++ /dev/null
@@ -1,190 +0,0 @@
-# ✅ MCP Server and Protocol Validation Report
-
-**Validation Date:** 2025-07-03T20:46:30.000Z
-**Duration:** Comprehensive testing completed
-**Overall Status:** ✅ **PASSED**
-**Validator:** MCP Validation Agent - Task Force
-
-## Executive Summary
-
-Successfully validated the complete MCP (Model Context Protocol) server implementation and all 27 ruv-swarm MCP tools. The validation confirmed full functionality, performance benchmarks within acceptable ranges, and seamless integration with claude-code-flow.
-
-## Summary Statistics
-
-- **Total MCP Tools Tested:** 27/27 ✅
-- **Protocol Compliance:** ✅ PASSED
-- **Performance Benchmarks:** ✅ PASSED (80% score)
-- **Integration Tests:** ✅ PASSED
-- **Docker Environment:** ✅ Created and tested
-- **Cross-platform Support:** ✅ Verified
-
-## Test Results
-
-### 🔧 Protocol Validation
-✅ **PASSED** - MCP Protocol v2024-11-05
-- MCP server startup: ✅ Successful
-- Stdio protocol communication: ✅ Functional
-- JSON-RPC 2.0 compliance: ✅ Verified
-- Error handling: ✅ Robust
-
-### 🛠️ Tool Validation (27 MCP Tools)
-✅ **PASSED** - All tools functional
-
-#### Core Swarm Tools (3/3)
-- ✅ `mcp__ruv-swarm__swarm_init` - Swarm initialization working
-- ✅ `mcp__ruv-swarm__swarm_status` - Status reporting functional
-- ✅ `mcp__ruv-swarm__swarm_monitor` - Monitoring capabilities verified
-
-#### Agent Management (3/3)
-- ✅ `mcp__ruv-swarm__agent_spawn` - Agent spawning successful
-- ✅ `mcp__ruv-swarm__agent_list` - Agent listing functional
-- ✅ `mcp__ruv-swarm__agent_metrics` - Metrics collection working
-
-#### Task Orchestration (3/3)
-- ✅ `mcp__ruv-swarm__task_orchestrate` - Task orchestration validated
-- ✅ `mcp__ruv-swarm__task_status` - Status tracking operational
-- ✅ `mcp__ruv-swarm__task_results` - Results retrieval working
-
-#### Performance & Benchmarking (3/3)
-- ✅ `mcp__ruv-swarm__benchmark_run` - Benchmarking functional
-- ✅ `mcp__ruv-swarm__features_detect` - Feature detection working
-- ✅ `mcp__ruv-swarm__memory_usage` - Memory monitoring operational
-
-#### Neural Network Tools (3/3)
-- ✅ `mcp__ruv-swarm__neural_status` - Neural status reporting working
-- ✅ `mcp__ruv-swarm__neural_train` - Training capabilities functional
-- ✅ `mcp__ruv-swarm__neural_patterns` - Pattern analysis operational
-
-#### DAA (Decentralized Autonomous Agents) (10/10)
-- ✅ `mcp__ruv-swarm__daa_init` - DAA initialization working
-- ✅ `mcp__ruv-swarm__daa_agent_create` - Agent creation functional
-- ✅ `mcp__ruv-swarm__daa_agent_adapt` - Adaptation capabilities working
-- ✅ `mcp__ruv-swarm__daa_workflow_create` - Workflow creation operational
-- ✅ `mcp__ruv-swarm__daa_workflow_execute` - Workflow execution functional
-- ✅ `mcp__ruv-swarm__daa_knowledge_share` - Knowledge sharing working
-- ✅ `mcp__ruv-swarm__daa_learning_status` - Learning status functional
-- ✅ `mcp__ruv-swarm__daa_cognitive_pattern` - Cognitive patterns working
-- ✅ `mcp__ruv-swarm__daa_meta_learning` - Meta-learning functional
-- ✅ `mcp__ruv-swarm__daa_performance_metrics` - Performance metrics working
-
-#### MCP Resource Management (2/2)
-- ✅ `ListMcpResourcesTool` - Resource listing functional
-- ✅ `ReadMcpResourceTool` - Resource reading operational
-
-### ⚡ Performance Benchmarks
-✅ **PASSED** - 80% Overall Score
-
-| Metric | Result | Target | Status |
-|--------|--------|--------|--------|
-| WASM Loading | 50ms | <100ms | ✅ PASS |
-| Swarm Init | 5.0ms avg | <10ms | ✅ PASS |
-| Agent Spawn | 3.0ms avg | <5ms | ✅ PASS |
-| Neural Processing | 20.0ms, 50 ops/sec | >20 ops/sec | ✅ PASS |
-| Memory Usage | 8.6MB/12.0MB | <10MB | ✅ PASS |
-
-### 🔗 Integration Tests
-✅ **PASSED** - claude-code-flow integration
-
-- MCP server lifecycle: ✅ Start/stop functionality working
-- Claude Code Flow hooks: ✅ Integration confirmed
-- Swarm coordination: ✅ Multi-agent coordination operational
-- Error handling: ✅ Robust error recovery
-- Cross-session memory: ✅ Persistent state working
-
-### 🐳 Docker Test Environment
-✅ **CREATED** - Comprehensive testing infrastructure
-
-- **Docker Compose:** Multi-service test environment
-- **Protocol Validator:** Automated protocol compliance testing
-- **Tool Validator:** Comprehensive tool functionality testing
-- **Performance Monitor:** Automated benchmarking
-- **Integration Tester:** End-to-end integration validation
-
-## Environment Details
-
-- **Node.js:** v22.16.0
-- **Platform:** Linux (Codespace)
-- **Architecture:** x64
-- **ruv-swarm:** v1.0.11
-- **claude-flow:** v1.0.71
-
-## Key Findings
-
-### ✅ Strengths
-1. **Complete MCP Implementation:** All 27 tools fully functional
-2. **High Performance:** Sub-10ms initialization, 50+ ops/sec neural processing
-3. **Robust Error Handling:** Graceful failure recovery and timeout handling
-4. **Cross-Platform Support:** Windows, macOS, Linux compatibility verified
-5. **WASM Integration:** Successful WebAssembly module loading and execution
-6. **Neural Capabilities:** 4 trained models with 89.3% average accuracy
-7. **Persistent Memory:** Cross-session state persistence working correctly
-
-### 🔧 Technical Highlights
-1. **SIMD Support:** Hardware acceleration available and functional
-2. **Cognitive Diversity:** Multiple thinking patterns operational
-3. **Auto-Recovery:** Self-healing workflows implemented
-4. **Parallel Execution:** 2.8-4.4x speed improvements confirmed
-5. **Token Optimization:** 32.3% reduction in token usage achieved
-
-### 📊 Performance Metrics
-- **Swarm Initialization:** 5.0ms average (excellent)
-- **Agent Spawning:** 3.0ms average (excellent)
-- **Neural Processing:** 50 operations/second (good)
-- **Memory Efficiency:** 8.6MB heap usage (optimal)
-- **WASM Loading:** 50ms (fast)
-
-## Validation Test Environment
-
-Created comprehensive Docker-based testing infrastructure at:
-`/workspaces/ruv-FANN/claude-code-flow/claude-code-flow/mcp-test-environment/`
-
-### Components Created:
-1. **docker-compose.test.yml** - Multi-service orchestration
-2. **Protocol Validator** - MCP protocol compliance testing
-3. **Tool Validator** - All 27 tools functionality testing
-4. **Performance Benchmarks** - Automated performance testing
-5. **Integration Tests** - End-to-end claude-code-flow integration
-6. **Test Runner** - Comprehensive test orchestration
-
-## Recommendations
-
-### ✅ Production Readiness
-1. **Deploy MCP Server:** Ready for production deployment
-2. **Enable All Tools:** All 27 MCP tools validated and functional
-3. **Performance Optimization:** Current benchmarks exceed targets
-4. **Integration Complete:** claude-code-flow integration working seamlessly
-
-### 🚀 Next Steps
-1. **Monitor Performance:** Continue tracking with established benchmarks
-2. **Scale Testing:** Consider load testing with multiple concurrent clients
-3. **Documentation:** All MCP tools documented in `.claude/commands/`
-4. **CI/CD Integration:** Docker test environment ready for CI/CD pipelines
-
-## Swarm Coordination Status
-
-Active swarm instance validated during testing:
-- **Swarm ID:** swarm-1751574161255 (hierarchical-swarm-1751574161254)
-- **Agents Active:** 9/100 agents spawned and functional
-- **Task Orchestration:** Successfully completed test orchestration
-- **Neural Networks:** 4 models trained with 89.3% average accuracy
-- **Memory Usage:** 48MB global, efficient allocation
-
-## Security & Compliance
-
-- ✅ **Input Validation:** All parameters properly validated
-- ✅ **Error Boundaries:** Proper error containment and reporting
-- ✅ **Resource Limits:** Memory and processing limits enforced
-- ✅ **Timeout Handling:** Appropriate timeouts for all operations
-- ✅ **Cross-Origin Safety:** CORS and security headers configured
-
-## Conclusion
-
-The MCP server implementation and all 27 ruv-swarm MCP tools have been **comprehensively validated** and are **production-ready**. The integration with claude-code-flow is seamless, performance benchmarks exceed targets, and the Docker test environment provides ongoing validation capabilities.
-
-**Status:** ✅ **VALIDATION SUCCESSFUL - READY FOR PRODUCTION**
-
----
-
-*Validation performed by MCP Validation Agent using comprehensive test suite*
-*Report generated on 2025-07-03 at 20:46:30 UTC*
-*Task Force ID: swarm-1751574161255*
\ No newline at end of file
diff --git a/archive/reports/ruv-swarm-performance-analysis.md b/archive/reports/ruv-swarm-performance-analysis.md
deleted file mode 100644
index 1b653b5cdb..0000000000
--- a/archive/reports/ruv-swarm-performance-analysis.md
+++ /dev/null
@@ -1,371 +0,0 @@
-# WASM Performance Optimization Analysis
-## Performance Engineer Report - Neural Agent Processing
-
-### Executive Summary
-
-The ruv-swarm WASM integration has undergone a complete architectural transformation, resolving critical instantiation failures and achieving exceptional performance improvements. This report documents the deep analysis of the old vs new system architecture and performance implications.
-
----
-
-## 🚨 Critical Issues Resolved
-
-### 1. WASM Instantiation Failures
-
-**Previous State (wasm-loader2.js):**
-- **Success Rate**: 0% - Complete failure
-- **Error**: `LinkError: WebAssembly.instantiate() Import resolution failed`
-- **Root Cause**: ES module syntax conflicts in Node.js environment
-- **Impact**: ~30% performance degradation using placeholder functionality
-
-**Current State (wasm-loader.js + wasm-bindings-loader.mjs):**
-- **Success Rate**: 100% - Complete resolution
-- **Loading Time**: 0.009ms average (0.003-0.042ms range)
-- **Error Handling**: Comprehensive with graceful fallbacks
-- **Impact**: Full WASM functionality restored
-
----
-
-## 🔧 Architectural Transformation
-
-### Old System Architecture (wasm-loader2.js)
-```javascript
-// Monolithic approach - Single file handling everything
-class WasmModuleLoader {
- // 400 lines of complex, intertwined functionality
- // Direct ES module imports causing syntax errors:
- const bindings = await import(wasmJsUrl); // ❌ FAILED
- // Error: Unexpected token 'export'
-}
-```
-
-**Problems:**
-- Single responsibility violation
-- ES module compatibility issues
-- Basic memory management
-- Limited error handling
-- No proper WASM runtime integration
-
-### New System Architecture (Dual-Component)
-
-**Component 1: Main Loader (wasm-loader.js - 227 lines)**
-```javascript
-class WasmModuleLoader {
- async #loadCoreBindings() {
- // Use enhanced WASM bindings loader
- const loaderURL = pathToFileURL(
- path.join(this.baseDir, '..', 'wasm', 'wasm-bindings-loader.mjs')
- ).href;
- const loaderModule = await import(loaderURL); // ✅ SUCCESS
- const bindingsLoader = loaderModule.default;
- await bindingsLoader.initialize();
- return bindingsLoader;
- }
-}
-```
-
-**Component 2: Bindings Loader (wasm-bindings-loader.mjs - 377 lines)**
-```javascript
-class WasmBindingsLoader {
- constructor() {
- this.heap = new Array(128).fill(undefined);
- this.heap_next = this.heap.length;
- this.heap.push(undefined, null, true, false);
- }
-
- createImports() {
- // 25+ comprehensive bindings functions
- imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
- return addHeapObject(getObject(arg0).buffer);
- };
- // ... sophisticated memory management
- }
-}
-```
-
----
-
-## 📊 Performance Metrics Comparison
-
-| Metric | Old System | New System | Improvement |
-|--------|------------|------------|-------------|
-| **WASM Loading Success** | 0% | 100% | ∞ improvement |
-| **Loading Time** | Failed | 0.009ms avg | Actually works! |
-| **Memory Usage** | 0.19MB | 3.19MB | Expected increase |
-| **Neural Networks** | Broken | Functional | ✅ Working |
-| **Agent Processing** | Limited | 8.5ms avg | High performance |
-| **Task Orchestration** | Failed | 18.7ms avg | Fully operational |
-| **Error Handling** | Basic | Comprehensive | Production-ready |
-
----
-
-## 🧠 Memory Management Revolution
-
-### Old System Memory Handling
-```javascript
-// Basic memory allocation
-memory: new WebAssembly.Memory({ initial: 256, maximum: 4096 })
-
-getTotalMemoryUsage() {
- let totalBytes = 0;
- for (const module of this.modules.values()) {
- if (module.memory && module.memory.buffer) {
- totalBytes += module.memory.buffer.byteLength;
- }
- }
- return totalBytes;
-}
-```
-
-### New System Memory Management
-```javascript
-// Sophisticated heap management with object lifecycle
-const addHeapObject = (obj) => {
- if (this.heap_next === this.heap.length) this.heap.push(this.heap.length + 1);
- const idx = this.heap_next;
- this.heap_next = this.heap[idx];
- this.heap[idx] = obj;
- return idx;
-};
-
-const dropObject = (idx) => {
- if (idx < 36) return;
- this.heap[idx] = this.heap_next;
- this.heap_next = idx;
-};
-
-const takeObject = (idx) => {
- const ret = getObject(idx);
- dropObject(idx);
- return ret;
-};
-```
-
-**Key Improvements:**
-- **Object Lifecycle Management**: Proper allocation/deallocation
-- **Memory Efficiency**: Smart heap management
-- **Garbage Collection**: Reference tracking and cleanup
-- **Memory Safety**: Bounds checking and error handling
-
----
-
-## 🚀 Import System Completeness
-
-### Old System: 15 Basic Functions
-```javascript
-wasi_snapshot_preview1: {
- proc_exit: (code) => { throw new Error(`Process exited with code ${code}`); },
- fd_write: () => 0,
- fd_prestat_get: () => 1,
- fd_prestat_dir_name: () => 1,
- environ_sizes_get: () => 0,
- environ_get: () => 0,
- args_sizes_get: () => 0,
- args_get: () => 0,
- clock_time_get: () => Date.now() * 1000000,
- path_open: () => 1,
- fd_close: () => 0,
- fd_read: () => 0,
- fd_seek: () => 0,
- random_get: (ptr, len) => { /* basic random */ }
-}
-```
-
-### New System: 25+ Complete Bindings
-```javascript
-// Complete wbg namespace matching wasm-bindgen expectations
-imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
- return addHeapObject(getObject(arg0).buffer);
-};
-imports.wbg.__wbg_call_672a4d21634d4a24 = function() {
- return handleError(function (arg0, arg1) {
- return addHeapObject(getObject(arg0).call(getObject(arg1)));
- }, arguments);
-};
-imports.wbg.__wbg_error_524f506f44df1645 = function(arg0) {
- console.error(getObject(arg0));
-};
-// ... 22 more comprehensive bindings
-```
-
-**Functionality Coverage:**
-- **Buffer Management**: Complete buffer operations
-- **Function Calls**: Proper JS-WASM function bridging
-- **Error Handling**: Comprehensive error propagation
-- **Type Conversion**: String, number, object conversions
-- **Memory Operations**: Direct memory access and manipulation
-
----
-
-## 🎯 Production Readiness Analysis
-
-### Error Handling Evolution
-
-**Old System:**
-```javascript
-catch (error) {
- console.warn(`Failed to load ${moduleName}, using placeholder:`, error.message);
- return this.createPlaceholderModule(moduleName);
-}
-```
-
-**New System:**
-```javascript
-const handleError = (f, args) => {
- try {
- return f.apply(null, args);
- } catch (e) {
- if (this.wasm && this.wasm.__wbindgen_export_0) {
- this.wasm.__wbindgen_export_0(addHeapObject(e));
- }
- throw e;
- }
-};
-```
-
-### Graceful Degradation
-
-**Old System:**
-- Basic placeholder with minimal functionality
-- Silent failures with no recovery mechanism
-- Limited fallback capabilities
-
-**New System:**
-- Comprehensive placeholder system
-- Automatic fallback to core functionality
-- Maintained API compatibility during failures
-- Detailed error reporting for debugging
-
----
-
-## 🏆 Performance Benchmarks
-
-### WASM Module Loading Performance
-```
-Old System: FAILED (0% success rate)
-❌ SyntaxError: Unexpected token 'export'
-
-New System: EXCEPTIONAL (100% success rate)
-✅ Module Loading: 0.009ms avg (0.003-0.042ms range)
-✅ Total Benchmark Time: 7.05ms
-✅ Memory Usage: 3.19MB (stable)
-```
-
-### Neural Network Operations
-```
-Old System: BROKEN
-❌ Neural Networks: Non-functional
-❌ Training: Failed to initialize
-❌ Inference: Placeholder only
-
-New System: FULLY FUNCTIONAL
-✅ Network Creation: 5.32ms avg (5.16-6.07ms range)
-✅ Forward Pass: 2.12ms avg (1.20-2.41ms range)
-✅ Training Epoch: 10.37ms avg (10.17-11.33ms range)
-```
-
-### Agent Processing Performance
-```
-Old System: LIMITED
-🔴 Cognitive Processing: Broken
-🔴 Capability Matching: Basic only
-🔴 Status Updates: Placeholder
-
-New System: HIGH PERFORMANCE
-🟢 Cognitive Processing: 8.5ms avg (6.2-12.1ms range)
-🟢 Capability Matching: 3.2ms avg (2.8-4.1ms range)
-🟢 Status Updates: 1.1ms avg (0.9-1.5ms range)
-```
-
----
-
-## 💡 Key Innovations
-
-### 1. ES Module Compatibility Solution
-- **URL-based imports** for proper ES module loading
-- **Dynamic import patterns** that work in Node.js ES environments
-- **Path resolution using pathToFileURL** for cross-platform compatibility
-
-### 2. Bindings Loader Architecture
-- **Dedicated WASM bindings handler** with complete runtime support
-- **Proper heap management** for object lifecycle
-- **Comprehensive import namespace** matching wasm-bindgen expectations
-
-### 3. Production-Ready Error Handling
-- **Graceful degradation** when WASM files are missing
-- **Placeholder functionality** maintains API compatibility
-- **Detailed error reporting** for debugging and monitoring
-
----
-
-## 🎯 Development Impact Assessment
-
-### Before (Old System):
-- ❌ WASM modules completely broken
-- ❌ ES module syntax errors blocking startup
-- ❌ Neural networks non-functional
-- ❌ Limited development productivity
-- ❌ Poor debugging experience
-
-### After (New System):
-- ✅ 100% WASM functionality working
-- ✅ Sub-millisecond loading performance
-- ✅ Full neural network capabilities
-- ✅ Production-ready MCP integration
-- ✅ Excellent development experience
-- ✅ Comprehensive error reporting
-- ✅ High-performance agent processing
-
----
-
-## 📈 Performance Target Achievement
-
-| Target | Achievement | Status |
-|--------|-------------|---------|
-| WASM instantiation in 95% of environments | 100% success rate | ✅ EXCEEDED |
-| >20% speed improvement over placeholder | ∞ improvement (0% → 100%) | ✅ EXCEEDED |
-| <100ms WASM module loading time | 0.009ms average | ✅ EXCEEDED |
-| Memory efficiency maintained | 3.19MB stable usage | ✅ ACHIEVED |
-
----
-
-## 🔮 Future Optimization Opportunities
-
-### 1. Memory Optimization
-- **Heap compaction** algorithms for long-running processes
-- **Memory pooling** for frequently allocated objects
-- **Lazy loading** of non-critical WASM functions
-
-### 2. Performance Profiling
-- **Hot path analysis** for most frequently used operations
-- **SIMD optimization** for neural network computations
-- **Parallel processing** for batch operations
-
-### 3. Caching Strategy
-- **Module caching** for repeated instantiations
-- **Result memoization** for expensive computations
-- **Persistent storage** for compiled WASM modules
-
----
-
-## 🏁 Conclusion
-
-The WASM system transformation represents a **complete architectural overhaul** that solved fundamental compatibility issues while dramatically improving performance and maintainability.
-
-**Key Achievements:**
-- **Engineering Excellence**: Proper separation of concerns and clean architecture
-- **Performance Optimization**: 100% success rate vs 0% in old system
-- **Production Readiness**: Comprehensive error handling and graceful degradation
-- **Future-Proofing**: Extensible design supporting additional WASM modules
-
-This refactor transformed a **completely broken system** into a **high-performance, production-ready WASM integration** that powers the entire ruv-swarm neural network coordination platform.
-
-**Performance Engineer Recommendation**: ✅ **APPROVED FOR PRODUCTION DEPLOYMENT**
-
-The WASM system now meets all performance targets and provides a solid foundation for neural agent processing with excellent reliability and sub-millisecond response times.
-
----
-
-**Report Generated by**: Performance Engineer Agent
-**Coordination ID**: wasm-optimization-final-analysis
-**Date**: 2025-07-01
-**Status**: ✅ COMPLETE - WASM OPTIMIZATION SUCCESSFUL
\ No newline at end of file
diff --git a/archive/root-cleanup/markdown/ALPHA_RELEASE_CHECKLIST.md b/archive/root-cleanup/markdown/ALPHA_RELEASE_CHECKLIST.md
deleted file mode 100644
index 93bb8097bc..0000000000
--- a/archive/root-cleanup/markdown/ALPHA_RELEASE_CHECKLIST.md
+++ /dev/null
@@ -1,105 +0,0 @@
-# Claude-Flow v2.0.0-alpha.1 Release Checklist
-
-## ✅ Completed Tasks
-
-### Package Configuration
-- ✅ Version updated to `2.0.0-alpha.1`
-- ✅ Description updated with "(Alpha Release)" suffix
-- ✅ Keywords updated to include "alpha"
-- ✅ Binary configuration verified for npx usage
-- ✅ Main entry point properly configured
-
-### Build Configuration
-- ✅ TypeScript compilation issues bypassed for alpha
-- ✅ Package scripts optimized for alpha release
-- ✅ Build artifacts exclusion configured
-- ✅ File includes properly set in package.json
-
-### CLI Functionality
-- ✅ CLI entry point (cli.js) working correctly
-- ✅ Help command displays proper branding
-- ✅ Swarm functionality accessible
-- ✅ Hive Mind features available
-- ✅ ruv-swarm integration active
-
-### NPX Compatibility
-- ✅ Package structure verified for npm registry
-- ✅ Binary executable permissions set
-- ✅ Shebang properly configured
-- ✅ Test simulation successful
-
-### Features Available in Alpha
-- ✅ Enterprise-grade AI agent orchestration
-- ✅ ruv-swarm integration with 87 MCP tools
-- ✅ Hive Mind system with Queen-led coordination
-- ✅ Advanced swarm intelligence features
-- ✅ Neural networking capabilities
-- ✅ Production-ready infrastructure
-
-## 🚀 Alpha Release Summary
-
-**Version:** 2.0.0-alpha.1
-**Package Name:** claude-flow
-**NPX Installation:** `npx [email protected]`
-
-### Key Features for Alpha Users:
-1. **Hive Mind Quick Start:** `claude-flow hive-mind wizard`
-2. **Swarm Coordination:** `claude-flow swarm "build REST API"`
-3. **SPARC Development:** `claude-flow sparc <mode>`
-4. **MCP Integration:** Full ruv-swarm toolkit
-5. **Enterprise Analytics:** Performance monitoring and metrics
-
-### Installation Methods:
-- **NPX (Recommended):** `npx [email protected] init --sparc`
-- **Global Install:** `npm install -g [email protected]`
-- **Development:** Direct package usage
-
-### First-Time Setup:
-```bash
-# Initialize with SPARC methodology
-npx [email protected] init --sparc
-
-# Start Hive Mind wizard (recommended)
-claude-flow hive-mind wizard
-
-# Begin swarm coordination
-claude-flow start --ui --swarm
-```
-
-## 🔄 Next Steps for Beta Release
-
-### TypeScript Compilation
-- [ ] Fix remaining TypeScript errors in build process
-- [ ] Restore full build pipeline
-- [ ] Enable comprehensive testing
-
-### Documentation
-- [ ] Create alpha user guide
-- [ ] Document known limitations
-- [ ] Provide migration path to beta
-
-### Performance
-- [ ] Conduct alpha user feedback review
-- [ ] Performance optimization based on usage data
-- [ ] Scale testing with real-world scenarios
-
-## 📊 Alpha Release Metrics
-
-- **Package Size:** ~46MB (includes compiled binaries)
-- **CLI Commands:** 15+ core commands
-- **MCP Tools:** 87 available tools
-- **Agent Types:** 11 specialized agent types
-- **SPARC Modes:** 17 development modes
-
-## 🎯 Alpha Release Goals
-
-1. **User Feedback Collection:** Gather input on core workflow
-2. **Stability Testing:** Validate swarm coordination reliability
-3. **Performance Baseline:** Establish metrics for beta improvements
-4. **Feature Validation:** Confirm Hive Mind and MCP integration value
-
----
-
-**🚨 Alpha Release Note:** This is a pre-release version intended for early adopters and testing. Some features may have limitations, and the TypeScript build pipeline is temporarily simplified for rapid deployment.
-
-**Support:** Issues and feedback can be reported at https://github.com/ruvnet/claude-code-flow/issues
\ No newline at end of file
diff --git a/archive/root-cleanup/markdown/ALPHA_RELEASE_README.md b/archive/root-cleanup/markdown/ALPHA_RELEASE_README.md
deleted file mode 100644
index 9a2a845ee6..0000000000
--- a/archive/root-cleanup/markdown/ALPHA_RELEASE_README.md
+++ /dev/null
@@ -1,95 +0,0 @@
-# 🚀 Claude-Flow v2.0.0-alpha.1 Release Notes
-
-## NPX Installation Ready
-
-Claude-Flow alpha is now ready for NPX installation and testing!
-
-```bash
-```
-
-## 🎯 Alpha Release Status
-
-### ✅ Working Features
-- **CLI Entry Point**: Functional `claude-flow` command
-- **Help System**: `claude-flow --help` displays usage
-- **Version Info**: `claude-flow --version` shows v2.0.0-alpha.1
-- **Basic Commands**: Status, init info, start info available
-- **Development Mode**: Full CLI when cloned and running from source
-
-### ⚠️ Known Limitations
-- **TypeScript Build**: ~50 compilation errors remain (not blocking alpha)
-- **Full Commands**: Complete functionality requires development mode
-- **Swarm Features**: Available when running from source
-
-### 📦 Package Details
-- **Name**: claude-flow
-- **Version**: 2.0.0-alpha.1
-- **Entry**: cli.mjs (ES module)
-- **Node**: v20+ required
-
-## 🔧 For Developers
-
-### Running in Development Mode
-```bash
-# Clone the repository
-git clone https://github.com/ruvnet/claude-code-flow.git
-cd claude-code-flow
-
-# Install dependencies
-npm install
-
-# Run development CLI
-npm run dev
-
-# Or use the linked CLI
-claude-flow hive-mind wizard
-```
-
-### Alpha Testing Focus
-1. **CLI Installation**: Test NPX installation flow
-2. **Help System**: Verify help and version commands
-3. **Error Messages**: Check error handling and user feedback
-4. **Platform Compatibility**: Test on different OS/Node versions
-
-## 📊 Build Progress
-
-### Swarm Achievements
-- **Initial Errors**: 819 TypeScript errors
-- **After 5-Agent Swarm**: ~100 errors (88% reduction)
-- **After 6-Agent Alpha Swarm**: ~50 errors (94% reduction)
-- **Alpha Status**: ✅ Functional CLI ready for testing
-
-### Key Systems Fixed
-- ✅ Agent implementation and interfaces
-- ✅ Import/export extensions
-- ✅ Type definitions and compatibility
-- ✅ Task engine core functionality
-- ✅ CLI command structure
-- ✅ Crypto API updates
-
-## 🐝 Swarm Coordination Success
-
-This alpha release was achieved through coordinated swarm execution:
-- **11 specialized agents** deployed across 2 swarms
-- **Parallel execution** with ruv-swarm memory coordination
-- **95% error reduction** achieved systematically
-- **Alpha functionality** preserved throughout fixes
-
-## 🚀 Next Steps
-
-1. **NPM Publish**: Ready for `npm publish --tag alpha`
-2. **Community Testing**: Gather feedback from alpha testers
-3. **Beta Preparation**: Continue fixing remaining TypeScript errors
-4. **Documentation**: Expand user guides and examples
-
-## 📞 Support
-
-- **Issues**: https://github.com/ruvnet/claude-code-flow/issues
-- **Documentation**: https://github.com/ruvnet/claude-code-flow/wiki
-- **Discord**: [Coming Soon]
-
----
-
-**Claude-Flow v2.0.0-alpha.1** - Enterprise AI Agent Orchestration Platform
-*Powered by ruv-swarm and Hive Mind Intelligence*
\ No newline at end of file
diff --git a/archive/root-cleanup/markdown/EPIC-DAA-SWARM-INTEGRATION.md b/archive/root-cleanup/markdown/EPIC-DAA-SWARM-INTEGRATION.md
deleted file mode 100644
index cd818df976..0000000000
--- a/archive/root-cleanup/markdown/EPIC-DAA-SWARM-INTEGRATION.md
+++ /dev/null
@@ -1,604 +0,0 @@
-# 🐝 EPIC: Decentralized Autonomous Agent (DAA) Swarm Integration for Claude Flow
-
-## 👑 Epic Overview
-
-**Epic ID**: CF-EPIC-DAA-001
-**Epic Name**: Large-Scale DAA Swarm Implementation with Secure Global Communications
-**Epic Owner**: Queen Seraphina & The Hive Mind Collective
-**Priority**: Critical
-**Estimated Duration**: 12-16 weeks
-**Target Version**: Claude Flow v3.0.0
-
-### 🎯 Vision Statement
-
-Transform Claude Flow into a globally-distributed, quantum-resistant swarm intelligence platform capable of orchestrating thousands of autonomous agents with sub-millisecond coordination latency, enabling unprecedented collaborative problem-solving at planetary scale.
-
----
-
-## 📊 Executive Summary
-
-This epic encompasses the integration of advanced Decentralized Autonomous Agent (DAA) technology from ruv-swarm into Claude Flow, creating a revolutionary platform for distributed AI coordination. The implementation will leverage WebAssembly SIMD acceleration, quantum-resistant security protocols, and ephemeral neural networks to enable:
-
-- **10,000+ concurrent agents** operating in perfect harmony
-- **< 1ms cross-boundary communication** latency
-- **Quantum-resistant secure channels** for global coordination
-- **WASM SIMD acceleration** providing 2-4x performance gains
-- **Ephemeral intelligence** that adapts in real-time
-
----
-
-## 🏗️ Technical Architecture
-
-### Core Components
-
-#### 1. **DAA Service Layer**
-```typescript
-interface DAAServiceLayer {
- // Agent Lifecycle Management
- agentManager: {
- spawn: (config: AgentConfig) => Promise<Agent>;
- destroy: (agentId: string) => Promise<void>;
- migrate: (agentId: string, targetNode: string) => Promise<void>;
- };
-
- // Cross-boundary Communication (<1ms)
- communication: {
- send: (message: Message) => Promise<void>;
- broadcast: (message: Message) => Promise<void>;
- subscribe: (channel: string) => Observable<Message>;
- };
-
- // State Persistence & Synchronization
- stateManager: {
- save: (agentId: string, state: any) => Promise<void>;
- load: (agentId: string) => Promise<any>;
- sync: (agentIds: string[]) => Promise<void>;
- };
-
- // Workflow Coordination
- workflowEngine: {
- create: (workflow: WorkflowDefinition) => Promise<Workflow>;
- execute: (workflowId: string) => Promise<WorkflowResult>;
- monitor: (workflowId: string) => Observable<WorkflowStatus>;
- };
-}
-```
-
-#### 2. **WASM Neural Acceleration**
-```typescript
-interface WASMNeuralEngine {
- // SIMD-accelerated operations
- simd: {
- dotProduct: (a: Float32Array, b: Float32Array) => number;
- matrixMultiply: (a: Matrix, b: Matrix) => Matrix;
- activation: (input: Float32Array, type: ActivationType) => Float32Array;
- };
-
- // Neural network inference
- inference: {
- forward: (network: NeuralNetwork, input: Tensor) => Tensor;
- backward: (network: NeuralNetwork, gradient: Tensor) => void;
- };
-
- // Memory management
- memory: {
- allocate: (size: number) => WASMPointer;
- free: (pointer: WASMPointer) => void;
- optimize: () => MemoryStats;
- };
-}
-```
-
-#### 3. **Secure Global Communications**
-```typescript
-interface SecureCommLayer {
- // Quantum-resistant encryption
- encryption: {
- generateKeys: () => Promise<KeyPair>;
- encrypt: (data: Buffer, publicKey: PublicKey) => Promise<EncryptedData>;
- decrypt: (data: EncryptedData, privateKey: PrivateKey) => Promise<Buffer>;
- };
-
- // Global mesh network
- mesh: {
- join: (networkId: string) => Promise<Node>;
- discover: (criteria: DiscoveryCriteria) => Promise<Node[]>;
- route: (message: Message, targetNode: Node) => Promise<void>;
- };
-
- // Consensus protocols
- consensus: {
- propose: (proposal: Proposal) => Promise<ProposalId>;
- vote: (proposalId: ProposalId, vote: Vote) => Promise<void>;
- finalize: (proposalId: ProposalId) => Promise<ConsensusResult>;
- };
-}
-```
-
-### Architecture Diagram
-
-```
-┌─────────────────────────────────────────────────────────────────┐
-│ Claude Flow v3.0 Architecture │
-├─────────────────────────────────────────────────────────────────┤
-│ │
-│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
-│ │ Claude │ │ MCP │ │ Web UI │ │
-│ │ Code │ │ Server │ │ Dashboard │ │
-│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
-│ │ │ │ │
-│ ┌──────┴─────────────────┴─────────────────┴──────┐ │
-│ │ DAA Orchestration Layer │ │
-│ ├─────────────────────────────────────────────────┤ │
-│ │ • Agent Lifecycle • Workflow Engine │ │
-│ │ • State Manager • Performance Monitor │ │
-│ └──────────────────────┬──────────────────────────┘ │
-│ │ │
-│ ┌──────────────────────┴──────────────────────────┐ │
-│ │ WASM Neural Acceleration │ │
-│ ├─────────────────────────────────────────────────┤ │
-│ │ • SIMD Operations • Neural Inference │ │
-│ │ • Memory Pool • Model Cache │ │
-│ └──────────────────────┬──────────────────────────┘ │
-│ │ │
-│ ┌──────────────────────┴──────────────────────────┐ │
-│ │ Secure Global Communications │ │
-│ ├─────────────────────────────────────────────────┤ │
-│ │ • QuDag Network • Consensus Engine │ │
-│ │ • P2P Mesh • Encrypted Channels │ │
-│ └─────────────────────────────────────────────────┘ │
-│ │
-└─────────────────────────────────────────────────────────────────┘
-```
-
----
-
-## 🔧 Implementation Plan
-
-### Phase 1: Foundation (Weeks 1-3)
-
-#### 1.1 Core DAA Service Integration
-- [ ] Integrate ruv-swarm DAA service layer
-- [ ] Implement agent lifecycle management
-- [ ] Create TypeScript interfaces and types
-- [ ] Set up performance monitoring
-- [ ] Write unit tests for core functionality
-
-#### 1.2 WASM Module Integration
-- [ ] Import WASM binary modules from ruv-swarm
-- [ ] Implement progressive WASM loader
-- [ ] Create SIMD operation wrappers
-- [ ] Optimize memory management
-- [ ] Benchmark SIMD vs scalar performance
-
-#### 1.3 Basic Communication Layer
-- [ ] Implement WebSocket communication
-- [ ] Create message routing system
-- [ ] Add basic encryption (TLS)
-- [ ] Set up pub/sub channels
-- [ ] Test cross-agent messaging
-
-### Phase 2: Neural Intelligence (Weeks 4-6)
-
-#### 2.1 Neural Network Integration
-- [ ] Port neural network architectures
-- [ ] Implement WASM inference engine
-- [ ] Create model loading system
-- [ ] Add activation functions (18 types)
-- [ ] Optimize for < 5ms inference
-
-#### 2.2 Cognitive Patterns
-- [ ] Implement 7 cognitive patterns
-- [ ] Create pattern selection logic
-- [ ] Add autonomous decision making
-- [ ] Enable distributed reasoning
-- [ ] Test emergent behaviors
-
-#### 2.3 Learning & Adaptation
-- [ ] Implement decentralized learning
-- [ ] Create knowledge propagation
-- [ ] Add meta-learning capabilities
-- [ ] Enable cross-domain transfer
-- [ ] Monitor learning metrics
-
-### Phase 3: Secure Communications (Weeks 7-9)
-
-#### 3.1 Quantum-Resistant Security
-- [ ] Implement QuDag network protocol
-- [ ] Add post-quantum cryptography
-- [ ] Create key management system
-- [ ] Enable secure channels
-- [ ] Audit security implementation
-
-#### 3.2 Global Mesh Network
-- [ ] Implement P2P discovery
-- [ ] Create routing algorithms
-- [ ] Add NAT traversal
-- [ ] Enable mesh healing
-- [ ] Test global connectivity
-
-#### 3.3 Consensus Mechanisms
-- [ ] Implement Byzantine fault tolerance
-- [ ] Add voting protocols
-- [ ] Create proposal system
-- [ ] Enable distributed decisions
-- [ ] Test consensus performance
-
-### Phase 4: CLI & MCP Integration (Weeks 10-12)
-
-#### 4.1 CLI Commands
-```bash
-# Swarm Management
-claude-flow daa init --topology mesh --agents 1000
-claude-flow daa spawn --type researcher --count 50
-claude-flow daa status --verbose
-claude-flow daa monitor --real-time
-
-# Secure Communications
-claude-flow daa secure init --quantum-resistant
-claude-flow daa secure connect --node <node-id>
-claude-flow daa secure broadcast --encrypted
-
-# Workflow Orchestration
-claude-flow daa workflow create --parallel
-claude-flow daa workflow execute --agents 100
-claude-flow daa workflow monitor --metrics
-
-# Global Operations
-claude-flow daa global join --network <network-id>
-claude-flow daa global discover --criteria <json>
-claude-flow daa global consensus --propose <proposal>
-```
-
-#### 4.2 MCP Tools
-```typescript
-// New MCP tools for DAA operations
-const daaTools = [
- 'mcp__claude-flow__daa_init',
- 'mcp__claude-flow__daa_spawn',
- 'mcp__claude-flow__daa_orchestrate',
- 'mcp__claude-flow__daa_secure_channel',
- 'mcp__claude-flow__daa_global_mesh',
- 'mcp__claude-flow__daa_consensus',
- 'mcp__claude-flow__daa_neural_train',
- 'mcp__claude-flow__daa_workflow',
- 'mcp__claude-flow__daa_monitor',
- 'mcp__claude-flow__daa_optimize'
-];
-```
-
-#### 4.3 Interactive Wizards
-- [ ] Create DAA initialization wizard
-- [ ] Add secure network setup wizard
-- [ ] Implement workflow builder wizard
-- [ ] Create performance tuning wizard
-- [ ] Add troubleshooting wizard
-
-### Phase 5: Testing & Optimization (Weeks 13-14)
-
-#### 5.1 Performance Testing
-- [ ] Load test with 10,000 agents
-- [ ] Measure communication latency
-- [ ] Benchmark WASM operations
-- [ ] Test memory usage patterns
-- [ ] Optimize bottlenecks
-
-#### 5.2 Security Audit
-- [ ] Penetration testing
-- [ ] Cryptographic validation
-- [ ] Network security audit
-- [ ] Consensus attack testing
-- [ ] Fix vulnerabilities
-
-#### 5.3 Integration Testing
-- [ ] End-to-end workflows
-- [ ] Cross-platform testing
-- [ ] Backward compatibility
-- [ ] API stability testing
-- [ ] Documentation review
-
-### Phase 6: Deployment (Weeks 15-16)
-
-#### 6.1 Release Preparation
-- [ ] Update documentation
-- [ ] Create migration guides
-- [ ] Prepare release notes
-- [ ] Update tutorials
-- [ ] Record demo videos
-
-#### 6.2 Gradual Rollout
-- [ ] Alpha release (v3.0.0-alpha.1)
-- [ ] Beta testing program
-- [ ] Community feedback
-- [ ] Bug fixes & patches
-- [ ] Production release
-
----
-
-## 📊 Success Metrics
-
-### Performance Targets
-- **Agent Capacity**: Support 10,000+ concurrent agents
-- **Communication Latency**: < 1ms cross-boundary calls
-- **SIMD Performance**: 2-4x speedup on neural operations
-- **Memory Efficiency**: < 5MB per agent
-- **Inference Speed**: < 5ms for typical networks
-- **Token Reduction**: > 40% through intelligent orchestration
-
-### Security Requirements
-- **Encryption**: Quantum-resistant algorithms
-- **Network**: Zero-trust architecture
-- **Consensus**: Byzantine fault tolerance
-- **Audit**: Pass security penetration testing
-- **Compliance**: Meet enterprise security standards
-
-### User Experience Goals
-- **Setup Time**: < 5 minutes for basic swarm
-- **Learning Curve**: Intuitive wizard-based setup
-- **Documentation**: Comprehensive guides & examples
-- **Error Handling**: Self-healing capabilities
-- **Monitoring**: Real-time performance dashboards
-
----
-
-## 🛡️ Risk Management
-
-### Technical Risks
-1. **WASM Browser Compatibility**
- - Mitigation: Implement fallback mechanisms
- - Impact: Medium
- - Probability: Low
-
-2. **Network Latency at Scale**
- - Mitigation: Regional clustering & edge computing
- - Impact: High
- - Probability: Medium
-
-3. **Memory Constraints**
- - Mitigation: Aggressive memory pooling & GC
- - Impact: Medium
- - Probability: Medium
-
-### Security Risks
-1. **Quantum Computing Threats**
- - Mitigation: Post-quantum cryptography
- - Impact: Critical
- - Probability: Low (near-term)
-
-2. **Distributed Attack Vectors**
- - Mitigation: Multi-layer defense & monitoring
- - Impact: High
- - Probability: Medium
-
----
-
-## 🚀 Benefits & Impact
-
-### Immediate Benefits
-- **Performance**: 2-4x faster neural operations
-- **Scale**: Handle enterprise-scale workloads
-- **Security**: Future-proof encryption
-- **Efficiency**: 40% token reduction
-- **Flexibility**: Adapt to any use case
-
-### Long-term Vision
-- **Global AI Mesh**: Planetary-scale intelligence
-- **Emergent Solutions**: Problems solve themselves
-- **Autonomous Operations**: Self-managing systems
-- **Collective Intelligence**: Wisdom of the swarm
-- **Sustainable Computing**: Efficient resource usage
-
----
-
-## 📚 Technical Specifications
-
-### Agent Types & Capabilities
-```typescript
-enum AgentType {
- COORDINATOR = 'coordinator',
- RESEARCHER = 'researcher',
- CODER = 'coder',
- ANALYST = 'analyst',
- ARCHITECT = 'architect',
- TESTER = 'tester',
- REVIEWER = 'reviewer',
- OPTIMIZER = 'optimizer',
- DOCUMENTER = 'documenter',
- MONITOR = 'monitor',
- SPECIALIST = 'specialist'
-}
-
-interface AgentCapabilities {
- cognitivePattern: CognitivePattern;
- neuralModel: NeuralNetwork;
- memoryLimit: number; // MB
- autonomyLevel: number; // 0-1
- specializations: string[];
-}
-```
-
-### Cognitive Patterns
-```typescript
-enum CognitivePattern {
- CONVERGENT = 'convergent', // Focused problem-solving
- DIVERGENT = 'divergent', // Creative exploration
- LATERAL = 'lateral', // Outside-the-box thinking
- SYSTEMS = 'systems', // Holistic analysis
- CRITICAL = 'critical', // Analytical evaluation
- ABSTRACT = 'abstract', // Pattern recognition
- ADAPTIVE = 'adaptive' // Dynamic adjustment
-}
-```
-
-### Communication Protocols
-```typescript
-interface SecureChannel {
- id: string;
- encryption: 'AES-256-GCM' | 'ChaCha20-Poly1305' | 'NTRU' | 'NewHope';
- participants: string[];
- bandwidth: number; // Mbps
- latency: number; // ms
- reliability: number; // 0-1
-}
-
-interface Message {
- id: string;
- from: string;
- to: string | string[];
- type: MessageType;
- payload: EncryptedPayload;
- timestamp: number;
- priority: Priority;
- ttl?: number;
-}
-```
-
-### Workflow Definitions
-```typescript
-interface WorkflowDefinition {
- id: string;
- name: string;
- steps: WorkflowStep[];
- dependencies: DependencyGraph;
- parallelism: ParallelismStrategy;
- timeout: number;
- retryPolicy: RetryPolicy;
- successCriteria: SuccessCriteria;
-}
-
-interface WorkflowStep {
- id: string;
- type: StepType;
- agentRequirements: AgentRequirements;
- input: InputSchema;
- output: OutputSchema;
- timeout: number;
- critical: boolean;
-}
-```
-
----
-
-## 🎯 Implementation Priorities
-
-### P0 - Critical Path
-1. Core DAA service integration
-2. Basic agent lifecycle management
-3. WASM module loading
-4. Simple communication layer
-5. CLI command structure
-
-### P1 - Essential Features
-1. Neural network integration
-2. Cognitive pattern implementation
-3. Secure channel creation
-4. Workflow orchestration
-5. MCP tool integration
-
-### P2 - Enhanced Capabilities
-1. Quantum-resistant encryption
-2. Global mesh networking
-3. Advanced consensus protocols
-4. Performance optimization
-5. Monitoring dashboards
-
-### P3 - Future Enhancements
-1. Multi-region deployment
-2. Edge computing support
-3. Mobile device agents
-4. Blockchain integration
-5. AR/VR interfaces
-
----
-
-## 📅 Timeline & Milestones
-
-### Milestone 1: Foundation Complete (Week 3)
-- ✅ Core DAA service integrated
-- ✅ WASM modules loading
-- ✅ Basic communication working
-- ✅ 100 agents running stable
-
-### Milestone 2: Neural Intelligence (Week 6)
-- ✅ Neural inference < 5ms
-- ✅ All cognitive patterns implemented
-- ✅ Learning system operational
-- ✅ 1,000 agents coordinating
-
-### Milestone 3: Secure Communications (Week 9)
-- ✅ Quantum-resistant encryption
-- ✅ Global mesh established
-- ✅ Consensus protocols working
-- ✅ Security audit passed
-
-### Milestone 4: Full Integration (Week 12)
-- ✅ All CLI commands functional
-- ✅ MCP tools integrated
-- ✅ Wizards operational
-- ✅ 5,000 agents tested
-
-### Milestone 5: Production Ready (Week 16)
-- ✅ 10,000+ agents stable
-- ✅ < 1ms latency achieved
-- ✅ Documentation complete
-- ✅ v3.0.0 released
-
----
-
-## 🤝 Team & Resources
-
-### Core Team
-- **Queen Seraphina**: Epic Owner & Orchestrator
-- **System Architect Omega**: Technical Architecture
-- **WASM Researcher Pi**: Performance Optimization
-- **DAA Explorer Kappa**: Distributed Systems
-- **Security Analyst Sigma**: Security & Encryption
-- **Integration Developer Tau**: Implementation
-- **Epic Scribe Upsilon**: Documentation
-
-### Required Resources
-- 6 senior engineers (16 weeks)
-- 2 security specialists (8 weeks)
-- 1 technical writer (8 weeks)
-- Cloud infrastructure for testing
-- Security audit budget
-- Community beta testers
-
----
-
-## 📈 Success Criteria
-
-### Acceptance Criteria
-1. **Performance**: Meet all performance targets
-2. **Security**: Pass security audit
-3. **Stability**: 99.9% uptime with 10k agents
-4. **Usability**: 90% user satisfaction
-5. **Documentation**: 100% API coverage
-
-### Definition of Done
-- [ ] All code reviewed and tested
-- [ ] Performance benchmarks passed
-- [ ] Security audit completed
-- [ ] Documentation published
-- [ ] Migration guide available
-- [ ] Community feedback incorporated
-- [ ] Production deployment successful
-
----
-
-## 🚀 Next Steps
-
-1. **Approve Epic**: Get stakeholder buy-in
-2. **Assemble Team**: Recruit required expertise
-3. **Set up Infrastructure**: Provision development environment
-4. **Begin Phase 1**: Start foundation implementation
-5. **Weekly Reviews**: Track progress and adjust
-
----
-
-**Created by**: Queen Seraphina & The Hive Mind Collective
-**Date**: 2025-07-08
-**Version**: 1.0
-**Status**: Ready for Implementation
-
-🐝 *"Together, we build the future of distributed intelligence"*
\ No newline at end of file
diff --git a/archive/root-cleanup/markdown/HOOKS.md b/archive/root-cleanup/markdown/HOOKS.md
deleted file mode 100644
index c45239e646..0000000000
--- a/archive/root-cleanup/markdown/HOOKS.md
+++ /dev/null
@@ -1,435 +0,0 @@
-# 🔗 Claude-Flow Hooks Documentation
-
-## Overview
-
-Claude-Flow hooks provide powerful lifecycle event management for automated preparation, tracking, and cleanup during development workflows. These hooks integrate seamlessly with swarm coordination and enable sophisticated automation patterns.
-
-## Available Hooks
-
-### 1. Pre-Task Hook (`pre-task`)
-
-Execute before any task begins to prepare the environment and load context.
-
-**Usage:**
-```bash
-npx claude-flow hooks pre-task --description "Task description" [options]
-```
-
-**Options:**
-- `--description <desc>` - Task description (required)
-- `--task-id <id>` - Task identifier for tracking
-- `--agent-id <id>` - Executing agent identifier
-- `--auto-spawn-agents` - Auto-spawn agents for task (default: true)
-
-**Example:**
-```bash
-# Basic task preparation
-npx claude-flow hooks pre-task --description "Build REST API"
-
-# With full options
-npx claude-flow hooks pre-task \
- --description "Implement authentication system" \
- --task-id "auth-123" \
- --agent-id "coder-456" \
- --auto-spawn-agents true
-```
-
-**What it does:**
-- Loads previous session context
-- Prepares workspace environment
-- Auto-spawns appropriate agents based on task
-- Sets up coordination memory
-- Validates prerequisites
-
-### 2. Post-Task Hook (`post-task`)
-
-Execute after task completion for analysis and cleanup.
-
-**Usage:**
-```bash
-npx claude-flow hooks post-task --task-id <id> [options]
-```
-
-**Options:**
-- `--task-id <id>` - Task identifier (required)
-- `--analyze-performance` - Generate performance analysis
-- `--generate-insights` - Create AI-powered insights
-
-**Example:**
-```bash
-# Basic completion
-npx claude-flow hooks post-task --task-id "auth-123"
-
-# With full analysis
-npx claude-flow hooks post-task \
- --task-id "auth-123" \
- --analyze-performance \
- --generate-insights
-```
-
-**What it does:**
-- Captures task metrics
-- Stores completion status
-- Generates performance reports
-- Creates insights for future improvements
-- Updates swarm memory with learnings
-
-### 3. Pre-Edit Hook (`pre-edit`)
-
-Execute before file modifications for backup and validation.
-
-**Usage:**
-```bash
-npx claude-flow hooks pre-edit --file <path> [options]
-```
-
-**Options:**
-- `--file <path>` - Target file path (required)
-- `--operation <type>` - Edit operation type: edit, create, delete
-
-**Example:**
-```bash
-# Before editing existing file
-npx claude-flow hooks pre-edit --file "src/api.js" --operation edit
-
-# Before creating new file
-npx claude-flow hooks pre-edit --file "src/auth.js" --operation create
-```
-
-**What it does:**
-- Creates file backups
-- Validates file permissions
-- Checks for conflicts
-- Loads file-specific context
-- Prepares formatting rules
-
-### 4. Post-Edit Hook (`post-edit`)
-
-Execute after file modifications for tracking and coordination.
-
-**Usage:**
-```bash
-npx claude-flow hooks post-edit --file <path> [options]
-```
-
-**Options:**
-- `--file <path>` - Modified file path (required)
-- `--memory-key <key>` - Coordination memory key for storing edit info
-
-**Example:**
-```bash
-# Basic tracking
-npx claude-flow hooks post-edit --file "src/api.js"
-
-# With swarm coordination
-npx claude-flow hooks post-edit \
- --file "src/api.js" \
- --memory-key "swarm/auth-swarm/edits/api-endpoint"
-```
-
-**What it does:**
-- Auto-formats code based on file type
-- Updates coordination memory
-- Tracks changes for other agents
-- Triggers related validations
-- Updates task progress
-
-### 5. Session-End Hook (`session-end`)
-
-Execute at session termination for cleanup and export.
-
-**Usage:**
-```bash
-npx claude-flow hooks session-end [options]
-```
-
-**Options:**
-- `--export-metrics` - Export session performance metrics
-- `--swarm-id <id>` - Swarm identifier for coordination cleanup
-- `--generate-summary` - Create comprehensive session summary
-
-**Example:**
-```bash
-# Basic cleanup
-npx claude-flow hooks session-end
-
-# Full export and summary
-npx claude-flow hooks session-end \
- --export-metrics \
- --generate-summary \
- --swarm-id "auth-swarm-123"
-```
-
-**What it does:**
-- Saves session state
-- Exports performance metrics
-- Generates session summary
-- Cleans up temporary resources
-- Updates persistent memory
-
-## Integration with Claude Code
-
-### Automatic Hook Configuration
-
-Hooks are pre-configured in `.claude/settings.json` for seamless integration:
-
-```json
-{
- "hooks": {
- "pre-task": {
- "enabled": true,
- "auto-spawn-agents": true,
- "load-context": true
- },
- "post-edit": {
- "enabled": true,
- "auto-format": true,
- "update-memory": true
- },
- "session-end": {
- "enabled": true,
- "export-metrics": true,
- "generate-summary": true
- }
- }
-}
-```
-
-### Agent Coordination Protocol
-
-When using swarms, every agent MUST follow this coordination protocol:
-
-```bash
-# 1. Before starting work
-npx claude-flow hooks pre-task --description "Agent task"
-
-# 2. After each file operation
-npx claude-flow hooks post-edit --file "path/to/file" --memory-key "swarm/agent/step"
-
-# 3. After completing work
-npx claude-flow hooks post-task --task-id "task-123" --analyze-performance
-```
-
-## Advanced Features
-
-### Auto-Formatting
-
-Post-edit hooks automatically format code based on file type:
-- JavaScript/TypeScript: Prettier
-- Python: Black
-- Go: gofmt
-- Rust: rustfmt
-- CSS/SCSS: Prettier
-
-### Performance Tracking
-
-Hooks collect detailed metrics:
-- Token usage per operation
-- Execution time
-- Success/failure rates
-- Resource utilization
-- Coordination efficiency
-
-### Neural Pattern Learning
-
-Successful operations train neural patterns for:
-- Better agent assignment
-- Improved task decomposition
-- Optimized topology selection
-- Enhanced error prediction
-
-### Memory Coordination
-
-Hooks maintain persistent memory for:
-- Cross-session context
-- Agent coordination state
-- Task dependencies
-- Performance history
-- Learning patterns
-
-## Best Practices
-
-### 1. Always Use Pre-Task Hooks
-```bash
-# ✅ Good: Prepare context before starting
-npx claude-flow hooks pre-task --description "Build feature X"
-
-# ❌ Bad: Jump directly into work without preparation
-```
-
-### 2. Track All File Operations
-```bash
-# ✅ Good: Track every edit for coordination
-npx claude-flow hooks post-edit --file "src/api.js" --memory-key "api/updates/1"
-
-# ❌ Bad: Edit files without tracking
-```
-
-### 3. Generate Insights
-```bash
-# ✅ Good: Learn from completed tasks
-npx claude-flow hooks post-task --task-id "feature-x" --generate-insights
-
-# ❌ Bad: Complete tasks without analysis
-```
-
-### 4. Export Session Data
-```bash
-# ✅ Good: Save session state for continuity
-npx claude-flow hooks session-end --export-metrics --generate-summary
-
-# ❌ Bad: End sessions without saving state
-```
-
-## Troubleshooting
-
-### Hook Not Executing
-
-1. Check if hooks are enabled in `.claude/settings.json`
-2. Verify claude-flow is properly installed: `npm list claude-flow`
-3. Ensure you're using the correct command syntax
-4. Check for error messages in the output
-
-### Memory Key Conflicts
-
-Use hierarchical naming for memory keys:
-```bash
-# Good: Hierarchical and unique
---memory-key "swarm/auth-123/agent/coder-1/step/implement-jwt"
-
-# Bad: Too generic
---memory-key "edit-1"
-```
-
-### Performance Issues
-
-1. Disable auto-formatting for large files
-2. Use batch operations for multiple edits
-3. Limit metric collection frequency
-4. Clean up old session data regularly
-
-### Agent Coordination Problems
-
-1. Ensure all agents use the same swarm ID
-2. Check memory synchronization with `claude-flow memory list`
-3. Verify network connectivity for distributed agents
-4. Review coordination logs in `.claude/logs/`
-
-## Examples
-
-### Complete Workflow Example
-
-```bash
-# 1. Start task with preparation
-npx claude-flow hooks pre-task \
- --description "Implement user authentication" \
- --task-id "auth-impl" \
- --auto-spawn-agents
-
-# 2. Track file creation
-npx claude-flow hooks pre-edit --file "src/auth/jwt.js" --operation create
-# ... create file ...
-npx claude-flow hooks post-edit \
- --file "src/auth/jwt.js" \
- --memory-key "auth/jwt/created"
-
-# 3. Track modifications
-npx claude-flow hooks pre-edit --file "src/server.js" --operation edit
-# ... edit file ...
-npx claude-flow hooks post-edit \
- --file "src/server.js" \
- --memory-key "auth/server/integrated"
-
-# 4. Complete task with analysis
-npx claude-flow hooks post-task \
- --task-id "auth-impl" \
- --analyze-performance \
- --generate-insights
-
-# 5. End session with full export
-npx claude-flow hooks session-end \
- --export-metrics \
- --generate-summary \
- --swarm-id "auth-swarm"
-```
-
-### Swarm Coordination Example
-
-```bash
-# Agent 1: API Developer
-npx claude-flow hooks pre-task --description "Build API endpoints" --agent-id "api-dev"
-npx claude-flow hooks post-edit --file "src/routes/users.js" --memory-key "swarm/api/routes/users"
-
-# Agent 2: Database Designer (checks Agent 1's work)
-npx claude-flow memory retrieve --key "swarm/api/routes/users"
-npx claude-flow hooks pre-task --description "Design user schema" --agent-id "db-designer"
-npx claude-flow hooks post-edit --file "src/models/user.js" --memory-key "swarm/db/models/user"
-
-# Coordinator: Reviews all work
-npx claude-flow memory list --pattern "swarm/*"
-npx claude-flow hooks post-task --task-id "api-build" --generate-insights
-```
-
-## Hook Configuration Reference
-
-### Environment Variables
-
-```bash
-# Disable specific hooks
-CLAUDE_FLOW_DISABLE_PRE_TASK=true
-CLAUDE_FLOW_DISABLE_POST_EDIT=true
-
-# Custom hook timeouts (ms)
-CLAUDE_FLOW_HOOK_TIMEOUT=30000
-
-# Memory storage location
-CLAUDE_FLOW_MEMORY_PATH=./custom-memory
-
-# Metric export format
-CLAUDE_FLOW_METRIC_FORMAT=json # or csv, yaml
-```
-
-### Configuration File (`.claude/hooks.config.json`)
-
-```json
-{
- "preTask": {
- "autoSpawnAgents": true,
- "loadPreviousContext": true,
- "validatePrerequisites": true,
- "agentAssignment": {
- "*.js": ["coder", "tester"],
- "*.py": ["coder", "analyst"],
- "*.md": ["documenter", "reviewer"]
- }
- },
- "postEdit": {
- "autoFormat": {
- "enabled": true,
- "languages": {
- "javascript": "prettier",
- "python": "black",
- "go": "gofmt"
- }
- },
- "memoryUpdate": {
- "enabled": true,
- "includeContent": false,
- "includeDiff": true
- }
- },
- "sessionEnd": {
- "exportPath": "./.claude/exports",
- "summaryFormat": "markdown",
- "includeMetrics": true,
- "cleanupTemp": true
- }
-}
-```
-
-## Support
-
-For issues or questions about hooks:
-- GitHub Issues: https://github.com/ruvnet/claude-code-flow/issues
-- Documentation: https://github.com/ruvnet/claude-code-flow
-- Examples: `.claude/commands/` directory in your project
\ No newline at end of file
diff --git a/archive/root-cleanup/markdown/RELEASE_NOTES_ALPHA_16.md b/archive/root-cleanup/markdown/RELEASE_NOTES_ALPHA_16.md
deleted file mode 100644
index 5b0ed597f7..0000000000
--- a/archive/root-cleanup/markdown/RELEASE_NOTES_ALPHA_16.md
+++ /dev/null
@@ -1,88 +0,0 @@
-# Claude Flow v2.0.0-alpha.16 Release Notes
-
-## 🚀 Major Features
-
-### ✨ Complete Hooks System Implementation
-This release includes a fully implemented hooks system with CLI integration, providing lifecycle management for all Claude Code operations.
-
-#### New Hook Commands
-- `claude-flow hooks pre-task` - Execute before tasks with auto-spawning and complexity estimation
-- `claude-flow hooks post-task` - Execute after tasks with performance analysis
-- `claude-flow hooks pre-edit` - Execute before file edits with validation and backup
-- `claude-flow hooks post-edit` - Execute after edits with formatting and memory updates
-- `claude-flow hooks pre-command` - Execute before commands with safety validation
-- `claude-flow hooks post-command` - Execute after commands with output analysis
-- `claude-flow hooks session-start` - Initialize sessions with context loading
-- `claude-flow hooks session-end` - Cleanup sessions with metrics export
-- `claude-flow hooks session-restore` - Restore previous session state
-- `claude-flow hooks pre-search` - Optimize search operations
-- `claude-flow hooks notify` - Send coordination messages
-- `claude-flow hooks performance` - Track performance metrics
-- `claude-flow hooks memory-sync` - Synchronize memory across agents
-- `claude-flow hooks telemetry` - Send telemetry events
-
-### 🔧 Key Improvements
-- Fixed build errors in task.ts and workflow.ts
-- Added comprehensive TypeScript types for all hooks
-- Created documentation templates for all 10 hook types
-- Updated all settings.json files to use correct `hooks` command
-- Updated CLAUDE.md with proper hook usage examples
-- Full integration with ruv-swarm for hook execution
-
-### 📝 Documentation Updates
-- Added HOOKS.md with complete usage guide
-- Created template documentation for each hook type
-- Updated README.md with hooks functionality
-- Fixed all references from `hook` to `hooks` command
-
-## 🛠️ Installation
-
-```bash
-npm install -g claude-flow@alpha
-```
-
-## 📖 Usage Examples
-
-### Initialize with Hooks
-```bash
-# Initialize Claude Flow with hooks enabled
-npx claude-flow init --sparc
-
-# Use hooks in your workflow
-npx claude-flow hooks pre-task --description "Build new feature" --auto-spawn-agents
-npx claude-flow hooks post-edit --file "src/api.js" --memory-key "implementation" --format
-npx claude-flow hooks session-end --export-metrics --generate-summary
-```
-
-### Claude Code Integration
-The hooks are automatically configured in `.claude/settings.json` for seamless integration:
-- Pre-edit hooks for validation and agent assignment
-- Post-edit hooks for formatting and memory updates
-- Session-end hooks for metrics and state persistence
-
-## 🐛 Bug Fixes
-- Fixed syntax errors in task.ts and workflow.ts
-- Resolved TypeScript declaration conflicts
-- Fixed hook command not found error (#158)
-
-## 🔄 Breaking Changes
-- Changed command from `claude-flow hook` to `claude-flow hooks` (plural)
-- All settings.json files must be updated to use the new command
-
-## 📊 Performance
-- Hooks execute with minimal overhead (~50-200ms)
-- Real-time integration with ruv-swarm
-- Automatic performance tracking and optimization
-
-## 🎯 What's Next
-- Build system improvements for full TypeScript compilation
-- Additional hook types for specialized workflows
-- Enhanced error handling and recovery
-- Performance optimizations for large-scale operations
-
-## 🙏 Acknowledgments
-Thanks to all contributors and testers who helped make this release possible!
-
----
-
-For more information, visit: https://github.com/ruvnet/claude-code-flow
\ No newline at end of file
diff --git a/archive/root-cleanup/markdown/RELEASE_NOTES_ALPHA_17.md b/archive/root-cleanup/markdown/RELEASE_NOTES_ALPHA_17.md
deleted file mode 100644
index 785f9ef5dd..0000000000
--- a/archive/root-cleanup/markdown/RELEASE_NOTES_ALPHA_17.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# Release Notes - v2.0.0-alpha.17
-
-## 🎯 Fix: Auto-create settings.local.json (Issue #162)
-
-### Problem Solved
-The `init` command now automatically creates `.claude/settings.local.json` with pre-approved MCP permissions, eliminating repetitive permission prompts during first-time use.
-
-### What's New
-- **Automatic Permission Configuration**: No more manual approval for every MCP tool usage
-- **Zero-friction Onboarding**: New users can immediately explore Claude Flow capabilities
-- **Secure by Default**: Only trusted MCP servers (claude-flow, ruv-swarm) are pre-approved
-
-### Implementation Details
-- Added `settings.local.json` generation in `enhancedClaudeFlowInit` function
-- Creates default permissions for `mcp__ruv-swarm` and `mcp__claude-flow`
-- Respects `--dry-run` flag and overwrites with `--force`
-- Full test coverage with 4 comprehensive test cases
-
-### Usage
-```bash
-# Initialize with auto-configured permissions
-npx claude-flow@alpha init
-
-# The following file is now created automatically:
-# .claude/settings.local.json
-{
- "permissions": {
- "allow": [
- "mcp__ruv-swarm",
- "mcp__claude-flow"
- ],
- "deny": []
- }
-}
-```
-
-### Credits
-This fix was implemented by **Queen Seraphina** and the Claude Flow Hive Mind Collective 🐝
-
----
-
-**Full Changelog**: https://github.com/ruvnet/claude-flow/compare/v2.0.0-alpha.16...v2.0.0-alpha.17
\ No newline at end of file
diff --git a/archive/root-cleanup/scripts/fix-alpha-errors.cjs b/archive/root-cleanup/scripts/fix-alpha-errors.cjs
deleted file mode 100644
index 911442b082..0000000000
--- a/archive/root-cleanup/scripts/fix-alpha-errors.cjs
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * Alpha Release Fix Script
- * Fixes all remaining TypeScript compilation errors for clean alpha build
- */
-
-const fs = require('fs').promises;
-const path = require('path');
-
-const fixes = [
- // Fix chalk imports
- {
- file: 'src/cli/index.ts',
- search: 'colors.green',
- replace: 'chalk.green'
- },
-
- // Fix Table constructors
- {
- file: 'src/cli/commands/workflow.ts',
- search: 'new Table({',
- replace: 'new Table.default({'
- },
-
- // Fix workflow command chaining
- {
- file: 'src/cli/commands/workflow.ts',
- search: '.command(\'create\', \'Create a new workflow\', workflowCommand)',
- replace: '.command(\'create\').description(\'Create a new workflow\').action(workflowCommand)'
- },
-
- // Fix task command method calls
- {
- file: 'src/cli/commands/task.ts',
- search: '.argument(',
- replace: '.argument('
- },
-
- // Fix swarm Map usage
- {
- file: 'src/cli/commands/swarm-spawn.ts',
- search: 'agents.push(agent)',
- replace: 'agents.set(agent.id, agent)'
- },
-
- // Fix swarm-new properties
- {
- file: 'src/cli/commands/swarm-new.ts',
- search: 'task.assignedAgent',
- replace: 'task.assignedTo'
- },
- {
- file: 'src/cli/commands/swarm-new.ts',
- search: 'task.startTime',
- replace: 'task.createdAt'
- },
- {
- file: 'src/cli/commands/swarm-new.ts',
- search: 'task.endTime',
- replace: 'task.completedAt'
- }
-];
-
-async function applyFixes() {
- console.log('🔧 Applying alpha release fixes...');
-
- for (const fix of fixes) {
- try {
- const filePath = path.join('/workspaces/claude-code-flow', fix.file);
- let content = await fs.readFile(filePath, 'utf-8');
-
- if (content.includes(fix.search)) {
- content = content.replaceAll(fix.search, fix.replace);
- await fs.writeFile(filePath, content);
- console.log(`✅ Fixed: ${fix.file}`);
- }
- } catch (error) {
- console.log(`⚠️ Could not fix ${fix.file}: ${error.message}`);
- }
- }
-
- console.log('🎯 Alpha fixes complete!');
-}
-
-applyFixes().catch(console.error);
\ No newline at end of file
diff --git a/archive/root-cleanup/scripts/fix-ts-property-errors.ts b/archive/root-cleanup/scripts/fix-ts-property-errors.ts
deleted file mode 100644
index 37e2f387d9..0000000000
--- a/archive/root-cleanup/scripts/fix-ts-property-errors.ts
+++ /dev/null
@@ -1,224 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * Comprehensive TypeScript Property Error Fix
- * Fixes TS2339 "Property does not exist" errors
- */
-
-import { promises as fs } from 'fs';
-import { join } from 'path';
-import { glob } from 'glob';
-
-interface Fix {
- file: string;
- pattern: RegExp;
- replacement: string;
- description: string;
-}
-
-const fixes: Fix[] = [
- // Commander.js API fixes
- {
- file: '**/*.ts',
- pattern: /\.argument\(/g,
- replacement: '.argument(',
- description: 'Commander.js argument method'
- },
- {
- file: '**/*.ts',
- pattern: /\.help\(\)/g,
- replacement: '.helpInformation()',
- description: 'Commander.js help method'
- },
-
- // CLI Table fixes - change header() to headers in constructor
- {
- file: '**/*.ts',
- pattern: /\.header\(\[(.*?)\]\)/g,
- replacement: ', { head: [$1] }',
- description: 'CLI Table header to constructor'
- },
-
- // Console border fixes
- {
- file: '**/*.ts',
- pattern: /console\.border\(/g,
- replacement: '// console.border(',
- description: 'Remove console.border calls'
- },
-
- // Dashboard table property
- {
- file: '**/*.ts',
- pattern: /this\.table\(/g,
- replacement: 'this.render(',
- description: 'Dashboard table method'
- },
-
- // Process UI help property
- {
- file: '**/*.ts',
- pattern: /\.help\s*=/g,
- replacement: '.helpText =',
- description: 'ProcessUI help property'
- },
-
- // Deno specific fixes
- {
- file: '**/*.ts',
- pattern: /Deno\.stdout\.writeSync/g,
- replacement: 'process.stdout.write',
- description: 'Deno stdout to Node.js'
- },
- {
- file: '**/*.ts',
- pattern: /Deno\.addSignalListener/g,
- replacement: 'process.on',
- description: 'Deno signal listener to Node.js'
- },
-
- // Buffer to string conversion
- {
- file: '**/*.ts',
- pattern: /Buffer<ArrayBufferLike>/g,
- replacement: 'Buffer',
- description: 'Buffer type fix'
- },
-];
-
-const interfaceAdditions: Record<string, string[]> = {
- 'DistributedMemoryConfig': [
- 'backend?: string;',
- 'timeout?: number;',
- 'retryAttempts?: number;'
- ],
- 'ConfigManager': [
- 'getAvailableTemplates(): string[];',
- 'createTemplate(name: string, config: any): void;',
- 'getFormatParsers(): Record<string, any>;',
- 'validateFile(path: string): boolean;',
- 'getPathHistory(): any[];',
- 'getChangeHistory(): any[];',
- 'backup(path: string): Promise<void>;',
- 'restore(path: string): Promise<void>;'
- ],
- 'Dashboard': [
- 'table?: any;',
- 'alerts?: any[];',
- 'startTime?: Date;',
- 'exportData?: any;',
- 'render(data: any): void;'
- ],
- 'Console': [
- 'border?(data: any): void;'
- ],
- 'ProcessUI': [
- 'help?: string;',
- 'helpText?: string;'
- ],
- 'StartOptions': [
- 'force?: boolean;',
- 'healthCheck?: boolean;',
- 'timeout?: number;'
- ],
- 'AgentState': [
- 'completedTasks?: number;',
- 'inProgress?: number;',
- 'pending?: number;',
- 'active?: number;'
- ],
- 'Table': [
- 'header(columns: string[]): void;'
- ]
-};
-
-async function findTypeScriptFiles(): Promise<string[]> {
- const files = await glob('**/*.ts', {
- ignore: ['node_modules/**', 'dist/**', 'build/**'],
- cwd: process.cwd()
- });
- return files.map(file => join(process.cwd(), file));
-}
-
-async function fixFile(filePath: string): Promise<number> {
- let content = await fs.readFile(filePath, 'utf8');
- let fixCount = 0;
-
- for (const fix of fixes) {
- const matches = content.match(fix.pattern);
- if (matches) {
- content = content.replace(fix.pattern, fix.replacement);
- fixCount += matches.length;
- console.log(` Fixed ${matches.length} instances of: ${fix.description}`);
- }
- }
-
- // Add missing interface properties
- for (const [interfaceName, properties] of Object.entries(interfaceAdditions)) {
- const interfaceRegex = new RegExp(`interface\\s+${interfaceName}\\s*\\{([^}]+)\\}`, 'g');
- const interfaceMatch = content.match(interfaceRegex);
-
- if (interfaceMatch) {
- const interfaceContent = interfaceMatch[0];
- const existingProperties = interfaceContent.match(/\w+\??:/g) || [];
-
- for (const prop of properties) {
- const propName = prop.split(':')[0].replace(/[?]/g, '');
- const hasProperty = existingProperties.some(existing =>
- existing.replace(/[?:]/g, '') === propName.trim()
- );
-
- if (!hasProperty) {
- content = content.replace(
- interfaceRegex,
- interfaceContent.replace(/\}$/, ` ${prop}\n}`)
- );
- fixCount++;
- console.log(` Added property to ${interfaceName}: ${prop}`);
- }
- }
- }
- }
-
- if (fixCount > 0) {
- await fs.writeFile(filePath, content);
- }
-
- return fixCount;
-}
-
-async function main() {
- console.log('🔧 Starting TypeScript property error fixes...\n');
-
- const files = await findTypeScriptFiles();
- console.log(`Found ${files.length} TypeScript files to process\n`);
-
- let totalFixes = 0;
-
- for (const file of files) {
- const relativePath = file.replace(process.cwd() + '/', '');
- const fixes = await fixFile(file);
-
- if (fixes > 0) {
- console.log(`📝 ${relativePath}: ${fixes} fixes applied`);
- totalFixes += fixes;
- }
- }
-
- console.log(`\n✅ Total fixes applied: ${totalFixes}`);
- console.log('\n🔍 Running TypeScript check...');
-
- // Run TypeScript check
- const { spawn } = require('child_process');
- const tscCheck = spawn('npm', ['run', 'build'], { stdio: 'inherit' });
-
- tscCheck.on('exit', (code) => {
- if (code === 0) {
- console.log('✅ TypeScript build succeeded!');
- } else {
- console.log('❌ TypeScript build failed. Manual fixes may be needed.');
- }
- });
-}
-
-main().catch(console.error);
\ No newline at end of file
diff --git a/archive/swarm-analysis/init-command-analysis.md b/archive/swarm-analysis/init-command-analysis.md
deleted file mode 100644
index 475ac457b5..0000000000
--- a/archive/swarm-analysis/init-command-analysis.md
+++ /dev/null
@@ -1,213 +0,0 @@
-# Init Command Analysis Report
-
-## Overview
-This report provides a comprehensive analysis of the claude-flow init command structure, dependencies, and integration with SPARC modes.
-
-## Init Command Structure
-
-### Primary Entry Point
-- **Location**: `/src/cli/simple-commands/init.js`
-- **Type**: Re-export module
-- **Actual Implementation**: `/src/cli/simple-commands/init/index.js`
-
-### Command Flow
-1. **init.js** → Re-exports from modular structure
-2. **init/index.js** → Main init command implementation
-3. Handles flags: `--sparc`, `--minimal`, `--force`
-4. Creates project structure and configuration files
-
-## File Structure
-
-### Init Module Components
-```
-src/cli/simple-commands/init/
-├── index.js # Main init command logic
-├── help.js # Help text display
-├── executable-wrapper.js # Creates local claude-flow executable
-├── sparc-structure.js # SPARC environment setup
-├── templates/
-│ ├── claude-md.js # CLAUDE.md templates
-│ ├── memory-bank-md.js # memory-bank.md templates
-│ ├── coordination-md.js # coordination.md templates
-│ └── readme-files.js # README templates
-├── sparc/
-│ ├── roomodes-config.js # .roomodes configuration
-│ ├── workflows.js # Workflow templates
-│ └── roo-readme.js # .roo directory README
-└── claude-commands/
- ├── slash-commands.js # Main command creator
- ├── sparc-commands.js # SPARC-specific commands
- └── claude-flow-commands.js # Claude-flow commands
-```
-
-## Key Functions and Dependencies
-
-### 1. Main Init Function (`initCommand`)
-- **Purpose**: Initialize Claude Code integration files
-- **Parameters**: `subArgs`, `flags`
-- **Key Operations**:
- - Parse command flags
- - Check existing files
- - Create project structure
- - Initialize SPARC if requested
-
-### 2. Directory Creation
-Creates the following structure:
-```
-project/
-├── CLAUDE.md # Project configuration
-├── memory-bank.md # Memory documentation
-├── coordination.md # Coordination guidelines
-├── memory/
-│ ├── agents/
-│ ├── sessions/
-│ └── claude-flow-data.json
-├── coordination/
-│ ├── memory_bank/
-│ ├── subtasks/
-│ └── orchestration/
-└── .claude/
- ├── commands/
- │ └── sparc/
- └── logs/
-```
-
-### 3. SPARC Integration
-
-#### When `--sparc` flag is used:
-1. **Attempts to run `create-sparc`**:
- ```javascript
- npx -y create-sparc init --force
- ```
-
-2. **Fallback mechanism**: If create-sparc fails, uses `createSparcStructureManually()`
-
-3. **Creates SPARC structure**:
- - `.roomodes` file with mode configurations
- - `.roo/` directory with templates and workflows
- - Claude slash commands in `.claude/commands/`
-
-## SPARC Mode Configuration
-
-### .roomodes File
-Generated from `sparc/roomodes-config.js`, contains:
-- 9 core SPARC modes (architect, code, tdd, etc.)
-- Each mode has:
- - `slug`: Identifier
- - `name`: Display name with emoji
- - `roleDefinition`: Purpose description
- - `customInstructions`: Specific instructions
- - `groups`: Tool access permissions
- - `source`: "project"
-
-### Available SPARC Modes
-1. **architect** - System design and architecture
-2. **code** - Clean, efficient code writing
-3. **tdd** - Test-Driven Development
-4. **spec-pseudocode** - Requirements and pseudocode
-5. **integration** - System integration
-6. **debug** - Troubleshooting and debugging
-7. **security-review** - Security analysis
-8. **docs-writer** - Documentation creation
-9. **swarm** - Multi-agent coordination
-
-## Template System
-
-### CLAUDE.md Templates
-Three variants based on flags:
-1. **Minimal** (`--minimal`): Basic configuration
-2. **Full** (default): Comprehensive setup
-3. **SPARC** (`--sparc`): Full SPARC methodology integration
-
-### Template Sources
-- **CLAUDE.md**: Generated from `templates/claude-md.js`
-- **memory-bank.md**: From `templates/memory-bank-md.js`
-- **coordination.md**: From `templates/coordination-md.js`
-- **Slash commands**: From `claude-commands/sparc-commands.js`
-
-## Claude Slash Commands
-
-### Command Generation Process
-1. Reads `.roomodes` file
-2. Creates individual command for each mode
-3. Creates main `/sparc` command
-4. Saves to `.claude/commands/` directory
-
-### Command Structure
-Each slash command includes:
-- Mode description
-- Role definition
-- Custom instructions
-- Available tools
-- Usage examples
-- Memory integration examples
-
-## Critical Dependencies
-
-### External Dependencies
-- `create-sparc` npm package (optional, with fallback)
-- Deno runtime for file operations
-- Node.js for command execution
-
-### Internal Dependencies
-- `utils.js` for console output formatting
-- Template modules for file content generation
-- SPARC configuration modules
-
-## Key Findings
-
-### 1. Modular Architecture
-- Init command is well-modularized
-- Clear separation of concerns
-- Template-based file generation
-
-### 2. SPARC Integration Points
-- `.roomodes` file is central to SPARC functionality
-- Slash commands are auto-generated from mode configurations
-- Fallback mechanism ensures SPARC works even without create-sparc
-
-### 3. File Locations
-- Templates are embedded in JavaScript modules
-- No external template files
-- Configuration is generated programmatically
-
-### 4. Extensibility
-- Easy to add new SPARC modes
-- Template system allows customization
-- Slash commands are dynamically generated
-
-## Modification Points for Optimization
-
-To integrate optimized .claude prompts:
-
-1. **Modify template generators**:
- - `templates/claude-md.js`
- - `claude-commands/sparc-commands.js`
-
-2. **Update SPARC mode configurations**:
- - `sparc/roomodes-config.js`
-
-3. **Enhance slash command generation**:
- - `claude-commands/slash-commands.js`
- - `claude-commands/sparc-commands.js`
-
-4. **Consider external template option**:
- - Add ability to load templates from files
- - Allow custom template directories
-
-## Recommendations
-
-1. **Template Externalization**: Consider moving templates to separate files for easier maintenance
-2. **Configuration Override**: Add ability to use custom .roomodes configurations
-3. **Template Variables**: Implement a template variable system for dynamic content
-4. **Validation**: Add validation for generated files and configurations
-5. **Backup**: Create backups before overwriting existing files
-
-## Next Steps for Other Agents
-
-1. **Agent 12**: Should focus on modifying template generators
-2. **Agent 13**: Should work on enhancing SPARC mode configurations
-3. **Agent 14**: Should implement the optimized prompt integration
-4. **Agent 15**: Should handle testing and validation
-
-This analysis provides the foundation for implementing optimized .claude folder prompts within the existing init command structure.
\ No newline at end of file
diff --git a/archive/swarm-analysis/init-command-file-map.json b/archive/swarm-analysis/init-command-file-map.json
deleted file mode 100644
index 9fa50305a6..0000000000
--- a/archive/swarm-analysis/init-command-file-map.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "init_command_structure": {
- "entry_point": "/src/cli/simple-commands/init.js",
- "main_implementation": "/src/cli/simple-commands/init/index.js",
- "command_flags": {
- "--sparc": "Initialize with SPARC development environment",
- "--minimal": "Create minimal configuration files",
- "--force": "Overwrite existing files",
- "--help": "Show help information"
- }
- },
-
- "file_locations": {
- "init_modules": {
- "index": "/src/cli/simple-commands/init/index.js",
- "help": "/src/cli/simple-commands/init/help.js",
- "executable_wrapper": "/src/cli/simple-commands/init/executable-wrapper.js",
- "sparc_structure": "/src/cli/simple-commands/init/sparc-structure.js"
- },
-
- "template_generators": {
- "claude_md": "/src/cli/simple-commands/init/templates/claude-md.js",
- "memory_bank_md": "/src/cli/simple-commands/init/templates/memory-bank-md.js",
- "coordination_md": "/src/cli/simple-commands/init/templates/coordination-md.js",
- "readme_files": "/src/cli/simple-commands/init/templates/readme-files.js"
- },
-
- "sparc_config": {
- "roomodes_config": "/src/cli/simple-commands/init/sparc/roomodes-config.js",
- "workflows": "/src/cli/simple-commands/init/sparc/workflows.js",
- "roo_readme": "/src/cli/simple-commands/init/sparc/roo-readme.js"
- },
-
- "claude_commands": {
- "slash_commands": "/src/cli/simple-commands/init/claude-commands/slash-commands.js",
- "sparc_commands": "/src/cli/simple-commands/init/claude-commands/sparc-commands.js",
- "claude_flow_commands": "/src/cli/simple-commands/init/claude-commands/claude-flow-commands.js"
- }
- },
-
- "generated_files": {
- "root_files": [
- "CLAUDE.md",
- "memory-bank.md",
- "coordination.md",
- ".roomodes"
- ],
-
- "directories": {
- "memory": [
- "memory/",
- "memory/agents/",
- "memory/sessions/",
- "memory/claude-flow-data.json",
- "memory/agents/README.md",
- "memory/sessions/README.md"
- ],
-
- "coordination": [
- "coordination/",
- "coordination/memory_bank/",
- "coordination/subtasks/",
- "coordination/orchestration/"
- ],
-
- "claude": [
- ".claude/",
- ".claude/commands/",
- ".claude/commands/sparc/",
- ".claude/logs/"
- ],
-
- "sparc": [
- ".roo/",
- ".roo/templates/",
- ".roo/workflows/",
- ".roo/modes/",
- ".roo/configs/",
- ".roo/README.md"
- ]
- }
- },
-
- "template_functions": {
- "claude_md": {
- "minimal": "createMinimalClaudeMd()",
- "full": "createFullClaudeMd()",
- "sparc": "createSparcClaudeMd()"
- },
-
- "memory_bank": {
- "minimal": "createMinimalMemoryBankMd()",
- "full": "createFullMemoryBankMd()"
- },
-
- "coordination": {
- "minimal": "createMinimalCoordinationMd()",
- "full": "createFullCoordinationMd()"
- }
- },
-
- "sparc_modes": [
- {
- "slug": "architect",
- "file_created": ".claude/commands/sparc/architect.md"
- },
- {
- "slug": "code",
- "file_created": ".claude/commands/sparc/code.md"
- },
- {
- "slug": "tdd",
- "file_created": ".claude/commands/sparc/tdd.md"
- },
- {
- "slug": "spec-pseudocode",
- "file_created": ".claude/commands/sparc/spec-pseudocode.md"
- },
- {
- "slug": "integration",
- "file_created": ".claude/commands/sparc/integration.md"
- },
- {
- "slug": "debug",
- "file_created": ".claude/commands/sparc/debug.md"
- },
- {
- "slug": "security-review",
- "file_created": ".claude/commands/sparc/security-review.md"
- },
- {
- "slug": "docs-writer",
- "file_created": ".claude/commands/sparc/docs-writer.md"
- },
- {
- "slug": "swarm",
- "file_created": ".claude/commands/sparc/swarm.md"
- }
- ],
-
- "key_functions": {
- "initCommand": {
- "location": "/src/cli/simple-commands/init/index.js",
- "line": 25,
- "purpose": "Main init command handler"
- },
-
- "createSparcStructureManually": {
- "location": "/src/cli/simple-commands/init/sparc-structure.js",
- "line": 9,
- "purpose": "Fallback SPARC structure creation"
- },
-
- "createClaudeSlashCommands": {
- "location": "/src/cli/simple-commands/init/claude-commands/slash-commands.js",
- "line": 7,
- "purpose": "Generate Claude slash commands"
- },
-
- "createSparcSlashCommand": {
- "location": "/src/cli/simple-commands/init/claude-commands/sparc-commands.js",
- "line": 4,
- "purpose": "Generate individual SPARC mode command"
- },
-
- "createBasicRoomodesConfig": {
- "location": "/src/cli/simple-commands/init/sparc/roomodes-config.js",
- "line": 3,
- "purpose": "Generate default .roomodes configuration"
- }
- },
-
- "external_dependencies": {
- "create_sparc": {
- "command": "npx -y create-sparc init --force",
- "fallback": "createSparcStructureManually()",
- "optional": true
- }
- },
-
- "modification_points": {
- "template_content": [
- "/src/cli/simple-commands/init/templates/claude-md.js",
- "/src/cli/simple-commands/init/templates/memory-bank-md.js",
- "/src/cli/simple-commands/init/templates/coordination-md.js"
- ],
-
- "sparc_configuration": [
- "/src/cli/simple-commands/init/sparc/roomodes-config.js"
- ],
-
- "command_generation": [
- "/src/cli/simple-commands/init/claude-commands/sparc-commands.js",
- "/src/cli/simple-commands/init/claude-commands/slash-commands.js"
- ]
- }
-}
\ No newline at end of file
diff --git a/data/hive-mind.db b/data/hive-mind.db
deleted file mode 100644
index b7b4541965..0000000000
Binary files a/data/hive-mind.db and /dev/null differ
diff --git a/ruv-swarm/npm/config/error-monitoring.json b/ruv-swarm/npm/config/error-monitoring.json
deleted file mode 100644
index c515283622..0000000000
--- a/ruv-swarm/npm/config/error-monitoring.json
+++ /dev/null
@@ -1,498 +0,0 @@
-{
- "errorHandling": {
- "global": {
- "enabled": true,
- "debug": false,
- "correlationTracking": true,
- "performanceMonitoring": true
- },
- "retry": {
- "maxRetries": 3,
- "initialDelay": 1000,
- "maxDelay": 30000,
- "backoffMultiplier": 2,
- "jitterMax": 0.1,
- "retryableErrors": [
- "ECONNREFUSED",
- "ECONNRESET",
- "ETIMEDOUT",
- "ENOTFOUND",
- "SQLITE_BUSY",
- "SQLITE_LOCKED",
- "timeout",
- "network",
- "temporary"
- ]
- },
- "circuitBreaker": {
- "failureThreshold": 5,
- "recoveryTimeout": 30000,
- "monitoringPeriod": 60000,
- "components": {
- "persistence": {
- "failureThreshold": 10,
- "recoveryTimeout": 60000
- },
- "wasm": {
- "failureThreshold": 3,
- "recoveryTimeout": 120000
- },
- "mcp": {
- "failureThreshold": 5,
- "recoveryTimeout": 30000
- },
- "neural": {
- "failureThreshold": 8,
- "recoveryTimeout": 45000
- }
- }
- },
- "healthMonitoring": {
- "enabled": true,
- "checkInterval": 60000,
- "monitoringWindow": 300000,
- "alertThresholds": {
- "errorRate": 0.1,
- "criticalErrors": 5,
- "circuitBreakerOpenings": 3,
- "memoryUsage": 0.8,
- "responseTime": 10000
- }
- },
- "logging": {
- "enabled": true,
- "level": "info",
- "maxLogSize": 1000,
- "structuredLogging": true,
- "logRotation": {
- "enabled": true,
- "maxFiles": 5,
- "maxSize": "10MB"
- },
- "destinations": {
- "console": {
- "enabled": true,
- "colorize": true,
- "timestamp": true
- },
- "file": {
- "enabled": true,
- "filename": "logs/error-handling.log",
- "level": "error"
- },
- "metrics": {
- "enabled": true,
- "filename": "logs/metrics.log",
- "level": "info"
- }
- }
- }
- },
- "componentSpecific": {
- "persistence": {
- "errorHandling": {
- "enabled": true,
- "fallbackMode": "memory",
- "transactionSafety": true,
- "backupOnRiskyOperations": true,
- "dataValidation": true,
- "corruptionDetection": true,
- "memoryCleanup": {
- "enabled": true,
- "interval": 300000,
- "ttlCleanup": true
- },
- "backup": {
- "enabled": true,
- "path": "./data/backups",
- "retentionDays": 7,
- "compressionEnabled": false
- }
- },
- "timeouts": {
- "connection": 10000,
- "query": 30000,
- "transaction": 60000
- },
- "validation": {
- "swarmData": {
- "required": ["id", "name", "topology", "maxAgents"],
- "constraints": {
- "id": {"type": "string", "minLength": 1, "maxLength": 100},
- "name": {"type": "string", "minLength": 1, "maxLength": 255},
- "topology": {"enum": ["mesh", "hierarchical", "ring", "star", "centralized", "distributed"]},
- "maxAgents": {"type": "number", "min": 1, "max": 1000}
- }
- },
- "agentData": {
- "required": ["id", "swarmId", "name", "type"],
- "constraints": {
- "id": {"type": "string", "minLength": 1, "maxLength": 100},
- "swarmId": {"type": "string", "minLength": 1, "maxLength": 100},
- "name": {"type": "string", "minLength": 1, "maxLength": 255},
- "type": {"enum": ["researcher", "coder", "analyst", "optimizer", "coordinator", "tester", "architect"]}
- }
- }
- }
- },
- "wasm": {
- "errorHandling": {
- "enabled": true,
- "fallbacksEnabled": true,
- "validationEnabled": true,
- "integrityChecks": true,
- "gracefulDegradation": true
- },
- "timeouts": {
- "loading": 30000,
- "initialization": 15000,
- "validation": 5000
- },
- "fallbacks": {
- "core": {
- "enabled": true,
- "implementation": "javascript",
- "performance": "degraded"
- },
- "neural": {
- "enabled": true,
- "implementation": "javascript",
- "performance": "limited"
- },
- "forecasting": {
- "enabled": true,
- "implementation": "simple",
- "performance": "basic"
- }
- },
- "capabilities": {
- "simdRequired": false,
- "threadsRequired": false,
- "memory64Required": false
- }
- },
- "mcp": {
- "errorHandling": {
- "enabled": true,
- "parameterValidation": true,
- "prerequisiteChecking": true,
- "healthChecking": true,
- "performanceMonitoring": true
- },
- "timeouts": {
- "swarm_init": 30000,
- "agent_spawn": 15000,
- "task_orchestrate": 20000,
- "neural_train": 60000,
- "benchmark_run": 120000,
- "memory_usage": 5000,
- "swarm_status": 5000,
- "task_status": 5000,
- "task_results": 10000
- },
- "validation": {
- "cacheEnabled": true,
- "cacheSize": 1000,
- "strictMode": true
- },
- "systemChecks": {
- "memoryThreshold": 2048,
- "cpuLoadThreshold": 2.0,
- "agentAvailabilityCheck": true,
- "neuralCapabilityCheck": true
- }
- },
- "neural": {
- "errorHandling": {
- "enabled": true,
- "memoryOptimization": true,
- "trainingValidation": true,
- "performanceTracking": true
- },
- "timeouts": {
- "training": 300000,
- "inference": 10000,
- "validation": 5000
- },
- "memoryManagement": {
- "pooling": true,
- "garbageCollection": true,
- "compressionEnabled": true,
- "maxMemoryUsage": 1024
- },
- "validation": {
- "trainingData": true,
- "networkArchitecture": true,
- "hyperparameters": true
- }
- }
- },
- "alerting": {
- "enabled": true,
- "channels": {
- "console": {
- "enabled": true,
- "levels": ["critical", "high"],
- "format": "detailed"
- },
- "email": {
- "enabled": false,
- "smtp": {
- "host": "localhost",
- "port": 587,
- "secure": false
- },
- "recipients": ["[email protected]"],
- "levels": ["critical"]
- },
- "webhook": {
- "enabled": false,
- "url": "https://hooks.example.com/alerts",
- "method": "POST",
- "headers": {
- "Content-Type": "application/json",
- "Authorization": "Bearer token"
- },
- "levels": ["critical", "high"]
- },
- "slack": {
- "enabled": false,
- "webhookUrl": "https://hooks.slack.com/services/...",
- "channel": "#alerts",
- "levels": ["critical", "high"],
- "mentionOnCritical": true
- }
- },
- "rules": {
- "criticalErrors": {
- "condition": "severity == 'critical'",
- "cooldown": 300000,
- "action": "immediate"
- },
- "highErrorRate": {
- "condition": "errorRate > 0.1 over 5m",
- "cooldown": 600000,
- "action": "escalate"
- },
- "circuitBreakerOpen": {
- "condition": "circuitBreaker.state == 'OPEN'",
- "cooldown": 180000,
- "action": "notify"
- },
- "memoryPressure": {
- "condition": "memoryUsage > 0.8",
- "cooldown": 300000,
- "action": "warn"
- },
- "slowOperations": {
- "condition": "avgResponseTime > 10000",
- "cooldown": 600000,
- "action": "investigate"
- }
- },
- "escalation": {
- "enabled": true,
- "levels": [
- {
- "name": "L1",
- "threshold": 1,
- "timeout": 300000,
- "contacts": ["[email protected]"]
- },
- {
- "name": "L2",
- "threshold": 3,
- "timeout": 600000,
- "contacts": ["[email protected]"]
- },
- {
- "name": "L3",
- "threshold": 5,
- "timeout": 900000,
- "contacts": ["[email protected]"]
- }
- ]
- }
- },
- "metrics": {
- "enabled": true,
- "collection": {
- "interval": 30000,
- "retention": 86400000,
- "aggregation": "average"
- },
- "exports": {
- "prometheus": {
- "enabled": false,
- "port": 9090,
- "path": "/metrics",
- "labels": {
- "service": "ruv-swarm",
- "environment": "production"
- }
- },
- "json": {
- "enabled": true,
- "file": "metrics/error-metrics.json",
- "interval": 60000
- },
- "csv": {
- "enabled": false,
- "file": "metrics/error-metrics.csv",
- "interval": 300000
- }
- },
- "tracked": {
- "errorRate": {
- "enabled": true,
- "window": 300000,
- "aggregation": "rate"
- },
- "responseTime": {
- "enabled": true,
- "percentiles": [50, 90, 95, 99],
- "aggregation": "histogram"
- },
- "memoryUsage": {
- "enabled": true,
- "aggregation": "gauge"
- },
- "circuitBreakerState": {
- "enabled": true,
- "aggregation": "state"
- },
- "operationCounts": {
- "enabled": true,
- "breakdown": ["component", "operation", "status"],
- "aggregation": "counter"
- }
- }
- },
- "recovery": {
- "strategies": {
- "retry": {
- "applicable": ["network", "timeout", "temporary"],
- "maxAttempts": 3,
- "backoff": "exponential"
- },
- "fallback": {
- "applicable": ["wasm", "neural", "mcp"],
- "degradationAcceptable": true
- },
- "circuitBreaker": {
- "applicable": ["persistence", "external"],
- "autoRecovery": true
- },
- "gracefulDegradation": {
- "applicable": ["optional-features"],
- "userNotification": true
- },
- "restart": {
- "applicable": ["memory-leak", "corruption"],
- "automated": false,
- "requiresApproval": true
- },
- "manualIntervention": {
- "applicable": ["critical", "security"],
- "escalationRequired": true
- }
- },
- "automation": {
- "enabled": true,
- "safetyChecks": true,
- "rollbackCapability": true,
- "approvalRequired": {
- "restart": true,
- "dataRecovery": true,
- "configurationChanges": true
- }
- }
- },
- "testing": {
- "errorInjection": {
- "enabled": false,
- "probability": 0.01,
- "components": ["persistence", "wasm", "mcp"],
- "scenarios": ["timeout", "validation", "corruption"]
- },
- "chaos": {
- "enabled": false,
- "intensity": "low",
- "schedule": "manual"
- }
- },
- "maintenance": {
- "cleanup": {
- "enabled": true,
- "schedule": "0 2 * * *",
- "tasks": [
- "expiredMemoryCleanup",
- "logRotation",
- "metricArchival",
- "backupCleanup"
- ]
- },
- "healthChecks": {
- "enabled": true,
- "schedule": "*/5 * * * *",
- "comprehensive": false
- }
- },
- "environments": {
- "development": {
- "errorHandling": {
- "debug": true,
- "retry": {
- "maxRetries": 1,
- "initialDelay": 500
- }
- },
- "alerting": {
- "enabled": false
- },
- "testing": {
- "errorInjection": {
- "enabled": true,
- "probability": 0.05
- }
- }
- },
- "staging": {
- "errorHandling": {
- "debug": false,
- "retry": {
- "maxRetries": 2
- }
- },
- "alerting": {
- "enabled": true,
- "channels": {
- "console": {"enabled": true},
- "webhook": {"enabled": true}
- }
- }
- },
- "production": {
- "errorHandling": {
- "debug": false,
- "performanceMonitoring": true
- },
- "alerting": {
- "enabled": true,
- "channels": {
- "console": {"enabled": true},
- "email": {"enabled": true},
- "slack": {"enabled": true}
- },
- "escalation": {
- "enabled": true
- }
- },
- "metrics": {
- "exports": {
- "prometheus": {"enabled": true}
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/ruv-swarm/npm/docs/ERROR_HANDLING_GUIDE.md b/ruv-swarm/npm/docs/ERROR_HANDLING_GUIDE.md
deleted file mode 100644
index 459963966a..0000000000
--- a/ruv-swarm/npm/docs/ERROR_HANDLING_GUIDE.md
+++ /dev/null
@@ -1,561 +0,0 @@
-# Comprehensive Error Handling Guide for ruv-swarm Integration
-
-## Overview
-
-This guide covers the enhanced error handling system implemented across all ruv-swarm integration components. The system provides robust error recovery, detailed logging, performance monitoring, and graceful degradation capabilities.
-
-## Architecture
-
-### Core Components
-
-1. **ErrorHandlingManager** - Central error handling coordination
-2. **EnhancedSwarmPersistence** - Database operations with transaction safety
-3. **EnhancedWasmLoader** - WASM module loading with fallbacks
-4. **RobustMCPTools** - MCP communication with validation and recovery
-
-### Error Categories
-
-```javascript
-ErrorCategory = {
- PERSISTENCE: 'persistence', // Database and storage errors
- WASM: 'wasm', // WebAssembly module errors
- MCP: 'mcp', // MCP communication errors
- NEURAL: 'neural', // Neural network processing errors
- COORDINATION: 'coordination', // Swarm coordination errors
- NETWORK: 'network', // Network connectivity errors
- MEMORY: 'memory', // Memory management errors
- VALIDATION: 'validation' // Input validation errors
-}
-```
-
-### Error Severity Levels
-
-```javascript
-ErrorSeverity = {
- LOW: 'low', // Minor issues, system continues normally
- MEDIUM: 'medium', // Degraded functionality, user may notice
- HIGH: 'high', // Significant impact, immediate attention needed
- CRITICAL: 'critical' // System stability at risk, manual intervention required
-}
-```
-
-## Error Recovery Strategies
-
-### 1. Circuit Breaker Pattern
-
-Automatically prevents cascading failures by "opening" when failure threshold is reached.
-
-```javascript
-// Circuit breaker configuration
-const circuitBreaker = {
- failureThreshold: 5, // Open after 5 consecutive failures
- recoveryTimeout: 30000, // Wait 30 seconds before retry
- monitoringPeriod: 60000 // 1-minute monitoring window
-}
-```
-
-**States:**
-- **CLOSED**: Normal operation
-- **OPEN**: Blocking requests, allowing system recovery
-- **HALF_OPEN**: Testing if system has recovered
-
-### 2. Retry with Exponential Backoff
-
-Retries failed operations with increasing delays to avoid overwhelming systems.
-
-```javascript
-// Retry configuration
-const retryConfig = {
- maxRetries: 3, // Maximum retry attempts
- initialDelay: 1000, // Start with 1 second delay
- maxDelay: 30000, // Cap at 30 seconds
- backoffMultiplier: 2, // Double delay each retry
- jitterMax: 0.1 // Add randomness to prevent thundering herd
-}
-```
-
-### 3. Graceful Degradation
-
-System continues operating with reduced functionality when components fail.
-
-**Examples:**
-- WASM failure → JavaScript fallback implementation
-- Database failure → In-memory storage mode
-- Neural networks unavailable → Basic agent behavior
-- MCP failure → Local operation mode
-
-### 4. Fallback Implementations
-
-Pre-configured backup implementations for critical components.
-
-```javascript
-// WASM fallback example
-const wasmFallback = {
- core: () => ({
- exports: {
- memory: new WebAssembly.Memory({ initial: 1 }),
- get_version: () => '0.1.0-fallback'
- },
- isFallback: true
- })
-}
-```
-
-## Component-Specific Error Handling
-
-### Persistence Layer (EnhancedSwarmPersistence)
-
-**Error Scenarios:**
-- Database connection failures
-- Disk space exhaustion
-- Data corruption
-- Transaction conflicts
-
-**Recovery Mechanisms:**
-- Automatic fallback to in-memory mode
-- Transaction rollback on failures
-- Data integrity checks
-- Automatic backups before risky operations
-
-```javascript
-// Usage example
-const persistence = new EnhancedSwarmPersistence(dbPath, {
- backupPath: './backups',
- errorHandling: {
- retry: { maxRetries: 3 },
- circuitBreaker: { failureThreshold: 5 }
- }
-});
-
-// Graceful error handling
-try {
- await persistence.createSwarm(swarmData);
-} catch (error) {
- // Error is automatically logged and handled
- // System falls back to in-memory mode if needed
- console.log('Swarm created with fallback mode');
-}
-```
-
-### WASM Module Loading (EnhancedWasmLoader)
-
-**Error Scenarios:**
-- Module loading timeouts
-- Invalid WASM binary
-- Memory allocation failures
-- Feature incompatibility
-
-**Recovery Mechanisms:**
-- Loading timeouts with fallbacks
-- Module integrity validation
-- JavaScript implementation fallbacks
-- Progressive feature degradation
-
-```javascript
-// Usage example
-const wasmLoader = new EnhancedWasmLoader({
- maxLoadingTime: 30000,
- enableFallbacks: true,
- enableValidation: true
-});
-
-try {
- const coreModule = await wasmLoader.loadModule('core');
-} catch (error) {
- // Automatically uses fallback implementation
- console.log('Core module using JavaScript fallback');
-}
-```
-
-### MCP Tools (RobustMCPTools)
-
-**Error Scenarios:**
-- Communication timeouts
-- Parameter validation failures
-- Agent unavailability
-- Network connectivity issues
-
-**Recovery Mechanisms:**
-- Input validation with detailed error messages
-- Operation timeouts
-- Prerequisite checking
-- Automatic retries for transient failures
-
-```javascript
-// Usage example
-const mcpTools = new RobustMCPTools(ruvSwarmInstance, {
- errorHandling: {
- retry: { maxRetries: 3 },
- circuitBreaker: { failureThreshold: 5 }
- }
-});
-
-try {
- const result = await mcpTools.task_orchestrate({
- task: 'Complex analysis task',
- priority: 'high'
- });
-} catch (error) {
- // Detailed error information with recovery suggestions
- console.error('Task orchestration failed:', error.message);
- console.log('Suggestions:', error.recoverySuggestions);
-}
-```
-
-## Error Monitoring and Alerting
-
-### Health Monitoring
-
-The system continuously monitors component health and overall system status.
-
-```javascript
-// Get system health
-const health = await errorHandler.getHealthStatus();
-console.log('System Health:', health);
-
-// Example output:
-{
- isHealthy: true,
- errorStatistics: {
- total: 5,
- bySeverity: { critical: 0, high: 1, medium: 2, low: 2 },
- byCategory: { persistence: 2, wasm: 1, mcp: 2 }
- },
- circuitBreakers: [...],
- recommendations: [...]
-}
-```
-
-### Performance Metrics
-
-Track operation success rates and response times.
-
-```javascript
-// Get performance metrics
-const metrics = mcpTools.performanceMetrics;
-console.log('Success Rate:',
- (metrics.successfulOperations / metrics.totalOperations * 100).toFixed(1) + '%'
-);
-console.log('Average Response Time:', metrics.averageResponseTime.toFixed(0) + 'ms');
-```
-
-### Event Monitoring
-
-Listen for error events and health status changes.
-
-```javascript
-errorHandler.on('error', (errorRecord) => {
- console.error(`Error in ${errorRecord.component}: ${errorRecord.error.message}`);
-});
-
-errorHandler.on('criticalError', (errorRecord) => {
- // Send alert to monitoring system
- alertingSystem.sendCriticalAlert(errorRecord);
-});
-
-errorHandler.on('healthStatusChange', (status) => {
- if (!status.isHealthy) {
- console.warn('System health degraded:', status.metrics);
- }
-});
-```
-
-## Configuration Guidelines
-
-### Production Configuration
-
-```javascript
-const productionConfig = {
- errorHandling: {
- retry: {
- maxRetries: 5,
- initialDelay: 2000,
- maxDelay: 60000,
- backoffMultiplier: 2
- },
- circuitBreaker: {
- failureThreshold: 10,
- recoveryTimeout: 60000
- },
- alertThresholds: {
- errorRate: 0.05, // 5% error rate triggers alert
- criticalErrors: 3, // 3 critical errors in 5 minutes
- circuitBreakerOpenings: 2 // 2 circuit breaker openings
- }
- }
-};
-```
-
-### Development Configuration
-
-```javascript
-const developmentConfig = {
- errorHandling: {
- retry: {
- maxRetries: 2,
- initialDelay: 500,
- maxDelay: 5000
- },
- circuitBreaker: {
- failureThreshold: 3,
- recoveryTimeout: 10000
- },
- debug: true, // Enable detailed logging
- enableFallbacks: true // Always use fallbacks for testing
- }
-};
-```
-
-## Best Practices
-
-### 1. Fail Fast Validation
-
-Validate inputs early to provide immediate feedback.
-
-```javascript
-// Bad: Generic error
-throw new Error('Invalid parameters');
-
-// Good: Specific validation error
-throw new MCPValidationError(
- 'maxAgents must be between 1 and 1000',
- 'maxAgents',
- params.maxAgents
-);
-```
-
-### 2. Meaningful Error Messages
-
-Provide actionable error messages with context.
-
-```javascript
-// Bad: Vague error
-throw new Error('Operation failed');
-
-// Good: Detailed error with recovery suggestions
-throw new Error(
- 'Task orchestration failed: No idle agents available. ' +
- 'Suggestion: Wait for current tasks to complete or spawn additional agents.'
-);
-```
-
-### 3. Correlation IDs
-
-Use correlation IDs to track related operations across components.
-
-```javascript
-const correlationId = crypto.randomUUID();
-await errorHandler.wrapOperation(operation, {
- correlationId,
- component: 'mcp-tools',
- operation: 'task_orchestrate'
-});
-```
-
-### 4. Resource Cleanup
-
-Always clean up resources in error scenarios.
-
-```javascript
-try {
- const transaction = await beginTransaction();
- await performOperation();
- await commitTransaction();
-} catch (error) {
- await rollbackTransaction(); // Clean up on error
- throw error;
-}
-```
-
-### 5. Health Checks
-
-Implement regular health checks for early problem detection.
-
-```javascript
-// Periodic health check
-setInterval(async () => {
- const health = await errorHandler.performHealthCheck();
- if (!health.isHealthy) {
- console.warn('Health check failed:', health.issues);
- }
-}, 60000); // Every minute
-```
-
-## Troubleshooting Common Issues
-
-### Database Connection Failures
-
-**Symptoms:**
-- "SQLITE_BUSY" or "SQLITE_LOCKED" errors
-- Database connection timeouts
-
-**Solutions:**
-1. Check database file permissions
-2. Verify disk space availability
-3. Review concurrent access patterns
-4. Enable WAL mode for better concurrency
-
-```javascript
-// Enable WAL mode
-db.exec('PRAGMA journal_mode = WAL');
-```
-
-### WASM Loading Failures
-
-**Symptoms:**
-- Module loading timeouts
-- "WebAssembly.instantiate" errors
-- Feature detection failures
-
-**Solutions:**
-1. Verify WASM file integrity
-2. Check browser/Node.js compatibility
-3. Enable fallback implementations
-4. Review memory constraints
-
-```javascript
-// Check WASM support
-if (typeof WebAssembly === 'undefined') {
- console.warn('WebAssembly not supported, using fallbacks');
- enableFallbacks = true;
-}
-```
-
-### MCP Communication Issues
-
-**Symptoms:**
-- Operation timeouts
-- Parameter validation failures
-- Agent unavailability errors
-
-**Solutions:**
-1. Verify agent status and availability
-2. Review parameter formats and ranges
-3. Check network connectivity
-4. Increase timeout values if needed
-
-```javascript
-// Verify agent availability before operations
-const agents = await mcpTools.agent_list({ filter: 'idle' });
-if (agents.agents.length === 0) {
- throw new Error('No agents available for task execution');
-}
-```
-
-### Memory Issues
-
-**Symptoms:**
-- Out of memory errors
-- Slow performance
-- High memory usage warnings
-
-**Solutions:**
-1. Monitor memory usage regularly
-2. Implement memory cleanup procedures
-3. Use memory pools for frequent allocations
-4. Enable garbage collection for neural networks
-
-```javascript
-// Memory monitoring
-const memoryUsage = process.memoryUsage();
-if (memoryUsage.used > 2 * 1024 * 1024 * 1024) { // > 2GB
- console.warn('High memory usage, consider cleanup');
- await performMemoryCleanup();
-}
-```
-
-## Integration with External Monitoring
-
-### Prometheus Metrics
-
-Export error metrics for Prometheus monitoring.
-
-```javascript
-// Example Prometheus metrics
-const prometheus = require('prom-client');
-
-const errorCounter = new prometheus.Counter({
- name: 'ruv_swarm_errors_total',
- help: 'Total number of errors',
- labelNames: ['component', 'category', 'severity']
-});
-
-errorHandler.on('error', (errorRecord) => {
- errorCounter.inc({
- component: errorRecord.component,
- category: errorRecord.category,
- severity: errorRecord.severity
- });
-});
-```
-
-### Log Aggregation
-
-Structure logs for easy aggregation and analysis.
-
-```javascript
-// Structured logging example
-const winston = require('winston');
-
-const logger = winston.createLogger({
- format: winston.format.combine(
- winston.format.timestamp(),
- winston.format.errors({ stack: true }),
- winston.format.json()
- ),
- transports: [
- new winston.transports.File({ filename: 'error.log', level: 'error' }),
- new winston.transports.File({ filename: 'combined.log' })
- ]
-});
-
-errorHandler.on('error', (errorRecord) => {
- logger.error('ruv-swarm error', {
- correlationId: errorRecord.correlationId,
- component: errorRecord.component,
- operation: errorRecord.operation,
- category: errorRecord.category,
- severity: errorRecord.severity,
- error: errorRecord.error,
- context: errorRecord.context
- });
-});
-```
-
-## Performance Considerations
-
-### Error Handling Overhead
-
-The error handling system is designed to minimize performance impact:
-
-- Circuit breakers prevent unnecessary retries
-- Validation caching reduces repeated checks
-- Async operations don't block main thread
-- Memory usage is monitored and controlled
-
-### Benchmarking
-
-Regular benchmarking ensures error handling doesn't degrade performance:
-
-```javascript
-// Benchmark error handling overhead
-const benchmarkStart = performance.now();
-for (let i = 0; i < 1000; i++) {
- await errorHandler.wrapOperation(async () => {
- return { success: true };
- }, { operation: 'benchmark_test' });
-}
-const overhead = performance.now() - benchmarkStart;
-console.log(`Error handling overhead: ${(overhead / 1000).toFixed(2)}ms per operation`);
-```
-
-## Conclusion
-
-The comprehensive error handling system provides:
-
-- **Resilience**: Automatic recovery from common failure scenarios
-- **Observability**: Detailed logging and monitoring capabilities
-- **Performance**: Minimal overhead with intelligent optimization
-- **Maintainability**: Clear error categories and standardized handling
-
-By following this guide and implementing the recommended practices, you can build robust ruv-swarm applications that gracefully handle errors and provide excellent user experiences even during system stress or component failures.
\ No newline at end of file
diff --git a/ruv-swarm/npm/src/error-handling-manager.js b/ruv-swarm/npm/src/error-handling-manager.js
deleted file mode 100644
index 7cd8858c80..0000000000
--- a/ruv-swarm/npm/src/error-handling-manager.js
+++ /dev/null
@@ -1,779 +0,0 @@
-/**
- * Comprehensive Error Handling Manager for ruv-swarm
- * Provides robust error recovery, logging, and monitoring across all integration components
- */
-
-import { EventEmitter } from 'events';
-import crypto from 'crypto';
-
-// Error severity levels
-export const ErrorSeverity = {
- LOW: 'low',
- MEDIUM: 'medium',
- HIGH: 'high',
- CRITICAL: 'critical'
-};
-
-// Error categories
-export const ErrorCategory = {
- PERSISTENCE: 'persistence',
- WASM: 'wasm',
- MCP: 'mcp',
- NEURAL: 'neural',
- COORDINATION: 'coordination',
- NETWORK: 'network',
- MEMORY: 'memory',
- VALIDATION: 'validation'
-};
-
-// Recovery strategies
-export const RecoveryStrategy = {
- RETRY: 'retry',
- FALLBACK: 'fallback',
- CIRCUIT_BREAKER: 'circuit_breaker',
- GRACEFUL_DEGRADATION: 'graceful_degradation',
- RESTART: 'restart',
- MANUAL_INTERVENTION: 'manual_intervention'
-};
-
-/**
- * Circuit Breaker implementation for external dependencies
- */
-class CircuitBreaker {
- constructor(options = {}) {
- this.name = options.name || 'default';
- this.failureThreshold = options.failureThreshold || 5;
- this.recoveryTimeout = options.recoveryTimeout || 30000; // 30 seconds
- this.monitoringPeriod = options.monitoringPeriod || 60000; // 1 minute
-
- this.state = 'CLOSED'; // CLOSED, OPEN, HALF_OPEN
- this.failures = 0;
- this.lastFailureTime = null;
- this.nextAttempt = null;
- this.successCount = 0;
- this.stats = {
- totalRequests: 0,
- successfulRequests: 0,
- failedRequests: 0,
- circuitOpened: 0
- };
- }
-
- async execute(operation) {
- this.stats.totalRequests++;
-
- if (this.state === 'OPEN') {
- if (Date.now() < this.nextAttempt) {
- throw new Error(`Circuit breaker ${this.name} is OPEN. Next attempt at ${new Date(this.nextAttempt)}`);
- }
- this.state = 'HALF_OPEN';
- this.successCount = 0;
- }
-
- try {
- const result = await operation();
- this.onSuccess();
- return result;
- } catch (error) {
- this.onFailure();
- throw error;
- }
- }
-
- onSuccess() {
- this.failures = 0;
- this.stats.successfulRequests++;
-
- if (this.state === 'HALF_OPEN') {
- this.successCount++;
- if (this.successCount >= 3) { // Require 3 successes to close
- this.state = 'CLOSED';
- }
- }
- }
-
- onFailure() {
- this.failures++;
- this.lastFailureTime = Date.now();
- this.stats.failedRequests++;
-
- if (this.failures >= this.failureThreshold) {
- this.state = 'OPEN';
- this.nextAttempt = Date.now() + this.recoveryTimeout;
- this.stats.circuitOpened++;
- }
- }
-
- getStats() {
- return {
- ...this.stats,
- state: this.state,
- failures: this.failures,
- lastFailureTime: this.lastFailureTime
- };
- }
-}
-
-/**
- * Retry manager with exponential backoff
- */
-class RetryManager {
- constructor(options = {}) {
- this.maxRetries = options.maxRetries || 3;
- this.initialDelay = options.initialDelay || 1000;
- this.maxDelay = options.maxDelay || 30000;
- this.backoffMultiplier = options.backoffMultiplier || 2;
- this.jitterMax = options.jitterMax || 0.1;
- }
-
- async execute(operation, operationName = 'unknown') {
- let lastError;
-
- for (let attempt = 0; attempt <= this.maxRetries; attempt++) {
- try {
- return await operation();
- } catch (error) {
- lastError = error;
-
- if (attempt === this.maxRetries) {
- break;
- }
-
- // Check if error is retryable
- if (!this.isRetryable(error)) {
- throw error;
- }
-
- const delay = this.calculateDelay(attempt);
- console.warn(`Retry ${attempt + 1}/${this.maxRetries} for ${operationName} failed: ${error.message}. Retrying in ${delay}ms`);
-
- await new Promise(resolve => setTimeout(resolve, delay));
- }
- }
-
- throw new Error(`Operation ${operationName} failed after ${this.maxRetries + 1} attempts. Last error: ${lastError.message}`);
- }
-
- isRetryable(error) {
- // Network errors, timeouts, and temporary database issues are retryable
- const retryableErrors = [
- 'ECONNREFUSED',
- 'ECONNRESET',
- 'ETIMEDOUT',
- 'ENOTFOUND',
- 'SQLITE_BUSY',
- 'SQLITE_LOCKED',
- 'timeout',
- 'network',
- 'temporary'
- ];
-
- const errorMessage = error.message.toLowerCase();
- return retryableErrors.some(retryable =>
- errorMessage.includes(retryable) || error.code === retryable
- );
- }
-
- calculateDelay(attempt) {
- const exponentialDelay = this.initialDelay * Math.pow(this.backoffMultiplier, attempt);
- const clampedDelay = Math.min(exponentialDelay, this.maxDelay);
-
- // Add jitter to prevent thundering herd
- const jitter = clampedDelay * this.jitterMax * Math.random();
- return Math.floor(clampedDelay + jitter);
- }
-}
-
-/**
- * Main Error Handling Manager
- */
-export class ErrorHandlingManager extends EventEmitter {
- constructor(options = {}) {
- super();
-
- this.correlationId = crypto.randomUUID();
- this.circuitBreakers = new Map();
- this.retryManager = new RetryManager(options.retry);
- this.errorLog = [];
- this.maxLogSize = options.maxLogSize || 1000;
- this.alertThresholds = options.alertThresholds || {
- errorRate: 0.1, // 10% error rate triggers alert
- criticalErrors: 5, // 5 critical errors in monitoring period
- circuitBreakerOpenings: 3
- };
-
- // Monitoring state
- this.monitoringWindow = options.monitoringWindow || 300000; // 5 minutes
- this.healthCheckInterval = options.healthCheckInterval || 60000; // 1 minute
- this.isHealthy = true;
- this.lastHealthCheck = Date.now();
-
- // Start background monitoring
- this.startHealthMonitoring();
- }
-
- /**
- * Wrap operations with comprehensive error handling
- */
- async wrapOperation(operation, context = {}) {
- const operationId = crypto.randomUUID();
- const startTime = Date.now();
-
- const operationContext = {
- operationId,
- correlationId: this.correlationId,
- category: context.category || ErrorCategory.COORDINATION,
- component: context.component || 'unknown',
- operation: context.operation || 'unknown',
- startTime,
- ...context
- };
-
- try {
- // Get or create circuit breaker for this operation
- const circuitBreakerKey = `${operationContext.component}_${operationContext.operation}`;
- const circuitBreaker = this.getCircuitBreaker(circuitBreakerKey, context.circuitBreaker);
-
- // Execute with circuit breaker and retry logic
- const result = await circuitBreaker.execute(async () => {
- return await this.retryManager.execute(operation, operationContext.operation);
- });
-
- // Log successful operation
- this.logSuccess(operationContext, Date.now() - startTime);
-
- return result;
- } catch (error) {
- // Handle and log error
- return await this.handleError(error, operationContext);
- }
- }
-
- /**
- * Handle different types of errors with appropriate strategies
- */
- async handleError(error, context) {
- const errorRecord = this.createErrorRecord(error, context);
-
- // Log error
- this.logError(errorRecord);
-
- // Emit error event for monitoring
- this.emit('error', errorRecord);
-
- // Determine recovery strategy
- const strategy = this.determineRecoveryStrategy(error, context);
-
- try {
- return await this.executeRecoveryStrategy(strategy, error, context);
- } catch (recoveryError) {
- // Recovery failed, escalate
- const escalatedError = this.createErrorRecord(recoveryError, {
- ...context,
- originalError: error,
- recoveryStrategy: strategy,
- escalated: true
- });
-
- this.logError(escalatedError);
- this.emit('criticalError', escalatedError);
-
- throw new Error(`Operation failed and recovery unsuccessful. Original: ${error.message}, Recovery: ${recoveryError.message}`);
- }
- }
-
- /**
- * Create comprehensive error record
- */
- createErrorRecord(error, context) {
- return {
- id: crypto.randomUUID(),
- timestamp: new Date().toISOString(),
- correlationId: context.correlationId || this.correlationId,
- operationId: context.operationId,
- severity: this.determineSeverity(error, context),
- category: context.category || ErrorCategory.COORDINATION,
- component: context.component || 'unknown',
- operation: context.operation || 'unknown',
- error: {
- name: error.name,
- message: error.message,
- code: error.code,
- stack: error.stack,
- cause: error.cause
- },
- context: {
- ...context,
- executionTime: context.startTime ? Date.now() - context.startTime : 0
- },
- environment: {
- nodeVersion: process.version,
- platform: process.platform,
- memoryUsage: process.memoryUsage(),
- uptime: process.uptime()
- }
- };
- }
-
- /**
- * Determine error severity
- */
- determineSeverity(error, context) {
- // Critical errors that affect system stability
- if (error.message.includes('memory') ||
- error.message.includes('corruption') ||
- error.message.includes('fatal') ||
- context.category === ErrorCategory.MEMORY) {
- return ErrorSeverity.CRITICAL;
- }
-
- // High severity errors that affect functionality
- if (error.message.includes('database') ||
- error.message.includes('network') ||
- error.message.includes('timeout') ||
- context.category === ErrorCategory.PERSISTENCE ||
- context.category === ErrorCategory.WASM) {
- return ErrorSeverity.HIGH;
- }
-
- // Medium severity for recoverable errors
- if (error.message.includes('validation') ||
- error.message.includes('configuration') ||
- context.category === ErrorCategory.VALIDATION) {
- return ErrorSeverity.MEDIUM;
- }
-
- return ErrorSeverity.LOW;
- }
-
- /**
- * Determine recovery strategy based on error type and context
- */
- determineRecoveryStrategy(error, context) {
- const severity = this.determineSeverity(error, context);
-
- // Critical errors require immediate intervention
- if (severity === ErrorSeverity.CRITICAL) {
- return RecoveryStrategy.MANUAL_INTERVENTION;
- }
-
- // Network and timeout errors benefit from retries
- if (error.message.includes('network') ||
- error.message.includes('timeout') ||
- error.message.includes('ECONNREFUSED')) {
- return RecoveryStrategy.RETRY;
- }
-
- // Database errors use circuit breaker
- if (context.category === ErrorCategory.PERSISTENCE) {
- return RecoveryStrategy.CIRCUIT_BREAKER;
- }
-
- // WASM errors use graceful degradation
- if (context.category === ErrorCategory.WASM ||
- context.category === ErrorCategory.NEURAL) {
- return RecoveryStrategy.GRACEFUL_DEGRADATION;
- }
-
- // Default to fallback
- return RecoveryStrategy.FALLBACK;
- }
-
- /**
- * Execute recovery strategy
- */
- async executeRecoveryStrategy(strategy, error, context) {
- switch (strategy) {
- case RecoveryStrategy.RETRY:
- // Already handled by RetryManager, so this is an escalation
- throw new Error(`Retry strategy exhausted for ${context.operation}`);
-
- case RecoveryStrategy.FALLBACK:
- return this.executeFallback(error, context);
-
- case RecoveryStrategy.CIRCUIT_BREAKER:
- throw new Error(`Circuit breaker activated for ${context.component}`);
-
- case RecoveryStrategy.GRACEFUL_DEGRADATION:
- return this.executeGracefulDegradation(error, context);
-
- case RecoveryStrategy.RESTART:
- return this.executeRestart(error, context);
-
- case RecoveryStrategy.MANUAL_INTERVENTION:
- this.notifyManualIntervention(error, context);
- throw new Error(`Manual intervention required: ${error.message}`);
-
- default:
- throw new Error(`Unknown recovery strategy: ${strategy}`);
- }
- }
-
- /**
- * Execute fallback operation
- */
- async executeFallback(error, context) {
- console.warn(`Executing fallback for ${context.operation}: ${error.message}`);
-
- // Component-specific fallback strategies
- switch (context.category) {
- case ErrorCategory.PERSISTENCE:
- return this.persistenceFallback(context);
-
- case ErrorCategory.MCP:
- return this.mcpFallback(context);
-
- case ErrorCategory.NEURAL:
- return this.neuralFallback(context);
-
- default:
- return {
- success: false,
- fallback: true,
- message: `Fallback executed for ${context.operation}`,
- error: error.message
- };
- }
- }
-
- /**
- * Execute graceful degradation
- */
- async executeGracefulDegradation(error, context) {
- console.warn(`Graceful degradation for ${context.operation}: ${error.message}`);
-
- return {
- success: true,
- degraded: true,
- message: `Operating in degraded mode for ${context.operation}`,
- limitations: this.getDegradationLimitations(context.category),
- originalError: error.message
- };
- }
-
- /**
- * Get degradation limitations for each component
- */
- getDegradationLimitations(category) {
- const limitations = {
- [ErrorCategory.WASM]: [
- 'WASM acceleration disabled',
- 'Fallback to JavaScript implementation',
- 'Reduced performance expected'
- ],
- [ErrorCategory.NEURAL]: [
- 'Neural network features disabled',
- 'Basic agent behavior only',
- 'No learning capabilities'
- ],
- [ErrorCategory.PERSISTENCE]: [
- 'In-memory storage only',
- 'Data not persisted across sessions',
- 'Limited historical data'
- ]
- };
-
- return limitations[category] || ['Feature partially unavailable'];
- }
-
- /**
- * Component-specific fallback implementations
- */
- async persistenceFallback(context) {
- return {
- success: true,
- fallback: true,
- storage: 'memory',
- message: 'Using in-memory storage due to persistence failure',
- limitations: ['Data will not persist across restarts']
- };
- }
-
- async mcpFallback(context) {
- return {
- success: true,
- fallback: true,
- mode: 'local',
- message: 'MCP communication failed, using local operations',
- limitations: ['Limited external tool access']
- };
- }
-
- async neuralFallback(context) {
- return {
- success: true,
- fallback: true,
- mode: 'basic',
- message: 'Neural features unavailable, using basic agent behavior',
- limitations: ['No learning capabilities', 'Reduced cognitive patterns']
- };
- }
-
- /**
- * Execute restart strategy
- */
- async executeRestart(error, context) {
- console.warn(`Restarting ${context.component} due to: ${error.message}`);
-
- this.emit('restart', { component: context.component, reason: error.message });
-
- return {
- success: true,
- restarted: true,
- component: context.component,
- message: `Component ${context.component} restarted`
- };
- }
-
- /**
- * Notify for manual intervention
- */
- notifyManualIntervention(error, context) {
- const alert = {
- timestamp: new Date().toISOString(),
- severity: 'CRITICAL',
- component: context.component,
- operation: context.operation,
- error: error.message,
- correlationId: context.correlationId,
- requiredAction: 'Manual intervention required'
- };
-
- console.error('🚨 CRITICAL ERROR - MANUAL INTERVENTION REQUIRED:', alert);
- this.emit('manualIntervention', alert);
- }
-
- /**
- * Get or create circuit breaker
- */
- getCircuitBreaker(key, options = {}) {
- if (!this.circuitBreakers.has(key)) {
- this.circuitBreakers.set(key, new CircuitBreaker({
- name: key,
- ...options
- }));
- }
- return this.circuitBreakers.get(key);
- }
-
- /**
- * Log error with correlation tracking
- */
- logError(errorRecord) {
- this.errorLog.push(errorRecord);
-
- // Maintain log size
- if (this.errorLog.length > this.maxLogSize) {
- this.errorLog = this.errorLog.slice(-this.maxLogSize);
- }
-
- // Console logging with appropriate level
- const logLevel = {
- [ErrorSeverity.LOW]: 'log',
- [ErrorSeverity.MEDIUM]: 'warn',
- [ErrorSeverity.HIGH]: 'error',
- [ErrorSeverity.CRITICAL]: 'error'
- };
-
- console[logLevel[errorRecord.severity]](`[${errorRecord.severity}] ${errorRecord.component}.${errorRecord.operation}: ${errorRecord.error.message}`, {
- correlationId: errorRecord.correlationId,
- operationId: errorRecord.operationId
- });
- }
-
- /**
- * Log successful operation
- */
- logSuccess(context, executionTime) {
- if (context.logSuccess !== false) {
- console.log(`✅ ${context.component}.${context.operation} completed successfully (${executionTime}ms)`, {
- correlationId: context.correlationId,
- operationId: context.operationId
- });
- }
- }
-
- /**
- * Start background health monitoring
- */
- startHealthMonitoring() {
- const healthCheckTimer = setInterval(() => {
- this.performHealthCheck();
- }, this.healthCheckInterval);
-
- // Clean up on exit
- process.on('exit', () => clearInterval(healthCheckTimer));
- process.on('SIGINT', () => clearInterval(healthCheckTimer));
- process.on('SIGTERM', () => clearInterval(healthCheckTimer));
- }
-
- /**
- * Perform system health check
- */
- performHealthCheck() {
- const now = Date.now();
- const windowStart = now - this.monitoringWindow;
-
- // Filter recent errors
- const recentErrors = this.errorLog.filter(error =>
- new Date(error.timestamp).getTime() >= windowStart
- );
-
- // Calculate metrics
- const totalOperations = recentErrors.length + this.getSuccessfulOperationsCount();
- const errorRate = totalOperations > 0 ? recentErrors.length / totalOperations : 0;
- const criticalErrors = recentErrors.filter(error =>
- error.severity === ErrorSeverity.CRITICAL
- ).length;
-
- // Check circuit breaker states
- const openCircuitBreakers = Array.from(this.circuitBreakers.values())
- .filter(cb => cb.state === 'OPEN').length;
-
- // Determine health status
- const previousHealth = this.isHealthy;
- this.isHealthy = (
- errorRate < this.alertThresholds.errorRate &&
- criticalErrors < this.alertThresholds.criticalErrors &&
- openCircuitBreakers < this.alertThresholds.circuitBreakerOpenings
- );
-
- // Emit health status change
- if (previousHealth !== this.isHealthy) {
- this.emit('healthStatusChange', {
- isHealthy: this.isHealthy,
- metrics: { errorRate, criticalErrors, openCircuitBreakers },
- timestamp: new Date().toISOString()
- });
- }
-
- this.lastHealthCheck = now;
- }
-
- /**
- * Get successful operations count (placeholder - should integrate with actual metrics)
- */
- getSuccessfulOperationsCount() {
- // This would integrate with actual operation metrics
- return 100; // Placeholder
- }
-
- /**
- * Get comprehensive error statistics
- */
- getErrorStatistics(timeWindow = this.monitoringWindow) {
- const now = Date.now();
- const windowStart = now - timeWindow;
-
- const recentErrors = this.errorLog.filter(error =>
- new Date(error.timestamp).getTime() >= windowStart
- );
-
- const stats = {
- total: recentErrors.length,
- bySeverity: {},
- byCategory: {},
- byComponent: {},
- correlationGroups: {},
- circuitBreakers: {}
- };
-
- // Group by severity
- Object.values(ErrorSeverity).forEach(severity => {
- stats.bySeverity[severity] = recentErrors.filter(error =>
- error.severity === severity
- ).length;
- });
-
- // Group by category
- Object.values(ErrorCategory).forEach(category => {
- stats.byCategory[category] = recentErrors.filter(error =>
- error.category === category
- ).length;
- });
-
- // Group by component
- recentErrors.forEach(error => {
- stats.byComponent[error.component] = (stats.byComponent[error.component] || 0) + 1;
- });
-
- // Group by correlation ID (related errors)
- recentErrors.forEach(error => {
- if (!stats.correlationGroups[error.correlationId]) {
- stats.correlationGroups[error.correlationId] = [];
- }
- stats.correlationGroups[error.correlationId].push(error.id);
- });
-
- // Circuit breaker statistics
- this.circuitBreakers.forEach((breaker, name) => {
- stats.circuitBreakers[name] = breaker.getStats();
- });
-
- return stats;
- }
-
- /**
- * Generate error handling recommendations
- */
- generateRecommendations() {
- const stats = this.getErrorStatistics();
- const recommendations = [];
-
- // High error rate recommendations
- if (stats.bySeverity[ErrorSeverity.CRITICAL] > 0) {
- recommendations.push({
- priority: 'HIGH',
- type: 'critical_errors',
- message: `${stats.bySeverity[ErrorSeverity.CRITICAL]} critical errors detected`,
- action: 'Investigate and resolve critical issues immediately'
- });
- }
-
- // Component-specific recommendations
- Object.entries(stats.byComponent).forEach(([component, count]) => {
- if (count > 10) {
- recommendations.push({
- priority: 'MEDIUM',
- type: 'component_errors',
- message: `High error count in ${component}: ${count}`,
- action: `Review ${component} component for reliability issues`
- });
- }
- });
-
- // Circuit breaker recommendations
- Object.entries(stats.circuitBreakers).forEach(([name, cbStats]) => {
- if (cbStats.state === 'OPEN') {
- recommendations.push({
- priority: 'HIGH',
- type: 'circuit_breaker',
- message: `Circuit breaker ${name} is OPEN`,
- action: 'Check underlying service health and consider manual reset'
- });
- }
- });
-
- return recommendations;
- }
-
- /**
- * Get current system health status
- */
- getHealthStatus() {
- return {
- isHealthy: this.isHealthy,
- lastHealthCheck: new Date(this.lastHealthCheck).toISOString(),
- errorStatistics: this.getErrorStatistics(),
- circuitBreakers: Array.from(this.circuitBreakers.entries()).map(([name, breaker]) => ({
- name,
- ...breaker.getStats()
- })),
- recommendations: this.generateRecommendations(),
- uptime: process.uptime(),
- memoryUsage: process.memoryUsage()
- };
- }
-}
-
-export default ErrorHandlingManager;
\ No newline at end of file
diff --git a/ruv-swarm/npm/src/mcp-error-wrapper.js b/ruv-swarm/npm/src/mcp-error-wrapper.js
deleted file mode 100644
index 1681c412d8..0000000000
--- a/ruv-swarm/npm/src/mcp-error-wrapper.js
+++ /dev/null
@@ -1,973 +0,0 @@
-/**
- * Enhanced MCP Tools with Comprehensive Error Handling
- * Provides robust communication, validation, and recovery for MCP operations
- */
-
-import { EnhancedMCPTools } from './mcp-tools-enhanced.js';
-import { ErrorHandlingManager, ErrorCategory, ErrorSeverity } from './error-handling-manager.js';
-import crypto from 'crypto';
-
-// MCP-specific error types
-export class MCPTimeoutError extends Error {
- constructor(operation, timeout) {
- super(`MCP operation ${operation} timed out after ${timeout}ms`);
- this.name = 'MCPTimeoutError';
- this.operation = operation;
- this.timeout = timeout;
- }
-}
-
-export class MCPValidationError extends Error {
- constructor(message, parameter, value) {
- super(message);
- this.name = 'MCPValidationError';
- this.parameter = parameter;
- this.value = value;
- }
-}
-
-export class MCPCommunicationError extends Error {
- constructor(message, operation, retryable = true) {
- super(message);
- this.name = 'MCPCommunicationError';
- this.operation = operation;
- this.retryable = retryable;
- }
-}
-
-/**
- * MCP Operation Validator
- */
-class MCPValidator {
- static validateSwarmInit(params) {
- const errors = [];
-
- if (params.topology && !['mesh', 'hierarchical', 'ring', 'star', 'centralized', 'distributed'].includes(params.topology)) {
- errors.push(new MCPValidationError(
- 'Invalid topology. Must be one of: mesh, hierarchical, ring, star, centralized, distributed',
- 'topology',
- params.topology
- ));
- }
-
- if (params.maxAgents !== undefined) {
- if (typeof params.maxAgents !== 'number' || params.maxAgents < 1 || params.maxAgents > 1000) {
- errors.push(new MCPValidationError(
- 'maxAgents must be a number between 1 and 1000',
- 'maxAgents',
- params.maxAgents
- ));
- }
- }
-
- if (params.strategy && !['balanced', 'specialized', 'adaptive', 'parallel'].includes(params.strategy)) {
- errors.push(new MCPValidationError(
- 'Invalid strategy. Must be one of: balanced, specialized, adaptive, parallel',
- 'strategy',
- params.strategy
- ));
- }
-
- return errors;
- }
-
- static validateAgentSpawn(params) {
- const errors = [];
-
- if (params.type && !['coordinator', 'researcher', 'coder', 'analyst', 'architect', 'tester', 'reviewer', 'optimizer', 'documenter', 'monitor', 'specialist'].includes(params.type)) {
- errors.push(new MCPValidationError(
- 'Invalid agent type. Must be one of: coordinator, researcher, coder, analyst, architect, tester, reviewer, optimizer, documenter, monitor, specialist',
- 'type',
- params.type
- ));
- }
-
- if (params.name && (typeof params.name !== 'string' || params.name.length === 0 || params.name.length > 100)) {
- errors.push(new MCPValidationError(
- 'Agent name must be a non-empty string with max length of 100 characters',
- 'name',
- params.name
- ));
- }
-
- if (params.capabilities && !Array.isArray(params.capabilities)) {
- errors.push(new MCPValidationError(
- 'Capabilities must be an array',
- 'capabilities',
- params.capabilities
- ));
- }
-
- return errors;
- }
-
- static validateTaskOrchestrate(params) {
- const errors = [];
-
- if (!params.task || typeof params.task !== 'string' || params.task.trim().length === 0) {
- errors.push(new MCPValidationError(
- 'Task description is required and must be a non-empty string',
- 'task',
- params.task
- ));
- }
-
- if (params.priority && !['low', 'medium', 'high', 'critical'].includes(params.priority)) {
- errors.push(new MCPValidationError(
- 'Invalid priority. Must be one of: low, medium, high, critical',
- 'priority',
- params.priority
- ));
- }
-
- if (params.maxAgents !== undefined) {
- if (typeof params.maxAgents !== 'number' || params.maxAgents < 1 || params.maxAgents > 100) {
- errors.push(new MCPValidationError(
- 'maxAgents must be a number between 1 and 100',
- 'maxAgents',
- params.maxAgents
- ));
- }
- }
-
- return errors;
- }
-
- static validateNeuralTrain(params) {
- const errors = [];
-
- if (!params.agentId || typeof params.agentId !== 'string') {
- errors.push(new MCPValidationError(
- 'agentId is required and must be a string',
- 'agentId',
- params.agentId
- ));
- }
-
- if (params.iterations !== undefined) {
- if (typeof params.iterations !== 'number' || params.iterations < 1 || params.iterations > 10000) {
- errors.push(new MCPValidationError(
- 'iterations must be a number between 1 and 10000',
- 'iterations',
- params.iterations
- ));
- }
- }
-
- if (params.learningRate !== undefined) {
- if (typeof params.learningRate !== 'number' || params.learningRate <= 0 || params.learningRate > 1) {
- errors.push(new MCPValidationError(
- 'learningRate must be a number between 0 and 1 (exclusive of 0)',
- 'learningRate',
- params.learningRate
- ));
- }
- }
-
- return errors;
- }
-}
-
-/**
- * Enhanced MCP Tools with robust error handling
- */
-export class RobustMCPTools {
- constructor(ruvSwarmInstance = null, options = {}) {
- this.baseMCP = new EnhancedMCPTools(ruvSwarmInstance);
- this.errorHandler = new ErrorHandlingManager({
- retry: {
- maxRetries: 3,
- initialDelay: 1000,
- maxDelay: 15000,
- backoffMultiplier: 2
- },
- circuitBreaker: {
- failureThreshold: 5,
- recoveryTimeout: 30000
- },
- ...options.errorHandling
- });
-
- // MCP-specific configurations
- this.operationTimeouts = {
- swarm_init: 30000,
- agent_spawn: 15000,
- task_orchestrate: 20000,
- neural_train: 60000,
- benchmark_run: 120000,
- memory_usage: 5000,
- swarm_status: 5000,
- task_status: 5000,
- task_results: 10000
- };
-
- this.validationCache = new Map();
- this.operationHistory = [];
- this.maxHistorySize = 1000;
-
- // Performance monitoring
- this.performanceMetrics = {
- totalOperations: 0,
- successfulOperations: 0,
- failedOperations: 0,
- averageResponseTime: 0,
- operationCounts: {}
- };
-
- this.setupEventHandlers();
- }
-
- /**
- * Initialize with comprehensive error handling
- */
- async initialize(ruvSwarmInstance = null) {
- return await this.errorHandler.wrapOperation(async () => {
- console.log('🔧 Initializing robust MCP tools...');
-
- // Validate ruv-swarm instance if provided
- if (ruvSwarmInstance && !this.validateRuvSwarmInstance(ruvSwarmInstance)) {
- throw new Error('Invalid ruv-swarm instance provided');
- }
-
- const result = await this.withTimeout(
- this.baseMCP.initialize(ruvSwarmInstance),
- 30000,
- 'MCP initialization'
- );
-
- console.log('✅ Robust MCP tools initialized successfully');
- return result;
- }, {
- category: ErrorCategory.MCP,
- component: 'mcp-tools',
- operation: 'initialize'
- });
- }
-
- /**
- * Enhanced swarm_init with validation and error recovery
- */
- async swarm_init(params = {}) {
- return await this.executeValidatedOperation('swarm_init', params, async (validatedParams) => {
- // Pre-operation checks
- await this.preOperationChecks('swarm_init');
-
- const result = await this.withTimeout(
- this.baseMCP.swarm_init(validatedParams),
- this.operationTimeouts.swarm_init,
- 'swarm_init'
- );
-
- // Post-operation validation
- this.validateSwarmInitResult(result);
-
- return result;
- });
- }
-
- /**
- * Enhanced agent_spawn with validation and monitoring
- */
- async agent_spawn(params = {}) {
- return await this.executeValidatedOperation('agent_spawn', params, async (validatedParams) => {
- await this.preOperationChecks('agent_spawn');
-
- const result = await this.withTimeout(
- this.baseMCP.agent_spawn(validatedParams),
- this.operationTimeouts.agent_spawn,
- 'agent_spawn'
- );
-
- this.validateAgentSpawnResult(result);
-
- return result;
- });
- }
-
- /**
- * Enhanced task_orchestrate with dependency checking
- */
- async task_orchestrate(params = {}) {
- return await this.executeValidatedOperation('task_orchestrate', params, async (validatedParams) => {
- await this.preOperationChecks('task_orchestrate');
-
- // Check for available agents before orchestration
- await this.checkAgentAvailability(validatedParams);
-
- const result = await this.withTimeout(
- this.baseMCP.task_orchestrate(validatedParams),
- this.operationTimeouts.task_orchestrate,
- 'task_orchestrate'
- );
-
- this.validateTaskOrchestrationResult(result);
-
- return result;
- });
- }
-
- /**
- * Enhanced neural_train with comprehensive validation
- */
- async neural_train(params = {}) {
- return await this.executeValidatedOperation('neural_train', params, async (validatedParams) => {
- await this.preOperationChecks('neural_train');
-
- // Verify neural capabilities are available
- await this.verifyNeuralCapabilities();
-
- // Check agent exists and is capable of neural training
- await this.verifyAgentForNeuralTraining(validatedParams.agentId);
-
- const result = await this.withTimeout(
- this.baseMCP.neural_train(validatedParams),
- this.operationTimeouts.neural_train,
- 'neural_train'
- );
-
- this.validateNeuralTrainResult(result);
-
- return result;
- });
- }
-
- /**
- * Enhanced task_results with comprehensive error handling
- */
- async task_results(params = {}) {
- return await this.executeValidatedOperation('task_results', params, async (validatedParams) => {
- await this.preOperationChecks('task_results');
-
- // Verify task exists
- if (validatedParams.taskId) {
- await this.verifyTaskExists(validatedParams.taskId);
- }
-
- const result = await this.withTimeout(
- this.baseMCP.task_results(validatedParams),
- this.operationTimeouts.task_results,
- 'task_results'
- );
-
- this.validateTaskResultsResponse(result);
-
- return result;
- });
- }
-
- /**
- * Enhanced benchmark_run with resource monitoring
- */
- async benchmark_run(params = {}) {
- return await this.executeValidatedOperation('benchmark_run', params, async (validatedParams) => {
- await this.preOperationChecks('benchmark_run');
-
- // Check system resources before benchmark
- const resourceCheck = await this.checkSystemResources();
- if (!resourceCheck.suitable) {
- console.warn('⚠️ System resources may be insufficient for benchmarking:', resourceCheck.warnings);
- }
-
- const result = await this.withTimeout(
- this.baseMCP.benchmark_run(validatedParams),
- this.operationTimeouts.benchmark_run,
- 'benchmark_run'
- );
-
- this.validateBenchmarkResult(result);
-
- return result;
- });
- }
-
- /**
- * Execute operation with validation and error handling
- */
- async executeValidatedOperation(operationName, params, operation) {
- const operationId = crypto.randomUUID();
- const startTime = Date.now();
-
- try {
- // Validate parameters
- const validatedParams = await this.validateParameters(operationName, params);
-
- // Record operation start
- this.recordOperationStart(operationId, operationName, validatedParams);
-
- // Execute operation with error handling
- const result = await this.errorHandler.wrapOperation(operation, {
- category: ErrorCategory.MCP,
- component: 'mcp-tools',
- operation: operationName,
- operationId,
- parameters: validatedParams
- })(validatedParams);
-
- // Record successful operation
- this.recordOperationEnd(operationId, true, Date.now() - startTime, result);
-
- return result;
- } catch (error) {
- // Record failed operation
- this.recordOperationEnd(operationId, false, Date.now() - startTime, null, error);
-
- // Enhance error with operation context
- const enhancedError = this.enhanceError(error, operationName, params);
- throw enhancedError;
- }
- }
-
- /**
- * Validate operation parameters
- */
- async validateParameters(operationName, params) {
- // Check cache first
- const cacheKey = `${operationName}_${JSON.stringify(params)}`;
- if (this.validationCache.has(cacheKey)) {
- return this.validationCache.get(cacheKey);
- }
-
- let validationErrors = [];
-
- // Operation-specific validation
- switch (operationName) {
- case 'swarm_init':
- validationErrors = MCPValidator.validateSwarmInit(params);
- break;
- case 'agent_spawn':
- validationErrors = MCPValidator.validateAgentSpawn(params);
- break;
- case 'task_orchestrate':
- validationErrors = MCPValidator.validateTaskOrchestrate(params);
- break;
- case 'neural_train':
- validationErrors = MCPValidator.validateNeuralTrain(params);
- break;
- // Add more validators as needed
- }
-
- if (validationErrors.length > 0) {
- const errorMessages = validationErrors.map(e => e.message).join('; ');
- throw new MCPValidationError(`Parameter validation failed: ${errorMessages}`, 'multiple', params);
- }
-
- // Cache successful validation
- this.validationCache.set(cacheKey, params);
-
- // Limit cache size
- if (this.validationCache.size > 1000) {
- const firstKey = this.validationCache.keys().next().value;
- this.validationCache.delete(firstKey);
- }
-
- return params;
- }
-
- /**
- * Pre-operation checks
- */
- async preOperationChecks(operationName) {
- // Check if MCP tools are initialized
- if (!this.baseMCP.ruvSwarm) {
- throw new MCPCommunicationError('MCP tools not properly initialized', operationName);
- }
-
- // Check system health
- const health = await this.checkSystemHealth();
- if (!health.healthy && health.severity === 'critical') {
- throw new MCPCommunicationError(`System health critical, cannot execute ${operationName}`, operationName, false);
- }
-
- // Check operation-specific requirements
- await this.checkOperationRequirements(operationName);
- }
-
- /**
- * Check system health before operations
- */
- async checkSystemHealth() {
- try {
- const memoryUsage = process.memoryUsage();
- const memoryUsageMB = memoryUsage.used / (1024 * 1024);
-
- const health = {
- healthy: true,
- severity: 'normal',
- issues: []
- };
-
- // Memory check
- if (memoryUsageMB > 1000) { // > 1GB
- health.issues.push(`High memory usage: ${memoryUsageMB.toFixed(2)}MB`);
- health.severity = 'warning';
- }
-
- if (memoryUsageMB > 2000) { // > 2GB
- health.healthy = false;
- health.severity = 'critical';
- }
-
- // CPU usage check (simplified)
- const loadAverage = process.loadavg ? process.loadavg()[0] : 0;
- if (loadAverage > 2.0) {
- health.issues.push(`High CPU load: ${loadAverage.toFixed(2)}`);
- health.severity = health.severity === 'critical' ? 'critical' : 'warning';
- }
-
- return health;
- } catch (error) {
- return {
- healthy: false,
- severity: 'warning',
- issues: [`Health check failed: ${error.message}`]
- };
- }
- }
-
- /**
- * Check operation-specific requirements
- */
- async checkOperationRequirements(operationName) {
- switch (operationName) {
- case 'neural_train':
- await this.verifyNeuralCapabilities();
- break;
- case 'benchmark_run':
- const resources = await this.checkSystemResources();
- if (!resources.suitable) {
- console.warn('⚠️ System may not be suitable for benchmarking');
- }
- break;
- // Add more requirement checks
- }
- }
-
- /**
- * Verify neural capabilities are available
- */
- async verifyNeuralCapabilities() {
- try {
- const features = await this.baseMCP.features_detect({ category: 'neural_networks' });
- if (!features.available) {
- throw new MCPCommunicationError('Neural network capabilities not available', 'neural_train', false);
- }
- } catch (error) {
- throw new MCPCommunicationError(`Failed to verify neural capabilities: ${error.message}`, 'neural_train', true);
- }
- }
-
- /**
- * Check system resources for resource-intensive operations
- */
- async checkSystemResources() {
- const memoryUsage = process.memoryUsage();
- const memoryUsageMB = memoryUsage.used / (1024 * 1024);
-
- return {
- suitable: memoryUsageMB < 1500, // Less than 1.5GB
- warnings: memoryUsageMB > 1000 ? [`High memory usage: ${memoryUsageMB.toFixed(2)}MB`] : [],
- memory_mb: memoryUsageMB,
- uptime_hours: process.uptime() / 3600
- };
- }
-
- /**
- * Verify agent exists and capabilities for neural training
- */
- async verifyAgentForNeuralTraining(agentId) {
- try {
- const agents = await this.baseMCP.agent_list({ filter: 'all' });
- const agent = agents.agents.find(a => a.id === agentId);
-
- if (!agent) {
- throw new MCPValidationError(`Agent not found: ${agentId}`, 'agentId', agentId);
- }
-
- if (agent.status === 'error' || agent.status === 'offline') {
- throw new MCPCommunicationError(`Agent ${agentId} is not available (status: ${agent.status})`, 'neural_train', true);
- }
- } catch (error) {
- if (error instanceof MCPValidationError || error instanceof MCPCommunicationError) {
- throw error;
- }
- throw new MCPCommunicationError(`Failed to verify agent ${agentId}: ${error.message}`, 'neural_train', true);
- }
- }
-
- /**
- * Verify task exists
- */
- async verifyTaskExists(taskId) {
- try {
- const status = await this.baseMCP.task_status({ taskId });
- if (!status || !status.id) {
- throw new MCPValidationError(`Task not found: ${taskId}`, 'taskId', taskId);
- }
- } catch (error) {
- if (error instanceof MCPValidationError) {
- throw error;
- }
- throw new MCPCommunicationError(`Failed to verify task ${taskId}: ${error.message}`, 'task_results', true);
- }
- }
-
- /**
- * Check agent availability for task orchestration
- */
- async checkAgentAvailability(params) {
- try {
- const agents = await this.baseMCP.agent_list({ filter: 'idle' });
- const availableAgents = agents.agents || [];
-
- if (availableAgents.length === 0) {
- throw new MCPCommunicationError('No idle agents available for task orchestration', 'task_orchestrate', false);
- }
-
- const maxAgents = params.maxAgents || availableAgents.length;
- if (availableAgents.length < maxAgents) {
- console.warn(`⚠️ Requested ${maxAgents} agents but only ${availableAgents.length} available`);
- }
- } catch (error) {
- if (error instanceof MCPCommunicationError) {
- throw error;
- }
- throw new MCPCommunicationError(`Failed to check agent availability: ${error.message}`, 'task_orchestrate', true);
- }
- }
-
- /**
- * Add timeout to operations
- */
- async withTimeout(promise, timeoutMs, operationName) {
- const timeoutPromise = new Promise((_, reject) => {
- setTimeout(() => {
- reject(new MCPTimeoutError(operationName, timeoutMs));
- }, timeoutMs);
- });
-
- return Promise.race([promise, timeoutPromise]);
- }
-
- /**
- * Validate operation results
- */
- validateSwarmInitResult(result) {
- if (!result || !result.id) {
- throw new Error('Invalid swarm_init result: missing swarm ID');
- }
- if (!result.topology || !result.maxAgents) {
- throw new Error('Invalid swarm_init result: missing required fields');
- }
- }
-
- validateAgentSpawnResult(result) {
- if (!result || !result.agent || !result.agent.id) {
- throw new Error('Invalid agent_spawn result: missing agent information');
- }
- }
-
- validateTaskOrchestrationResult(result) {
- if (!result || !result.taskId) {
- throw new Error('Invalid task_orchestrate result: missing task ID');
- }
- if (!result.assigned_agents || result.assigned_agents.length === 0) {
- throw new Error('Invalid task_orchestrate result: no agents assigned');
- }
- }
-
- validateNeuralTrainResult(result) {
- if (!result || !result.training_complete) {
- throw new Error('Invalid neural_train result: training not completed');
- }
- if (typeof result.final_accuracy !== 'number' || result.final_accuracy < 0 || result.final_accuracy > 1) {
- throw new Error('Invalid neural_train result: invalid accuracy value');
- }
- }
-
- validateTaskResultsResponse(result) {
- if (!result || !result.task_id) {
- throw new Error('Invalid task_results response: missing task ID');
- }
- }
-
- validateBenchmarkResult(result) {
- if (!result || !result.results) {
- throw new Error('Invalid benchmark_run result: missing results');
- }
- }
-
- /**
- * Enhance error with additional context
- */
- enhanceError(error, operationName, params) {
- if (error instanceof MCPTimeoutError ||
- error instanceof MCPValidationError ||
- error instanceof MCPCommunicationError) {
- return error; // Already enhanced
- }
-
- // Add operation context to generic errors
- const enhancedError = new MCPCommunicationError(
- `${operationName} failed: ${error.message}`,
- operationName,
- this.isRetryableError(error)
- );
-
- enhancedError.originalError = error;
- enhancedError.parameters = params;
- enhancedError.timestamp = new Date().toISOString();
-
- return enhancedError;
- }
-
- /**
- * Determine if error is retryable
- */
- isRetryableError(error) {
- const retryablePatterns = [
- 'timeout',
- 'network',
- 'connection',
- 'temporary',
- 'busy',
- 'rate limit',
- 'service unavailable'
- ];
-
- const errorMessage = error.message.toLowerCase();
- return retryablePatterns.some(pattern => errorMessage.includes(pattern));
- }
-
- /**
- * Record operation metrics
- */
- recordOperationStart(operationId, operationName, params) {
- this.performanceMetrics.totalOperations++;
- this.performanceMetrics.operationCounts[operationName] =
- (this.performanceMetrics.operationCounts[operationName] || 0) + 1;
-
- this.operationHistory.push({
- id: operationId,
- operation: operationName,
- startTime: Date.now(),
- parameters: JSON.stringify(params),
- status: 'running'
- });
-
- // Maintain history size
- if (this.operationHistory.length > this.maxHistorySize) {
- this.operationHistory.shift();
- }
- }
-
- recordOperationEnd(operationId, success, duration, result, error) {
- const operation = this.operationHistory.find(op => op.id === operationId);
- if (operation) {
- operation.endTime = Date.now();
- operation.duration = duration;
- operation.status = success ? 'completed' : 'failed';
- operation.error = error?.message;
- operation.result = success ? 'success' : 'error';
- }
-
- if (success) {
- this.performanceMetrics.successfulOperations++;
- } else {
- this.performanceMetrics.failedOperations++;
- }
-
- // Update average response time
- const totalSuccessful = this.performanceMetrics.successfulOperations;
- if (success && totalSuccessful > 0) {
- this.performanceMetrics.averageResponseTime =
- ((this.performanceMetrics.averageResponseTime * (totalSuccessful - 1)) + duration) / totalSuccessful;
- }
- }
-
- /**
- * Setup event handlers for monitoring
- */
- setupEventHandlers() {
- this.errorHandler.on('error', (errorRecord) => {
- console.error(`🚨 MCP Error: ${errorRecord.operation} - ${errorRecord.error.message}`);
- });
-
- this.errorHandler.on('criticalError', (errorRecord) => {
- console.error(`💥 Critical MCP Error: ${errorRecord.operation} - Manual intervention may be required`);
- });
-
- this.errorHandler.on('healthStatusChange', (status) => {
- if (!status.isHealthy) {
- console.warn('⚠️ MCP system health degraded:', status.metrics);
- } else {
- console.log('✅ MCP system health restored');
- }
- });
- }
-
- /**
- * Validate ruv-swarm instance
- */
- validateRuvSwarmInstance(instance) {
- return instance &&
- typeof instance === 'object' &&
- typeof instance.createSwarm === 'function' &&
- typeof instance.getGlobalMetrics === 'function';
- }
-
- /**
- * Get comprehensive health status
- */
- async getHealthStatus() {
- const systemHealth = await this.checkSystemHealth();
- const errorHandlerHealth = this.errorHandler.getHealthStatus();
-
- return {
- mcp_tools: {
- initialized: !!this.baseMCP.ruvSwarm,
- system_health: systemHealth,
- performance_metrics: this.performanceMetrics,
- operation_history_size: this.operationHistory.length,
- validation_cache_size: this.validationCache.size
- },
- error_handling: errorHandlerHealth,
- overall_health: systemHealth.healthy && errorHandlerHealth.isHealthy,
- recommendations: this.generateHealthRecommendations(systemHealth, errorHandlerHealth)
- };
- }
-
- /**
- * Generate health recommendations
- */
- generateHealthRecommendations(systemHealth, errorHandlerHealth) {
- const recommendations = [];
-
- if (!systemHealth.healthy) {
- recommendations.push({
- type: 'system_health',
- priority: 'high',
- message: 'System health issues detected',
- issues: systemHealth.issues,
- actions: ['Monitor memory usage', 'Check CPU load', 'Consider restarting processes']
- });
- }
-
- const failureRate = this.performanceMetrics.totalOperations > 0 ?
- this.performanceMetrics.failedOperations / this.performanceMetrics.totalOperations : 0;
-
- if (failureRate > 0.1) { // >10% failure rate
- recommendations.push({
- type: 'high_failure_rate',
- priority: 'medium',
- message: `High failure rate: ${(failureRate * 100).toFixed(1)}%`,
- actions: ['Review error logs', 'Check system resources', 'Validate parameters']
- });
- }
-
- if (this.performanceMetrics.averageResponseTime > 10000) { // >10 seconds
- recommendations.push({
- type: 'slow_responses',
- priority: 'medium',
- message: `Slow average response time: ${this.performanceMetrics.averageResponseTime.toFixed(0)}ms`,
- actions: ['Check network connectivity', 'Monitor system load', 'Consider increasing timeouts']
- });
- }
-
- return recommendations;
- }
-
- /**
- * Pass through other MCP methods with error handling wrapper
- */
- async swarm_status(params = {}) {
- return await this.executeValidatedOperation('swarm_status', params,
- async (p) => await this.withTimeout(
- this.baseMCP.swarm_status(p),
- this.operationTimeouts.swarm_status,
- 'swarm_status'
- )
- );
- }
-
- async task_status(params = {}) {
- return await this.executeValidatedOperation('task_status', params,
- async (p) => await this.withTimeout(
- this.baseMCP.task_status(p),
- this.operationTimeouts.task_status,
- 'task_status'
- )
- );
- }
-
- async agent_list(params = {}) {
- return await this.executeValidatedOperation('agent_list', params,
- async (p) => await this.withTimeout(
- this.baseMCP.agent_list(p),
- 5000,
- 'agent_list'
- )
- );
- }
-
- async memory_usage(params = {}) {
- return await this.executeValidatedOperation('memory_usage', params,
- async (p) => await this.withTimeout(
- this.baseMCP.memory_usage(p),
- this.operationTimeouts.memory_usage,
- 'memory_usage'
- )
- );
- }
-
- async features_detect(params = {}) {
- return await this.executeValidatedOperation('features_detect', params,
- async (p) => await this.withTimeout(
- this.baseMCP.features_detect(p),
- 10000,
- 'features_detect'
- )
- );
- }
-
- async neural_status(params = {}) {
- return await this.executeValidatedOperation('neural_status', params,
- async (p) => await this.withTimeout(
- this.baseMCP.neural_status(p),
- 5000,
- 'neural_status'
- )
- );
- }
-
- async neural_patterns(params = {}) {
- return await this.executeValidatedOperation('neural_patterns', params,
- async (p) => await this.withTimeout(
- this.baseMCP.neural_patterns(p),
- 5000,
- 'neural_patterns'
- )
- );
- }
-
- async agent_metrics(params = {}) {
- return await this.executeValidatedOperation('agent_metrics', params,
- async (p) => await this.withTimeout(
- this.baseMCP.agent_metrics(p),
- 10000,
- 'agent_metrics'
- )
- );
- }
-
- async swarm_monitor(params = {}) {
- return await this.executeValidatedOperation('swarm_monitor', params,
- async (p) => await this.withTimeout(
- this.baseMCP.swarm_monitor(p),
- 15000,
- 'swarm_monitor'
- )
- );
- }
-}
-
-export default RobustMCPTools;
\ No newline at end of file
diff --git a/ruv-swarm/npm/src/persistence-error-wrapper.js b/ruv-swarm/npm/src/persistence-error-wrapper.js
deleted file mode 100644
index 6006e4fc4b..0000000000
--- a/ruv-swarm/npm/src/persistence-error-wrapper.js
+++ /dev/null
@@ -1,666 +0,0 @@
-/**
- * Enhanced Persistence Layer with Comprehensive Error Handling
- * Wraps SwarmPersistence with robust error recovery and data protection
- */
-
-import { SwarmPersistence } from './persistence.js';
-import { ErrorHandlingManager, ErrorCategory, ErrorSeverity } from './error-handling-manager.js';
-import fs from 'fs';
-import path from 'path';
-
-export class EnhancedSwarmPersistence {
- constructor(dbPath = null, options = {}) {
- this.errorHandler = new ErrorHandlingManager({
- retry: {
- maxRetries: 3,
- initialDelay: 1000,
- maxDelay: 10000
- },
- circuitBreaker: {
- failureThreshold: 5,
- recoveryTimeout: 30000
- },
- ...options.errorHandling
- });
-
- this.persistence = null;
- this.dbPath = dbPath;
- this.backupPath = options.backupPath || path.join(path.dirname(dbPath || './data/ruv-swarm.db'), 'backups');
- this.isInMemoryMode = false;
- this.memoryStore = new Map();
- this.transactionLog = [];
- this.corruptionDetector = new DatabaseCorruptionDetector();
-
- this.initializePersistence();
- }
-
- async initializePersistence() {
- try {
- await this.errorHandler.wrapOperation(async () => {
- // Ensure backup directory exists
- if (!fs.existsSync(this.backupPath)) {
- fs.mkdirSync(this.backupPath, { recursive: true });
- }
-
- // Check database integrity before connecting
- if (this.dbPath && fs.existsSync(this.dbPath)) {
- await this.corruptionDetector.checkDatabaseIntegrity(this.dbPath);
- }
-
- this.persistence = new SwarmPersistence(this.dbPath);
- console.log('✅ Persistence layer initialized successfully');
- }, {
- category: ErrorCategory.PERSISTENCE,
- component: 'persistence',
- operation: 'initialize'
- });
- } catch (error) {
- console.error('❌ Failed to initialize persistence, falling back to in-memory mode:', error.message);
- this.enableInMemoryMode();
- }
- }
-
- enableInMemoryMode() {
- this.isInMemoryMode = true;
- this.persistence = null;
- console.warn('⚠️ Operating in in-memory mode - data will not persist across restarts');
- }
-
- // Enhanced swarm operations with error handling
- async createSwarm(swarm) {
- return await this.errorHandler.wrapOperation(async () => {
- if (this.isInMemoryMode) {
- return this.createSwarmInMemory(swarm);
- }
-
- // Validate swarm data
- this.validateSwarmData(swarm);
-
- // Create backup before operation
- await this.createOperationBackup('create_swarm', swarm);
-
- // Record transaction
- const transactionId = this.recordTransaction('create_swarm', swarm);
-
- try {
- const result = this.persistence.createSwarm(swarm);
- this.commitTransaction(transactionId);
- return result;
- } catch (error) {
- this.rollbackTransaction(transactionId);
- throw error;
- }
- }, {
- category: ErrorCategory.PERSISTENCE,
- component: 'persistence',
- operation: 'createSwarm',
- swarmId: swarm.id
- });
- }
-
- async getActiveSwarms() {
- return await this.errorHandler.wrapOperation(async () => {
- if (this.isInMemoryMode) {
- return this.getActiveSwarmsFromMemory();
- }
-
- const swarms = this.persistence.getActiveSwarms();
-
- // Validate retrieved data
- swarms.forEach(swarm => {
- if (!this.isValidSwarmData(swarm)) {
- console.warn(`Invalid swarm data detected: ${swarm.id}`);
- }
- });
-
- return swarms;
- }, {
- category: ErrorCategory.PERSISTENCE,
- component: 'persistence',
- operation: 'getActiveSwarms'
- });
- }
-
- // Enhanced agent operations
- async createAgent(agent) {
- return await this.errorHandler.wrapOperation(async () => {
- if (this.isInMemoryMode) {
- return this.createAgentInMemory(agent);
- }
-
- this.validateAgentData(agent);
-
- const transactionId = this.recordTransaction('create_agent', agent);
-
- try {
- const result = this.persistence.createAgent(agent);
- this.commitTransaction(transactionId);
- return result;
- } catch (error) {
- this.rollbackTransaction(transactionId);
- throw error;
- }
- }, {
- category: ErrorCategory.PERSISTENCE,
- component: 'persistence',
- operation: 'createAgent',
- agentId: agent.id
- });
- }
-
- async updateAgentStatus(agentId, status) {
- return await this.errorHandler.wrapOperation(async () => {
- if (this.isInMemoryMode) {
- return this.updateAgentStatusInMemory(agentId, status);
- }
-
- this.validateStatusValue(status);
-
- const transactionId = this.recordTransaction('update_agent_status', { agentId, status });
-
- try {
- const result = this.persistence.updateAgentStatus(agentId, status);
- this.commitTransaction(transactionId);
- return result;
- } catch (error) {
- this.rollbackTransaction(transactionId);
- throw error;
- }
- }, {
- category: ErrorCategory.PERSISTENCE,
- component: 'persistence',
- operation: 'updateAgentStatus',
- agentId
- });
- }
-
- // Enhanced memory operations with TTL and cleanup
- async storeMemory(agentId, key, value, ttlSecs = null) {
- return await this.errorHandler.wrapOperation(async () => {
- if (this.isInMemoryMode) {
- return this.storeMemoryInMemory(agentId, key, value, ttlSecs);
- }
-
- this.validateMemoryData(agentId, key, value);
-
- const transactionId = this.recordTransaction('store_memory', { agentId, key, ttlSecs });
-
- try {
- const result = this.persistence.storeMemory(agentId, key, value, ttlSecs);
- this.commitTransaction(transactionId);
- return result;
- } catch (error) {
- this.rollbackTransaction(transactionId);
- throw error;
- }
- }, {
- category: ErrorCategory.PERSISTENCE,
- component: 'persistence',
- operation: 'storeMemory',
- agentId
- });
- }
-
- async getMemory(agentId, key) {
- return await this.errorHandler.wrapOperation(async () => {
- if (this.isInMemoryMode) {
- return this.getMemoryFromMemory(agentId, key);
- }
-
- const memory = this.persistence.getMemory(agentId, key);
-
- if (memory && this.isCorruptedMemoryData(memory)) {
- console.warn(`Corrupted memory data detected for agent ${agentId}, key ${key}`);
- await this.cleanupCorruptedMemory(agentId, key);
- return null;
- }
-
- return memory;
- }, {
- category: ErrorCategory.PERSISTENCE,
- component: 'persistence',
- operation: 'getMemory',
- agentId
- });
- }
-
- // Data validation methods
- validateSwarmData(swarm) {
- if (!swarm || typeof swarm !== 'object') {
- throw new Error('Invalid swarm data: must be an object');
- }
-
- if (!swarm.id || typeof swarm.id !== 'string') {
- throw new Error('Invalid swarm data: id is required and must be a string');
- }
-
- if (!swarm.name || typeof swarm.name !== 'string') {
- throw new Error('Invalid swarm data: name is required and must be a string');
- }
-
- if (!swarm.topology || typeof swarm.topology !== 'string') {
- throw new Error('Invalid swarm data: topology is required and must be a string');
- }
-
- if (typeof swarm.maxAgents !== 'number' || swarm.maxAgents < 1) {
- throw new Error('Invalid swarm data: maxAgents must be a positive number');
- }
- }
-
- validateAgentData(agent) {
- if (!agent || typeof agent !== 'object') {
- throw new Error('Invalid agent data: must be an object');
- }
-
- if (!agent.id || typeof agent.id !== 'string') {
- throw new Error('Invalid agent data: id is required and must be a string');
- }
-
- if (!agent.swarmId || typeof agent.swarmId !== 'string') {
- throw new Error('Invalid agent data: swarmId is required and must be a string');
- }
-
- if (!agent.name || typeof agent.name !== 'string') {
- throw new Error('Invalid agent data: name is required and must be a string');
- }
-
- if (!agent.type || typeof agent.type !== 'string') {
- throw new Error('Invalid agent data: type is required and must be a string');
- }
- }
-
- validateMemoryData(agentId, key, value) {
- if (!agentId || typeof agentId !== 'string') {
- throw new Error('Invalid memory data: agentId is required and must be a string');
- }
-
- if (!key || typeof key !== 'string') {
- throw new Error('Invalid memory data: key is required and must be a string');
- }
-
- if (value === undefined) {
- throw new Error('Invalid memory data: value cannot be undefined');
- }
-
- // Check for circular references in value
- try {
- JSON.stringify(value);
- } catch (error) {
- throw new Error('Invalid memory data: value contains circular references or is not serializable');
- }
- }
-
- validateStatusValue(status) {
- const validStatuses = ['idle', 'active', 'busy', 'error', 'offline'];
- if (!validStatuses.includes(status)) {
- throw new Error(`Invalid status value: ${status}. Must be one of: ${validStatuses.join(', ')}`);
- }
- }
-
- // In-memory mode implementations
- createSwarmInMemory(swarm) {
- const memoryKey = `swarm:${swarm.id}`;
- this.memoryStore.set(memoryKey, {
- ...swarm,
- status: 'active',
- created_at: new Date().toISOString()
- });
- return { changes: 1 };
- }
-
- getActiveSwarmsFromMemory() {
- const swarms = [];
- for (const [key, value] of this.memoryStore) {
- if (key.startsWith('swarm:') && value.status === 'active') {
- swarms.push(value);
- }
- }
- return swarms;
- }
-
- createAgentInMemory(agent) {
- const memoryKey = `agent:${agent.id}`;
- this.memoryStore.set(memoryKey, {
- ...agent,
- status: 'idle',
- created_at: new Date().toISOString()
- });
- return { changes: 1 };
- }
-
- updateAgentStatusInMemory(agentId, status) {
- const memoryKey = `agent:${agentId}`;
- const agent = this.memoryStore.get(memoryKey);
- if (agent) {
- agent.status = status;
- this.memoryStore.set(memoryKey, agent);
- return { changes: 1 };
- }
- return { changes: 0 };
- }
-
- storeMemoryInMemory(agentId, key, value, ttlSecs) {
- const memoryKey = `memory:${agentId}:${key}`;
- const expiresAt = ttlSecs ? Date.now() + (ttlSecs * 1000) : null;
-
- this.memoryStore.set(memoryKey, {
- agent_id: agentId,
- key,
- value: JSON.stringify(value),
- expires_at: expiresAt,
- created_at: new Date().toISOString()
- });
- return { changes: 1 };
- }
-
- getMemoryFromMemory(agentId, key) {
- const memoryKey = `memory:${agentId}:${key}`;
- const memory = this.memoryStore.get(memoryKey);
-
- if (!memory) return null;
-
- // Check TTL
- if (memory.expires_at && Date.now() > memory.expires_at) {
- this.memoryStore.delete(memoryKey);
- return null;
- }
-
- return {
- ...memory,
- value: JSON.parse(memory.value)
- };
- }
-
- // Transaction management
- recordTransaction(operation, data) {
- const transactionId = `tx_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
- this.transactionLog.push({
- id: transactionId,
- operation,
- data: JSON.parse(JSON.stringify(data)), // Deep clone
- timestamp: new Date().toISOString(),
- status: 'pending'
- });
- return transactionId;
- }
-
- commitTransaction(transactionId) {
- const transaction = this.transactionLog.find(tx => tx.id === transactionId);
- if (transaction) {
- transaction.status = 'committed';
- transaction.commitTime = new Date().toISOString();
- }
- }
-
- rollbackTransaction(transactionId) {
- const transaction = this.transactionLog.find(tx => tx.id === transactionId);
- if (transaction) {
- transaction.status = 'rolled_back';
- transaction.rollbackTime = new Date().toISOString();
- console.warn(`Transaction ${transactionId} rolled back: ${transaction.operation}`);
- }
- }
-
- // Backup and recovery
- async createOperationBackup(operation, data) {
- try {
- if (!this.persistence || this.isInMemoryMode) return;
-
- const backupFileName = `backup_${operation}_${Date.now()}.json`;
- const backupFilePath = path.join(this.backupPath, backupFileName);
-
- const backupData = {
- operation,
- data,
- timestamp: new Date().toISOString(),
- database_size: fs.statSync(this.dbPath).size
- };
-
- fs.writeFileSync(backupFilePath, JSON.stringify(backupData, null, 2));
- } catch (error) {
- console.warn('Failed to create backup:', error.message);
- }
- }
-
- // Data integrity checks
- isValidSwarmData(swarm) {
- return swarm &&
- typeof swarm.id === 'string' &&
- typeof swarm.name === 'string' &&
- typeof swarm.topology === 'string';
- }
-
- isCorruptedMemoryData(memory) {
- try {
- if (memory.value) {
- JSON.parse(memory.value);
- }
- return false;
- } catch (error) {
- return true;
- }
- }
-
- async cleanupCorruptedMemory(agentId, key) {
- try {
- if (this.isInMemoryMode) {
- this.memoryStore.delete(`memory:${agentId}:${key}`);
- } else {
- this.persistence.deleteMemory(agentId, key);
- }
- console.log(`Cleaned up corrupted memory for agent ${agentId}, key ${key}`);
- } catch (error) {
- console.error('Failed to cleanup corrupted memory:', error.message);
- }
- }
-
- // Health monitoring
- async performHealthCheck() {
- const health = {
- persistence: {
- mode: this.isInMemoryMode ? 'memory' : 'database',
- database_accessible: false,
- database_size: 0,
- transaction_log_size: this.transactionLog.length
- },
- memory_store: {
- entries: this.memoryStore.size,
- estimated_size_mb: this.estimateMemoryStoreSize()
- },
- error_handling: this.errorHandler.getHealthStatus()
- };
-
- if (!this.isInMemoryMode && this.persistence) {
- try {
- // Test database connection
- await this.persistence.getActiveSwarms();
- health.persistence.database_accessible = true;
-
- if (fs.existsSync(this.dbPath)) {
- health.persistence.database_size = fs.statSync(this.dbPath).size;
- }
- } catch (error) {
- health.persistence.error = error.message;
- }
- }
-
- return health;
- }
-
- estimateMemoryStoreSize() {
- let totalSize = 0;
- for (const [key, value] of this.memoryStore) {
- totalSize += JSON.stringify({ key, value }).length;
- }
- return totalSize / (1024 * 1024); // Convert to MB
- }
-
- // Cleanup and maintenance
- async performMaintenance() {
- console.log('🔧 Performing persistence maintenance...');
-
- // Clean up expired memory entries
- await this.cleanupExpiredMemory();
-
- // Clean up old transaction logs
- await this.cleanupTransactionLog();
-
- // Clean up old backups
- await this.cleanupOldBackups();
-
- // Run database maintenance if available
- if (!this.isInMemoryMode && this.persistence) {
- try {
- this.persistence.cleanup();
- console.log('✅ Database maintenance completed');
- } catch (error) {
- console.warn('Database maintenance failed:', error.message);
- }
- }
- }
-
- async cleanupExpiredMemory() {
- const now = Date.now();
- let cleanedCount = 0;
-
- for (const [key, value] of this.memoryStore) {
- if (key.startsWith('memory:') && value.expires_at && now > value.expires_at) {
- this.memoryStore.delete(key);
- cleanedCount++;
- }
- }
-
- console.log(`🧹 Cleaned up ${cleanedCount} expired memory entries`);
- }
-
- async cleanupTransactionLog() {
- const cutoffTime = Date.now() - (24 * 60 * 60 * 1000); // 24 hours
- const initialCount = this.transactionLog.length;
-
- this.transactionLog = this.transactionLog.filter(tx =>
- new Date(tx.timestamp).getTime() > cutoffTime
- );
-
- const cleanedCount = initialCount - this.transactionLog.length;
- console.log(`🧹 Cleaned up ${cleanedCount} old transaction log entries`);
- }
-
- async cleanupOldBackups() {
- try {
- if (!fs.existsSync(this.backupPath)) return;
-
- const files = fs.readdirSync(this.backupPath);
- const cutoffTime = Date.now() - (7 * 24 * 60 * 60 * 1000); // 7 days
- let cleanedCount = 0;
-
- for (const file of files) {
- const filePath = path.join(this.backupPath, file);
- const stats = fs.statSync(filePath);
-
- if (stats.mtime.getTime() < cutoffTime) {
- fs.unlinkSync(filePath);
- cleanedCount++;
- }
- }
-
- console.log(`🧹 Cleaned up ${cleanedCount} old backup files`);
- } catch (error) {
- console.warn('Failed to cleanup old backups:', error.message);
- }
- }
-
- // Expose methods from original persistence with error handling
- async getAgent(id) {
- return await this.errorHandler.wrapOperation(async () => {
- if (this.isInMemoryMode) {
- const agent = this.memoryStore.get(`agent:${id}`);
- return agent || null;
- }
- return this.persistence.getAgent(id);
- }, {
- category: ErrorCategory.PERSISTENCE,
- component: 'persistence',
- operation: 'getAgent',
- agentId: id
- });
- }
-
- async getSwarmAgents(swarmId, filter = 'all') {
- return await this.errorHandler.wrapOperation(async () => {
- if (this.isInMemoryMode) {
- const agents = [];
- for (const [key, value] of this.memoryStore) {
- if (key.startsWith('agent:') && value.swarmId === swarmId) {
- if (filter === 'all' || value.status === filter) {
- agents.push(value);
- }
- }
- }
- return agents;
- }
- return this.persistence.getSwarmAgents(swarmId, filter);
- }, {
- category: ErrorCategory.PERSISTENCE,
- component: 'persistence',
- operation: 'getSwarmAgents',
- swarmId
- });
- }
-
- // Pass through other methods with error handling
- async createTask(task) {
- return await this.errorHandler.wrapOperation(async () => {
- if (this.isInMemoryMode) {
- this.memoryStore.set(`task:${task.id}`, task);
- return { changes: 1 };
- }
- return this.persistence.createTask(task);
- }, {
- category: ErrorCategory.PERSISTENCE,
- component: 'persistence',
- operation: 'createTask'
- });
- }
-
- async getTask(id) {
- return await this.errorHandler.wrapOperation(async () => {
- if (this.isInMemoryMode) {
- return this.memoryStore.get(`task:${id}`) || null;
- }
- return this.persistence.getTask(id);
- }, {
- category: ErrorCategory.PERSISTENCE,
- component: 'persistence',
- operation: 'getTask'
- });
- }
-
- // Delegate database property access
- get db() {
- return this.persistence?.db;
- }
-}
-
-/**
- * Database Corruption Detection Utility
- */
-class DatabaseCorruptionDetector {
- async checkDatabaseIntegrity(dbPath) {
- try {
- const stats = fs.statSync(dbPath);
-
- // Check if file size is reasonable (not 0 or suspiciously small)
- if (stats.size < 1024) { // Less than 1KB might indicate corruption
- console.warn(`Database file ${dbPath} is suspiciously small (${stats.size} bytes)`);
- }
-
- // Additional integrity checks could be added here
- // such as trying to open the database and run a simple query
-
- } catch (error) {
- throw new Error(`Database integrity check failed: ${error.message}`);
- }
- }
-}
-
-export default EnhancedSwarmPersistence;
\ No newline at end of file
diff --git a/ruv-swarm/npm/src/wasm-error-wrapper.js b/ruv-swarm/npm/src/wasm-error-wrapper.js
deleted file mode 100644
index 5d52eacb49..0000000000
--- a/ruv-swarm/npm/src/wasm-error-wrapper.js
+++ /dev/null
@@ -1,593 +0,0 @@
-/**
- * Enhanced WASM Module Loader with Comprehensive Error Handling
- * Provides robust loading, validation, and graceful degradation for WASM modules
- */
-
-import { WasmModuleLoader } from './wasm-loader.js';
-import { ErrorHandlingManager, ErrorCategory, ErrorSeverity } from './error-handling-manager.js';
-import crypto from 'crypto';
-import path from 'path';
-import { promises as fs } from 'fs';
-
-export class EnhancedWasmLoader {
- constructor(options = {}) {
- this.baseLoader = new WasmModuleLoader();
- this.errorHandler = new ErrorHandlingManager({
- retry: {
- maxRetries: 2, // WASM loading failures are often permanent
- initialDelay: 2000,
- maxDelay: 10000
- },
- circuitBreaker: {
- failureThreshold: 3,
- recoveryTimeout: 60000 // 1 minute for WASM recovery
- },
- ...options.errorHandling
- });
-
- this.loadingTimeouts = new Map();
- this.moduleValidators = new Map();
- this.fallbackImplementations = new Map();
- this.loadingProgress = new Map();
- this.maxLoadingTime = options.maxLoadingTime || 30000; // 30 seconds
- this.enableFallbacks = options.enableFallbacks !== false;
- this.enableValidation = options.enableValidation !== false;
-
- this.setupModuleValidators();
- this.setupFallbackImplementations();
- }
-
- /**
- * Initialize WASM loader with comprehensive error handling
- */
- async initialize(strategy = 'progressive') {
- return await this.errorHandler.wrapOperation(async () => {
- console.log(`🔧 Initializing enhanced WASM loader with strategy: ${strategy}`);
-
- // Validate strategy
- this.validateLoadingStrategy(strategy);
-
- // Check system capabilities
- await this.checkSystemCapabilities();
-
- // Initialize base loader with timeout
- const initPromise = this.baseLoader.initialize(strategy);
- const timeoutPromise = this.createTimeoutPromise(15000, 'WASM loader initialization');
-
- return await Promise.race([initPromise, timeoutPromise]);
- }, {
- category: ErrorCategory.WASM,
- component: 'wasm-loader',
- operation: 'initialize',
- strategy
- });
- }
-
- /**
- * Load module with enhanced error handling and validation
- */
- async loadModule(name) {
- return await this.errorHandler.wrapOperation(async () => {
- console.log(`📦 Loading WASM module: ${name}`);
-
- // Validate module name
- this.validateModuleName(name);
-
- // Check if module is already loaded
- if (this.baseLoader.modules.has(name)) {
- const module = this.baseLoader.modules.get(name);
- if (await this.validateLoadedModule(name, module)) {
- return module;
- } else {
- console.warn(`⚠️ Previously loaded module ${name} failed validation, reloading...`);
- this.baseLoader.modules.delete(name);
- }
- }
-
- // Set up loading progress tracking
- this.startLoadingProgress(name);
-
- try {
- // Create loading timeout
- const loadingPromise = this.baseLoader.loadModule(name);
- const timeoutPromise = this.createTimeoutPromise(
- this.maxLoadingTime,
- `Loading module ${name}`
- );
-
- const module = await Promise.race([loadingPromise, timeoutPromise]);
-
- // Validate loaded module
- if (this.enableValidation) {
- await this.validateLoadedModule(name, module);
- }
-
- // Post-loading integrity check
- await this.performIntegrityCheck(name, module);
-
- this.completeLoadingProgress(name, true);
- console.log(`✅ Module ${name} loaded and validated successfully`);
-
- return module;
- } catch (error) {
- this.completeLoadingProgress(name, false, error.message);
-
- // Try fallback if available and enabled
- if (this.enableFallbacks && this.fallbackImplementations.has(name)) {
- console.warn(`🔄 WASM module ${name} failed, using fallback implementation`);
- return this.getFallbackImplementation(name);
- }
-
- throw error;
- }
- }, {
- category: ErrorCategory.WASM,
- component: 'wasm-loader',
- operation: 'loadModule',
- moduleName: name
- });
- }
-
- /**
- * Get module status with detailed error information
- */
- getModuleStatus() {
- const baseStatus = this.baseLoader.getModuleStatus();
- const enhancedStatus = {};
-
- for (const [name, status] of Object.entries(baseStatus)) {
- enhancedStatus[name] = {
- ...status,
- validation: {
- validated: this.moduleValidators.has(name),
- integrity_checked: status.loaded && !status.placeholder,
- fallback_available: this.fallbackImplementations.has(name)
- },
- loading_progress: this.loadingProgress.get(name) || null,
- error_info: this.getModuleErrorInfo(name)
- };
- }
-
- return enhancedStatus;
- }
-
- /**
- * Get total memory usage with safety checks
- */
- getTotalMemoryUsage() {
- try {
- return this.baseLoader.getTotalMemoryUsage();
- } catch (error) {
- console.warn(`Failed to get memory usage: ${error.message}`);
- return 0;
- }
- }
-
- /**
- * System capability checking
- */
- async checkSystemCapabilities() {
- const capabilities = {
- webassembly: typeof WebAssembly !== 'undefined',
- streaming: typeof WebAssembly.instantiateStreaming !== 'undefined',
- simd: false,
- threads: typeof SharedArrayBuffer !== 'undefined',
- memory_64: false
- };
-
- // Test SIMD support safely
- try {
- const simdTest = new Uint8Array([
- 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00,
- 0x01, 0x05, 0x01, 0x60, 0x00, 0x01, 0x7b
- ]);
- capabilities.simd = WebAssembly.validate(simdTest);
- } catch (error) {
- console.warn('SIMD capability check failed:', error.message);
- capabilities.simd = false;
- }
-
- // Test 64-bit memory support
- try {
- const memory64Test = new Uint8Array([
- 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00,
- 0x05, 0x04, 0x01, 0x04, 0x01, 0x01
- ]);
- capabilities.memory_64 = WebAssembly.validate(memory64Test);
- } catch (error) {
- capabilities.memory_64 = false;
- }
-
- if (!capabilities.webassembly) {
- throw new Error('WebAssembly is not supported in this environment');
- }
-
- console.log('🔍 System capabilities:', capabilities);
- return capabilities;
- }
-
- /**
- * Validate module name
- */
- validateModuleName(name) {
- if (!name || typeof name !== 'string') {
- throw new Error('Module name must be a non-empty string');
- }
-
- const validModules = ['core', 'neural', 'forecasting', 'swarm', 'persistence'];
- if (!validModules.includes(name)) {
- throw new Error(`Unknown module: ${name}. Valid modules: ${validModules.join(', ')}`);
- }
- }
-
- /**
- * Validate loading strategy
- */
- validateLoadingStrategy(strategy) {
- const validStrategies = ['eager', 'progressive', 'on-demand'];
- if (!validStrategies.includes(strategy)) {
- throw new Error(`Invalid loading strategy: ${strategy}. Valid strategies: ${validStrategies.join(', ')}`);
- }
- }
-
- /**
- * Setup module validators for each WASM module type
- */
- setupModuleValidators() {
- // Core module validator
- this.moduleValidators.set('core', (module) => {
- if (!module || (!module.exports && !module.instance)) {
- throw new Error('Core module missing exports');
- }
-
- // Check for expected core exports (adjust based on actual module)
- const exports = module.exports || module.instance?.exports || {};
- const requiredExports = ['memory']; // Minimum required
-
- for (const required of requiredExports) {
- if (!(required in exports)) {
- console.warn(`Core module missing expected export: ${required}`);
- }
- }
-
- return true;
- });
-
- // Neural module validator
- this.moduleValidators.set('neural', (module) => {
- if (!module || module.isPlaceholder) {
- return true; // Placeholder is acceptable for optional modules
- }
-
- const exports = module.exports || module.instance?.exports || {};
- // Neural modules should have specific neural network functions
- const expectedFunctions = ['create_neural_network', 'train_network'];
- let foundFunctions = 0;
-
- expectedFunctions.forEach(func => {
- if (func in exports) foundFunctions++;
- });
-
- if (foundFunctions === 0) {
- console.warn('Neural module does not contain expected neural network functions');
- }
-
- return true;
- });
-
- // Forecasting module validator
- this.moduleValidators.set('forecasting', (module) => {
- if (!module || module.isPlaceholder) {
- return true; // Placeholder is acceptable for optional modules
- }
-
- // Basic validation for forecasting module
- const exports = module.exports || module.instance?.exports || {};
- return true; // Accept any structure for now
- });
-
- // Generic validator for other modules
- const genericValidator = (module) => {
- return module !== null && module !== undefined;
- };
-
- this.moduleValidators.set('swarm', genericValidator);
- this.moduleValidators.set('persistence', genericValidator);
- }
-
- /**
- * Setup fallback implementations for when WASM modules fail
- */
- setupFallbackImplementations() {
- // Core module fallback
- this.fallbackImplementations.set('core', () => ({
- instance: {
- exports: {
- memory: new WebAssembly.Memory({ initial: 1, maximum: 10 }),
- // Add minimal fallback functions
- get_version: () => '0.1.0-fallback',
- get_memory_usage: () => 1024 * 1024 // 1MB fallback
- }
- },
- module: null,
- exports: {
- memory: new WebAssembly.Memory({ initial: 1, maximum: 10 }),
- get_version: () => '0.1.0-fallback',
- get_memory_usage: () => 1024 * 1024
- },
- memory: new WebAssembly.Memory({ initial: 1, maximum: 10 }),
- isFallback: true,
- isPlaceholder: false
- }));
-
- // Neural module fallback
- this.fallbackImplementations.set('neural', () => ({
- instance: { exports: {} },
- module: null,
- exports: {
- create_neural_network: () => ({
- id: 'fallback_nn',
- train: () => ({ loss: 0.1, accuracy: 0.9 }),
- predict: () => [0.5]
- })
- },
- memory: new WebAssembly.Memory({ initial: 1, maximum: 10 }),
- isFallback: true,
- isPlaceholder: false
- }));
-
- // Forecasting module fallback
- this.fallbackImplementations.set('forecasting', () => ({
- instance: { exports: {} },
- module: null,
- exports: {
- create_forecaster: () => ({
- id: 'fallback_forecaster',
- predict: (data) => data[data.length - 1] || 0
- })
- },
- memory: new WebAssembly.Memory({ initial: 1, maximum: 10 }),
- isFallback: true,
- isPlaceholder: false
- }));
- }
-
- /**
- * Get fallback implementation for a module
- */
- getFallbackImplementation(name) {
- const fallbackFactory = this.fallbackImplementations.get(name);
- if (!fallbackFactory) {
- throw new Error(`No fallback available for module: ${name}`);
- }
-
- const fallback = fallbackFactory();
- console.log(`🔄 Using fallback implementation for ${name} module`);
-
- // Store fallback in base loader
- this.baseLoader.modules.set(name, fallback);
-
- return fallback;
- }
-
- /**
- * Validate loaded module
- */
- async validateLoadedModule(name, module) {
- if (!this.enableValidation) {
- return true;
- }
-
- const validator = this.moduleValidators.get(name);
- if (!validator) {
- console.warn(`No validator found for module: ${name}`);
- return true;
- }
-
- try {
- return validator(module);
- } catch (error) {
- console.error(`Module validation failed for ${name}:`, error.message);
- return false;
- }
- }
-
- /**
- * Perform integrity check on loaded module
- */
- async performIntegrityCheck(name, module) {
- if (!module || module.isPlaceholder || module.isFallback) {
- return true; // Skip integrity check for placeholders and fallbacks
- }
-
- try {
- // Check memory accessibility
- if (module.memory && module.memory.buffer) {
- const buffer = module.memory.buffer;
- if (buffer.byteLength === 0) {
- throw new Error('Module memory buffer is empty');
- }
- }
-
- // Test basic module functionality if exports are available
- if (module.exports) {
- // Try to access exports without calling functions
- Object.keys(module.exports);
- }
-
- return true;
- } catch (error) {
- console.error(`Integrity check failed for module ${name}:`, error.message);
- throw new Error(`Module ${name} failed integrity check: ${error.message}`);
- }
- }
-
- /**
- * Create timeout promise for operations
- */
- createTimeoutPromise(timeoutMs, operation) {
- return new Promise((_, reject) => {
- setTimeout(() => {
- reject new Error(`Timeout: ${operation} took longer than ${timeoutMs}ms`);
- }, timeoutMs);
- });
- }
-
- /**
- * Start loading progress tracking
- */
- startLoadingProgress(name) {
- this.loadingProgress.set(name, {
- started: Date.now(),
- completed: null,
- success: null,
- error: null,
- duration: null
- });
- }
-
- /**
- * Complete loading progress tracking
- */
- completeLoadingProgress(name, success, error = null) {
- const progress = this.loadingProgress.get(name);
- if (progress) {
- progress.completed = Date.now();
- progress.success = success;
- progress.error = error;
- progress.duration = progress.completed - progress.started;
- }
- }
-
- /**
- * Get error information for a specific module
- */
- getModuleErrorInfo(name) {
- const progress = this.loadingProgress.get(name);
- if (!progress || progress.success !== false) {
- return null;
- }
-
- return {
- last_error: progress.error,
- failed_at: progress.completed,
- load_duration: progress.duration,
- fallback_used: this.baseLoader.modules.has(name) &&
- this.baseLoader.modules.get(name)?.isFallback
- };
- }
-
- /**
- * Perform health check on WASM subsystem
- */
- async performHealthCheck() {
- const health = {
- wasm_support: typeof WebAssembly !== 'undefined',
- modules: {},
- memory: {
- total_usage: 0,
- per_module: {}
- },
- loading_stats: {
- total_attempts: 0,
- successful_loads: 0,
- failed_loads: 0,
- fallbacks_used: 0
- },
- error_handling: this.errorHandler.getHealthStatus()
- };
-
- // Check module health
- const moduleStatus = this.getModuleStatus();
- for (const [name, status] of Object.entries(moduleStatus)) {
- health.modules[name] = {
- loaded: status.loaded,
- placeholder: status.placeholder,
- validated: status.validation?.validated || false,
- fallback: this.baseLoader.modules.get(name)?.isFallback || false,
- has_errors: status.error_info !== null
- };
-
- // Count loading statistics
- if (status.loading_progress) {
- health.loading_stats.total_attempts++;
- if (status.loading_progress.success) {
- health.loading_stats.successful_loads++;
- } else if (status.loading_progress.success === false) {
- health.loading_stats.failed_loads++;
- }
- }
-
- if (health.modules[name].fallback) {
- health.loading_stats.fallbacks_used++;
- }
- }
-
- // Get memory usage safely
- try {
- health.memory.total_usage = this.getTotalMemoryUsage();
-
- for (const [name, module] of this.baseLoader.modules.entries()) {
- if (module && module.memory && module.memory.buffer) {
- health.memory.per_module[name] = module.memory.buffer.byteLength;
- }
- }
- } catch (error) {
- health.memory.error = error.message;
- }
-
- return health;
- }
-
- /**
- * Cleanup and reset modules
- */
- async cleanup() {
- console.log('🧹 Cleaning up WASM loader...');
-
- // Clear loading progress
- this.loadingProgress.clear();
-
- // Clear timeouts
- for (const [name, timeoutId] of this.loadingTimeouts) {
- clearTimeout(timeoutId);
- }
- this.loadingTimeouts.clear();
-
- // Reset base loader modules (carefully)
- for (const [name, module] of this.baseLoader.modules.entries()) {
- if (module && module.cleanup && typeof module.cleanup === 'function') {
- try {
- module.cleanup();
- } catch (error) {
- console.warn(`Failed to cleanup module ${name}:`, error.message);
- }
- }
- }
-
- console.log('✅ WASM loader cleanup completed');
- }
-
- /**
- * Get comprehensive diagnostics
- */
- getDiagnostics() {
- return {
- capabilities: this.checkSystemCapabilities(),
- modules: this.getModuleStatus(),
- health: this.performHealthCheck(),
- error_statistics: this.errorHandler.getErrorStatistics(),
- memory_usage: {
- total: this.getTotalMemoryUsage(),
- modules: Object.fromEntries(
- Array.from(this.baseLoader.modules.entries()).map(([name, module]) => [
- name,
- module?.memory?.buffer?.byteLength || 0
- ])
- )
- }
- };
- }
-}
-
-export default EnhancedWasmLoader;
\ No newline at end of file
diff --git a/ruv-swarm/npm/test/error-handling-comprehensive.test.js b/ruv-swarm/npm/test/error-handling-comprehensive.test.js
deleted file mode 100644
index f977b98a5b..0000000000
--- a/ruv-swarm/npm/test/error-handling-comprehensive.test.js
+++ /dev/null
@@ -1,788 +0,0 @@
-/**
- * Comprehensive Error Handling Test Suite
- * Tests all error scenarios and recovery mechanisms across ruv-swarm integration components
- */
-
-import { jest } from '@jest/globals';
-import { ErrorHandlingManager, ErrorCategory, ErrorSeverity } from '../src/error-handling-manager.js';
-import { EnhancedSwarmPersistence } from '../src/persistence-error-wrapper.js';
-import { EnhancedWasmLoader } from '../src/wasm-error-wrapper.js';
-import { RobustMCPTools } from '../src/mcp-error-wrapper.js';
-import fs from 'fs';
-import path from 'path';
-
-// Test configuration
-const TEST_CONFIG = {
- timeout: 30000,
- tempDir: './test-temp',
- dbPath: './test-temp/test.db'
-};
-
-describe('Comprehensive Error Handling System', () => {
- let errorHandler;
- let tempDir;
-
- beforeAll(async () => {
- // Create temp directory for tests
- tempDir = TEST_CONFIG.tempDir;
- if (!fs.existsSync(tempDir)) {
- fs.mkdirSync(tempDir, { recursive: true });
- }
- });
-
- afterAll(async () => {
- // Cleanup temp directory
- if (fs.existsSync(tempDir)) {
- fs.rmSync(tempDir, { recursive: true, force: true });
- }
- });
-
- beforeEach(() => {
- errorHandler = new ErrorHandlingManager({
- retry: { maxRetries: 2, initialDelay: 100 },
- circuitBreaker: { failureThreshold: 3, recoveryTimeout: 1000 }
- });
- });
-
- afterEach(() => {
- if (errorHandler) {
- errorHandler.removeAllListeners();
- }
- });
-
- describe('ErrorHandlingManager Core Functionality', () => {
- test('should handle successful operations', async () => {
- const result = await errorHandler.wrapOperation(async () => {
- return { success: true, data: 'test' };
- }, {
- category: ErrorCategory.COORDINATION,
- component: 'test',
- operation: 'success_test'
- });
-
- expect(result.success).toBe(true);
- expect(result.data).toBe('test');
- });
-
- test('should retry failed operations with exponential backoff', async () => {
- let attempts = 0;
- const maxAttempts = 3;
-
- try {
- await errorHandler.wrapOperation(async () => {
- attempts++;
- if (attempts < maxAttempts) {
- throw new Error('Temporary failure');
- }
- return { success: true, attempts };
- }, {
- category: ErrorCategory.NETWORK,
- component: 'test',
- operation: 'retry_test'
- });
- } catch (error) {
- // Should succeed after retries
- }
-
- expect(attempts).toBe(maxAttempts);
- });
-
- test('should handle circuit breaker functionality', async () => {
- const operation = async () => {
- throw new Error('Persistent failure');
- };
-
- const context = {
- category: ErrorCategory.PERSISTENCE,
- component: 'test',
- operation: 'circuit_breaker_test'
- };
-
- // Trigger circuit breaker with multiple failures
- for (let i = 0; i < 5; i++) {
- try {
- await errorHandler.wrapOperation(operation, context);
- } catch (error) {
- // Expected failures
- }
- }
-
- // Circuit breaker should now be open
- try {
- await errorHandler.wrapOperation(operation, context);
- fail('Should have thrown circuit breaker error');
- } catch (error) {
- expect(error.message).toContain('Circuit breaker');
- }
- });
-
- test('should categorize error severity correctly', () => {
- const memoryError = new Error('Out of memory');
- const networkError = new Error('Network timeout');
- const validationError = new Error('Invalid parameter');
-
- const memoryRecord = errorHandler.createErrorRecord(memoryError, {
- category: ErrorCategory.MEMORY
- });
- const networkRecord = errorHandler.createErrorRecord(networkError, {
- category: ErrorCategory.NETWORK
- });
- const validationRecord = errorHandler.createErrorRecord(validationError, {
- category: ErrorCategory.VALIDATION
- });
-
- expect(memoryRecord.severity).toBe(ErrorSeverity.CRITICAL);
- expect(networkRecord.severity).toBe(ErrorSeverity.HIGH);
- expect(validationRecord.severity).toBe(ErrorSeverity.MEDIUM);
- });
-
- test('should provide error statistics', async () => {
- // Generate some test errors
- for (let i = 0; i < 5; i++) {
- try {
- await errorHandler.wrapOperation(async () => {
- throw new Error(`Test error ${i}`);
- }, {
- category: ErrorCategory.COORDINATION,
- component: 'test',
- operation: 'stats_test'
- });
- } catch (error) {
- // Expected
- }
- }
-
- const stats = errorHandler.getErrorStatistics();
- expect(stats.total).toBeGreaterThan(0);
- expect(stats.byCategory[ErrorCategory.COORDINATION]).toBeGreaterThan(0);
- });
-
- test('should generate meaningful recommendations', async () => {
- // Create errors that should trigger recommendations
- try {
- await errorHandler.wrapOperation(async () => {
- throw new Error('Critical system failure');
- }, {
- category: ErrorCategory.MEMORY,
- component: 'test',
- operation: 'critical_test'
- });
- } catch (error) {
- // Expected
- }
-
- const recommendations = errorHandler.generateRecommendations();
- expect(recommendations.length).toBeGreaterThan(0);
- expect(recommendations[0].priority).toBe('HIGH');
- });
- });
-
- describe('Enhanced Persistence Error Handling', () => {
- let persistence;
-
- beforeEach(() => {
- persistence = new EnhancedSwarmPersistence(TEST_CONFIG.dbPath, {
- backupPath: path.join(TEST_CONFIG.tempDir, 'backups')
- });
- });
-
- afterEach(async () => {
- if (persistence) {
- try {
- await persistence.close?.();
- } catch (error) {
- // Ignore cleanup errors
- }
- }
- });
-
- test('should handle database connection failures gracefully', async () => {
- // Create persistence with invalid path
- const invalidPersistence = new EnhancedSwarmPersistence('/invalid/path/db.sqlite');
-
- // Should fall back to in-memory mode
- await new Promise(resolve => setTimeout(resolve, 100)); // Allow initialization
- expect(invalidPersistence.isInMemoryMode).toBe(true);
- });
-
- test('should validate swarm data before operations', async () => {
- const invalidSwarm = {
- // Missing required fields
- name: 'test'
- };
-
- await expect(persistence.createSwarm(invalidSwarm))
- .rejects.toThrow('Invalid swarm data');
- });
-
- test('should handle transaction rollbacks', async () => {
- const validSwarm = {
- id: 'test-swarm-1',
- name: 'Test Swarm',
- topology: 'mesh',
- maxAgents: 5
- };
-
- // Mock database error during creation
- if (persistence.persistence) {
- const originalCreate = persistence.persistence.createSwarm;
- persistence.persistence.createSwarm = jest.fn(() => {
- throw new Error('Database error');
- });
-
- await expect(persistence.createSwarm(validSwarm))
- .rejects.toThrow('Database error');
-
- // Restore original method
- persistence.persistence.createSwarm = originalCreate;
- }
- });
-
- test('should create backups before risky operations', async () => {
- const swarm = {
- id: 'backup-test-swarm',
- name: 'Backup Test',
- topology: 'mesh',
- maxAgents: 3
- };
-
- await persistence.createSwarm(swarm);
-
- // Check if backup directory exists
- const backupDir = path.join(TEST_CONFIG.tempDir, 'backups');
- expect(fs.existsSync(backupDir)).toBe(true);
- });
-
- test('should handle memory cleanup and TTL expiration', async () => {
- // Store memory with short TTL
- await persistence.storeMemory('test-agent', 'short-lived', 'data', 1); // 1 second TTL
-
- // Verify data exists
- let memory = await persistence.getMemory('test-agent', 'short-lived');
- expect(memory).toBeTruthy();
-
- // Wait for TTL expiration
- await new Promise(resolve => setTimeout(resolve, 1500));
-
- // Verify data is cleaned up
- memory = await persistence.getMemory('test-agent', 'short-lived');
- expect(memory).toBeFalsy();
- });
-
- test('should detect and handle corrupted data', async () => {
- // This test would need to simulate corrupted data
- // For now, we test the validation logic
- const corruptedMemory = {
- value: 'invalid json {{'
- };
-
- expect(persistence.isCorruptedMemoryData(corruptedMemory)).toBe(true);
- });
-
- test('should perform health checks', async () => {
- const health = await persistence.performHealthCheck();
-
- expect(health).toHaveProperty('persistence');
- expect(health).toHaveProperty('memory_store');
- expect(health).toHaveProperty('error_handling');
- });
- });
-
- describe('Enhanced WASM Loader Error Handling', () => {
- let wasmLoader;
-
- beforeEach(() => {
- wasmLoader = new EnhancedWasmLoader({
- maxLoadingTime: 5000,
- enableFallbacks: true,
- enableValidation: true
- });
- });
-
- test('should handle WASM initialization timeouts', async () => {
- // Mock a slow initialization
- const originalInitialize = wasmLoader.baseLoader.initialize;
- wasmLoader.baseLoader.initialize = jest.fn(async () => {
- await new Promise(resolve => setTimeout(resolve, 10000)); // 10 second delay
- });
-
- await expect(wasmLoader.initialize('progressive'))
- .rejects.toThrow('Timeout');
-
- // Restore original method
- wasmLoader.baseLoader.initialize = originalInitialize;
- });
-
- test('should validate module names', async () => {
- await expect(wasmLoader.loadModule('invalid-module'))
- .rejects.toThrow('Unknown module');
-
- await expect(wasmLoader.loadModule(''))
- .rejects.toThrow('Module name must be a non-empty string');
- });
-
- test('should use fallback implementations when WASM fails', async () => {
- // Mock module loading failure
- const originalLoadModule = wasmLoader.baseLoader.loadModule;
- wasmLoader.baseLoader.loadModule = jest.fn(async (name) => {
- throw new Error('WASM loading failed');
- });
-
- const module = await wasmLoader.loadModule('core');
- expect(module.isFallback).toBe(true);
-
- // Restore original method
- wasmLoader.baseLoader.loadModule = originalLoadModule;
- });
-
- test('should validate system capabilities', async () => {
- const capabilities = await wasmLoader.checkSystemCapabilities();
-
- expect(capabilities).toHaveProperty('webassembly');
- expect(capabilities).toHaveProperty('simd');
- expect(capabilities).toHaveProperty('threads');
- });
-
- test('should handle module validation failures', async () => {
- // Create invalid module
- const invalidModule = {
- exports: null, // Missing required exports
- instance: null
- };
-
- const isValid = await wasmLoader.validateLoadedModule('core', invalidModule);
- expect(isValid).toBe(false);
- });
-
- test('should perform integrity checks', async () => {
- const validModule = {
- memory: { buffer: new ArrayBuffer(1024) },
- exports: { test: () => {} },
- isPlaceholder: false
- };
-
- await expect(wasmLoader.performIntegrityCheck('test', validModule))
- .resolves.toBe(true);
-
- const invalidModule = {
- memory: { buffer: new ArrayBuffer(0) }, // Empty buffer
- exports: {},
- isPlaceholder: false
- };
-
- await expect(wasmLoader.performIntegrityCheck('test', invalidModule))
- .rejects.toThrow('integrity check');
- });
-
- test('should track loading progress', async () => {
- wasmLoader.startLoadingProgress('test-module');
-
- const progress = wasmLoader.loadingProgress.get('test-module');
- expect(progress.started).toBeTruthy();
- expect(progress.completed).toBeFalsy();
-
- wasmLoader.completeLoadingProgress('test-module', true);
-
- const completedProgress = wasmLoader.loadingProgress.get('test-module');
- expect(completedProgress.completed).toBeTruthy();
- expect(completedProgress.success).toBe(true);
- });
-
- test('should provide comprehensive health check', async () => {
- const health = await wasmLoader.performHealthCheck();
-
- expect(health).toHaveProperty('wasm_support');
- expect(health).toHaveProperty('modules');
- expect(health).toHaveProperty('memory');
- expect(health).toHaveProperty('loading_stats');
- });
- });
-
- describe('Robust MCP Tools Error Handling', () => {
- let mcpTools;
- let mockRuvSwarm;
-
- beforeEach(() => {
- // Create mock ruv-swarm instance
- mockRuvSwarm = {
- createSwarm: jest.fn(),
- getGlobalMetrics: jest.fn(),
- features: { neural_networks: true }
- };
-
- mcpTools = new RobustMCPTools(mockRuvSwarm, {
- errorHandling: {
- retry: { maxRetries: 1 },
- circuitBreaker: { failureThreshold: 2 }
- }
- });
- });
-
- test('should validate swarm_init parameters', async () => {
- const invalidParams = {
- topology: 'invalid-topology',
- maxAgents: -1
- };
-
- await expect(mcpTools.swarm_init(invalidParams))
- .rejects.toThrow('Parameter validation failed');
- });
-
- test('should validate agent_spawn parameters', async () => {
- const invalidParams = {
- type: 'invalid-type',
- name: '', // Empty name
- capabilities: 'not-an-array'
- };
-
- await expect(mcpTools.agent_spawn(invalidParams))
- .rejects.toThrow('Parameter validation failed');
- });
-
- test('should validate neural_train parameters', async () => {
- const invalidParams = {
- agentId: '', // Empty agent ID
- iterations: -1, // Invalid iterations
- learningRate: 2.0 // Invalid learning rate
- };
-
- await expect(mcpTools.neural_train(invalidParams))
- .rejects.toThrow('Parameter validation failed');
- });
-
- test('should handle operation timeouts', async () => {
- // Mock slow operation
- mcpTools.baseMCP.swarm_init = jest.fn(async () => {
- await new Promise(resolve => setTimeout(resolve, 35000)); // 35 seconds
- });
-
- await expect(mcpTools.swarm_init({}))
- .rejects.toThrow('Timeout');
- });
-
- test('should check system health before operations', async () => {
- // Mock unhealthy system
- const originalCheckHealth = mcpTools.checkSystemHealth;
- mcpTools.checkSystemHealth = jest.fn(async () => ({
- healthy: false,
- severity: 'critical',
- issues: ['Critical memory usage']
- }));
-
- await expect(mcpTools.swarm_init({}))
- .rejects.toThrow('System health critical');
-
- // Restore original method
- mcpTools.checkSystemHealth = originalCheckHealth;
- });
-
- test('should verify neural capabilities', async () => {
- // Mock features detection failure
- mcpTools.baseMCP.features_detect = jest.fn(async () => ({
- available: false
- }));
-
- await expect(mcpTools.neural_train({ agentId: 'test' }))
- .rejects.toThrow('Neural network capabilities not available');
- });
-
- test('should check agent availability for tasks', async () => {
- // Mock no available agents
- mcpTools.baseMCP.agent_list = jest.fn(async () => ({
- agents: []
- }));
-
- await expect(mcpTools.task_orchestrate({ task: 'test task' }))
- .rejects.toThrow('No idle agents available');
- });
-
- test('should verify task existence for results', async () => {
- // Mock task not found
- mcpTools.baseMCP.task_status = jest.fn(async () => {
- throw new Error('Task not found');
- });
-
- await expect(mcpTools.task_results({ taskId: 'nonexistent' }))
- .rejects.toThrow('Failed to verify task');
- });
-
- test('should cache validation results', async () => {
- const params = { topology: 'mesh', maxAgents: 5 };
-
- // First validation should be computed
- await mcpTools.validateParameters('swarm_init', params);
- expect(mcpTools.validationCache.size).toBe(1);
-
- // Second validation should use cache
- await mcpTools.validateParameters('swarm_init', params);
- expect(mcpTools.validationCache.size).toBe(1);
- });
-
- test('should track performance metrics', async () => {
- // Mock successful operation
- mcpTools.baseMCP.swarm_init = jest.fn(async () => ({
- id: 'test-swarm',
- topology: 'mesh',
- maxAgents: 5
- }));
-
- await mcpTools.swarm_init({ topology: 'mesh' });
-
- const metrics = mcpTools.performanceMetrics;
- expect(metrics.totalOperations).toBeGreaterThan(0);
- expect(metrics.successfulOperations).toBeGreaterThan(0);
- });
-
- test('should provide comprehensive health status', async () => {
- const health = await mcpTools.getHealthStatus();
-
- expect(health).toHaveProperty('mcp_tools');
- expect(health).toHaveProperty('error_handling');
- expect(health).toHaveProperty('overall_health');
- expect(health).toHaveProperty('recommendations');
- });
- });
-
- describe('Integration Error Scenarios', () => {
- test('should handle cascading failures gracefully', async () => {
- // Simulate database failure affecting MCP operations
- const persistence = new EnhancedSwarmPersistence('/invalid/path');
- await new Promise(resolve => setTimeout(resolve, 100)); // Allow initialization
-
- expect(persistence.isInMemoryMode).toBe(true);
-
- // MCP operations should still work with in-memory fallback
- const result = await persistence.createSwarm({
- id: 'test-swarm',
- name: 'Test',
- topology: 'mesh',
- maxAgents: 3
- });
-
- expect(result.changes).toBe(1);
- });
-
- test('should maintain system stability under high error rates', async () => {
- const errorCount = 50;
- const errors = [];
-
- for (let i = 0; i < errorCount; i++) {
- try {
- await errorHandler.wrapOperation(async () => {
- if (Math.random() < 0.7) { // 70% failure rate
- throw new Error(`Simulated error ${i}`);
- }
- return { success: true };
- }, {
- category: ErrorCategory.COORDINATION,
- component: 'stress-test',
- operation: 'high_error_rate'
- });
- } catch (error) {
- errors.push(error);
- }
- }
-
- // System should remain responsive
- const health = errorHandler.getHealthStatus();
- expect(health).toBeTruthy();
- expect(errors.length).toBeGreaterThan(0);
- });
-
- test('should handle memory pressure gracefully', async () => {
- // Simulate memory pressure
- const largeData = new Array(1000000).fill('test-data');
-
- try {
- await errorHandler.wrapOperation(async () => {
- // Simulate memory-intensive operation
- const result = largeData.map(item => item.repeat(100));
- return { processed: result.length };
- }, {
- category: ErrorCategory.MEMORY,
- component: 'memory-test',
- operation: 'large_data_processing'
- });
- } catch (error) {
- // Should handle memory errors gracefully
- expect(error.message).toBeTruthy();
- }
- });
-
- test('should recover from network partitions', async () => {
- let networkDown = true;
- let attempts = 0;
-
- const networkOperation = async () => {
- attempts++;
- if (networkDown && attempts < 3) {
- throw new Error('Network unreachable');
- }
- networkDown = false; // Simulate network recovery
- return { connected: true, attempts };
- };
-
- const result = await errorHandler.wrapOperation(networkOperation, {
- category: ErrorCategory.NETWORK,
- component: 'network-test',
- operation: 'partition_recovery'
- });
-
- expect(result.connected).toBe(true);
- expect(result.attempts).toBeGreaterThan(1);
- });
- });
-
- describe('Error Recovery Validation', () => {
- test('should provide correct recovery suggestions', () => {
- const timeoutError = 'Operation timeout after 30 seconds';
- const memoryError = 'Out of memory during processing';
- const agentError = 'Agent not available for task';
- const networkError = 'Network connection failed';
-
- const mcpTools = new RobustMCPTools();
-
- const timeoutSuggestions = mcpTools.baseMCP.generateRecoverySuggestions(timeoutError);
- expect(timeoutSuggestions).toContain('Increase task timeout duration');
-
- const memorySuggestions = mcpTools.baseMCP.generateRecoverySuggestions(memoryError);
- expect(memorySuggestions).toContain('Reduce memory usage in task execution');
-
- const agentSuggestions = mcpTools.baseMCP.generateRecoverySuggestions(agentError);
- expect(agentSuggestions).toContain('Check agent availability and status');
-
- const networkSuggestions = mcpTools.baseMCP.generateRecoverySuggestions(networkError);
- expect(networkSuggestions).toContain('Check network connectivity');
- });
-
- test('should calculate efficiency scores correctly', () => {
- const mcpTools = new RobustMCPTools();
-
- const perfectResults = {
- execution_summary: { success: true },
- execution_time_ms: 1000,
- aggregated_performance: {
- total_memory_usage_mb: 50,
- overall_success_rate: 1.0
- }
- };
-
- const efficiency = mcpTools.baseMCP.calculateEfficiencyScore(perfectResults);
- expect(efficiency).toBeGreaterThan(0.8);
-
- const poorResults = {
- execution_summary: { success: false },
- execution_time_ms: 120000, // 2 minutes
- aggregated_performance: {
- total_memory_usage_mb: 500,
- overall_success_rate: 0.3
- }
- };
-
- const poorEfficiency = mcpTools.baseMCP.calculateEfficiencyScore(poorResults);
- expect(poorEfficiency).toBeLessThan(0.5);
- });
- });
-
- describe('Performance Impact Assessment', () => {
- test('should measure error handling overhead', async () => {
- const operationCount = 100;
-
- // Measure overhead of error handling
- const startTime = performance.now();
-
- for (let i = 0; i < operationCount; i++) {
- await errorHandler.wrapOperation(async () => {
- return { iteration: i };
- }, {
- category: ErrorCategory.COORDINATION,
- component: 'performance-test',
- operation: 'overhead_measurement'
- });
- }
-
- const totalTime = performance.now() - startTime;
- const averageOverhead = totalTime / operationCount;
-
- // Error handling overhead should be minimal (< 5ms per operation)
- expect(averageOverhead).toBeLessThan(5);
- });
-
- test('should maintain performance under concurrent operations', async () => {
- const concurrentOperations = 20;
- const operations = [];
-
- const startTime = performance.now();
-
- for (let i = 0; i < concurrentOperations; i++) {
- operations.push(
- errorHandler.wrapOperation(async () => {
- await new Promise(resolve => setTimeout(resolve, 100));
- return { id: i };
- }, {
- category: ErrorCategory.COORDINATION,
- component: 'concurrency-test',
- operation: 'concurrent_execution'
- })
- );
- }
-
- const results = await Promise.all(operations);
- const totalTime = performance.now() - startTime;
-
- expect(results).toHaveLength(concurrentOperations);
- expect(totalTime).toBeLessThan(1000); // Should complete within 1 second
- });
- });
-}, TEST_CONFIG.timeout);
-
-// Helper functions for test utilities
-function createMockRuvSwarmInstance() {
- return {
- createSwarm: jest.fn(async (config) => ({
- id: config.id || 'mock-swarm',
- name: config.name,
- spawn: jest.fn()
- })),
- getGlobalMetrics: jest.fn(async () => ({
- totalSwarms: 1,
- totalAgents: 0,
- memoryUsage: 1024 * 1024
- })),
- features: {
- neural_networks: true,
- forecasting: false,
- cognitive_diversity: true
- }
- };
-}
-
-// Test data generators
-function generateValidSwarmData(overrides = {}) {
- return {
- id: `test-swarm-${Date.now()}`,
- name: 'Test Swarm',
- topology: 'mesh',
- maxAgents: 5,
- strategy: 'balanced',
- ...overrides
- };
-}
-
-function generateValidAgentData(swarmId, overrides = {}) {
- return {
- id: `test-agent-${Date.now()}`,
- swarmId,
- name: 'Test Agent',
- type: 'researcher',
- capabilities: ['analysis', 'research'],
- ...overrides
- };
-}
-
-export {
- createMockRuvSwarmInstance,
- generateValidSwarmData,
- generateValidAgentData,
- TEST_CONFIG
-};
\ No newline at end of file
diff --git a/swarm-memory/state.json b/swarm-memory/state.json
deleted file mode 100644
index 82c9abc745..0000000000
--- a/swarm-memory/state.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "namespace": "swarm",
- "timestamp": "2025-08-06T13:53:56.421Z",
- "entries": [],
- "partitions": [
- {
- "id": "partition_mdzxz1vu_btoiav4pj",
- "name": "default",
- "type": "knowledge",
- "entries": [],
- "maxSize": 104857600,
- "readOnly": false,
- "shared": true,
- "indexed": true,
- "compressed": false
- },
- {
- "id": "partition_mdzxz1vu_fx15fwpj9",
- "name": "system",
- "type": "configuration",
- "entries": [],
- "maxSize": 104857600,
- "readOnly": false,
- "shared": true,
- "indexed": true,
- "compressed": false
- },
- {
- "id": "partition_mdzxz1vu_wvg5u9xie",
- "name": "cache",
- "type": "cache",
- "entries": [],
- "maxSize": 104857600,
- "readOnly": false,
- "shared": true,
- "indexed": true,
- "compressed": false
- },
- {
- "id": "partition_mdzxz1vu_yuk3pksyx",
- "name": "logs",
- "type": "logs",
- "entries": [],
- "maxSize": 104857600,
- "readOnly": false,
- "shared": true,
- "indexed": true,
- "compressed": false
- }
- ]
-}
\ No newline at end of file
diff --git a/validation-test/.claude/checkpoints/1755354939.json b/validation-test/.claude/checkpoints/1755354939.json
deleted file mode 100644
index 1dd2d5e896..0000000000
--- a/validation-test/.claude/checkpoints/1755354939.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250816-143539", "file": "/workspaces/claude-code-flow/validation-test/src/validator.js", "timestamp": "2025-08-16T14:35:39Z", "type": "pre-edit", "original_branch": "alpha90"}
diff --git a/validation-test/.claude/checkpoints/1755354940.json b/validation-test/.claude/checkpoints/1755354940.json
deleted file mode 100644
index 2fa12973de..0000000000
--- a/validation-test/.claude/checkpoints/1755354940.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250816-143540", "file": "/workspaces/claude-code-flow/validation-test/src/validator.js", "timestamp": "2025-08-16T14:35:40Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 24 +++ .claude-flow/metrics/task-metrics.json | 6 +- .claude/checkpoints/task-1755354870.json | 1 + claude-flow-wiki | 0 validation-test/src/validator.js | 330 +++++++++++++++++++++++++++++++ 6 files changed, 359 insertions(+), 4 deletions(-) "}
diff --git a/validation-test/.claude/checkpoints/1755354941.json b/validation-test/.claude/checkpoints/1755354941.json
deleted file mode 100644
index e693e999e9..0000000000
--- a/validation-test/.claude/checkpoints/1755354941.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250816-143541", "file": "/workspaces/claude-code-flow/validation-test/src/validationRules.js", "timestamp": "2025-08-16T14:35:41Z", "type": "pre-edit", "original_branch": "alpha90"}
diff --git a/validation-test/.claude/checkpoints/1755354943.json b/validation-test/.claude/checkpoints/1755354943.json
deleted file mode 100644
index 927b5a6c2e..0000000000
--- a/validation-test/.claude/checkpoints/1755354943.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250816-143543", "file": "/workspaces/claude-code-flow/validation-test/src/validationRules.js", "timestamp": "2025-08-16T14:35:43Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 24 +++++++++++++++ .claude-flow/metrics/task-metrics.json | 6 ++-- claude-flow-wiki | 0 .../.claude/checkpoints/1755354939.json | 1 + .../.claude/checkpoints/1755354940.json | 1 + validation-test/src/validationRules.js | 34 ++++++++++++++++++++++ 7 files changed, 64 insertions(+), 4 deletions(-) "}
diff --git a/validation-test/.claude/checkpoints/1755354944.json b/validation-test/.claude/checkpoints/1755354944.json
deleted file mode 100644
index 9658ea0829..0000000000
--- a/validation-test/.claude/checkpoints/1755354944.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250816-143544", "file": "/workspaces/claude-code-flow/validation-test/src/formValidator.js", "timestamp": "2025-08-16T14:35:44Z", "type": "pre-edit", "original_branch": "alpha90"}
diff --git a/validation-test/.claude/checkpoints/1755354945.json b/validation-test/.claude/checkpoints/1755354945.json
deleted file mode 100644
index 112a6d7d88..0000000000
--- a/validation-test/.claude/checkpoints/1755354945.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250816-143545", "file": "/workspaces/claude-code-flow/validation-test/src/formValidator.js", "timestamp": "2025-08-16T14:35:45Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 24 +++ .claude-flow/metrics/task-metrics.json | 6 +- claude-flow-wiki | 0 .../.claude/checkpoints/1755354941.json | 1 + .../.claude/checkpoints/1755354943.json | 1 + validation-test/src/formValidator.js | 195 +++++++++++++++++++++ 7 files changed, 225 insertions(+), 4 deletions(-) "}
diff --git a/validation-test/.claude/checkpoints/1755354946.json b/validation-test/.claude/checkpoints/1755354946.json
deleted file mode 100644
index cdf4464ebd..0000000000
--- a/validation-test/.claude/checkpoints/1755354946.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250816-143546", "file": "/workspaces/claude-code-flow/validation-test/src/validationService.js", "timestamp": "2025-08-16T14:35:46Z", "type": "pre-edit", "original_branch": "alpha90"}
diff --git a/validation-test/.claude/checkpoints/1755354947.json b/validation-test/.claude/checkpoints/1755354947.json
deleted file mode 100644
index b15f85627b..0000000000
--- a/validation-test/.claude/checkpoints/1755354947.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250816-143547", "file": "/workspaces/claude-code-flow/validation-test/src/validationService.js", "timestamp": "2025-08-16T14:35:47Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 24 ++ .claude-flow/metrics/task-metrics.json | 6 +- claude-flow-wiki | 0 .../.claude/checkpoints/1755354944.json | 1 + .../.claude/checkpoints/1755354945.json | 1 + validation-test/src/validationService.js | 290 +++++++++++++++++++++ 7 files changed, 320 insertions(+), 4 deletions(-) "}
diff --git a/validation-test/.claude/checkpoints/1755354949.json b/validation-test/.claude/checkpoints/1755354949.json
deleted file mode 100644
index 99a95b1dab..0000000000
--- a/validation-test/.claude/checkpoints/1755354949.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250816-143549", "file": "/workspaces/claude-code-flow/validation-test/src/index.js", "timestamp": "2025-08-16T14:35:49Z", "type": "pre-edit", "original_branch": "alpha90"}
diff --git a/validation-test/.claude/checkpoints/1755354950.json b/validation-test/.claude/checkpoints/1755354950.json
deleted file mode 100644
index e7356d7aef..0000000000
--- a/validation-test/.claude/checkpoints/1755354950.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250816-143550", "file": "/workspaces/claude-code-flow/validation-test/src/index.js", "timestamp": "2025-08-16T14:35:50Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 294 ++++++++++----------- .claude-flow/metrics/task-metrics.json | 6 +- claude-flow-wiki | 0 .../.claude/checkpoints/1755354946.json | 1 + .../.claude/checkpoints/1755354947.json | 1 + validation-test/src/index.js | 12 + 7 files changed, 165 insertions(+), 151 deletions(-) "}
diff --git a/validation-test/.claude/checkpoints/1755354997.json b/validation-test/.claude/checkpoints/1755354997.json
deleted file mode 100644
index 8c36f6ddd7..0000000000
--- a/validation-test/.claude/checkpoints/1755354997.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250816-143637", "file": "/workspaces/claude-code-flow/validation-test/src/formValidator.js", "timestamp": "2025-08-16T14:36:37Z", "type": "pre-edit", "original_branch": "alpha90"}
diff --git a/validation-test/.claude/checkpoints/1755354999.json b/validation-test/.claude/checkpoints/1755354999.json
deleted file mode 100644
index 981eda2e96..0000000000
--- a/validation-test/.claude/checkpoints/1755354999.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250816-143639", "file": "/workspaces/claude-code-flow/validation-test/src/formValidator.js", "timestamp": "2025-08-16T14:36:39Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 48 ++++++++++++++++++++++++++++++++ .claude-flow/metrics/task-metrics.json | 6 ++-- .claude/checkpoints/1755354967.json | 1 + .claude/checkpoints/1755354969.json | 1 + claude-flow-wiki | 0 validation-test/src/formValidator.js | 32 +++++++++++++++------ 7 files changed, 77 insertions(+), 13 deletions(-) "}
diff --git a/validation-test/.claude/checkpoints/1755355000.json b/validation-test/.claude/checkpoints/1755355000.json
deleted file mode 100644
index bea24259a7..0000000000
--- a/validation-test/.claude/checkpoints/1755355000.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250816-143640", "file": "/workspaces/claude-code-flow/validation-test/src/formValidator.js", "timestamp": "2025-08-16T14:36:40Z", "type": "pre-edit", "original_branch": "alpha90"}
diff --git a/validation-test/.claude/checkpoints/1755355001.json b/validation-test/.claude/checkpoints/1755355001.json
deleted file mode 100644
index 1a997803d8..0000000000
--- a/validation-test/.claude/checkpoints/1755355001.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250816-143641", "file": "/workspaces/claude-code-flow/validation-test/src/formValidator.js", "timestamp": "2025-08-16T14:36:41Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 48 ++++++++++++++++++++++ .claude-flow/metrics/task-metrics.json | 6 +-- claude-flow-wiki | 0 .../.claude/checkpoints/1755354997.json | 1 + .../.claude/checkpoints/1755354999.json | 1 + validation-test/src/formValidator.js | 1 - 7 files changed, 54 insertions(+), 5 deletions(-) "}
diff --git a/validation-test/.claude/checkpoints/1755355073.json b/validation-test/.claude/checkpoints/1755355073.json
deleted file mode 100644
index e5dfa8d596..0000000000
--- a/validation-test/.claude/checkpoints/1755355073.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250816-143753", "file": "/workspaces/claude-code-flow/validation-test/src/formValidator.js", "timestamp": "2025-08-16T14:37:53Z", "type": "pre-edit", "original_branch": "alpha90"}
diff --git a/validation-test/.claude/checkpoints/1755355074.json b/validation-test/.claude/checkpoints/1755355074.json
deleted file mode 100644
index 6ac0af6ea5..0000000000
--- a/validation-test/.claude/checkpoints/1755355074.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250816-143754", "file": "/workspaces/claude-code-flow/validation-test/src/formValidator.js", "timestamp": "2025-08-16T14:37:54Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 350 +++++++++++++++---------------- .claude-flow/metrics/task-metrics.json | 6 +- claude-flow-wiki | 0 validation-test/src/formValidator.js | 55 ++--- 5 files changed, 207 insertions(+), 206 deletions(-) "}
diff --git a/validation-test/.claude/checkpoints/1755355075.json b/validation-test/.claude/checkpoints/1755355075.json
deleted file mode 100644
index ca0d2d0cea..0000000000
--- a/validation-test/.claude/checkpoints/1755355075.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250816-143755", "file": "/workspaces/claude-code-flow/validation-test/tests/integration/formValidation.test.js", "timestamp": "2025-08-16T14:37:55Z", "type": "pre-edit", "original_branch": "alpha90"}
diff --git a/validation-test/.claude/checkpoints/1755355076.json b/validation-test/.claude/checkpoints/1755355076.json
deleted file mode 100644
index c232648afa..0000000000
--- a/validation-test/.claude/checkpoints/1755355076.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250816-143756", "file": "/workspaces/claude-code-flow/validation-test/tests/integration/formValidation.test.js", "timestamp": "2025-08-16T14:37:56Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 36 ++++++++++++++++++++++ .claude-flow/metrics/task-metrics.json | 6 ++-- claude-flow-wiki | 0 .../.claude/checkpoints/1755355073.json | 1 + .../.claude/checkpoints/1755355074.json | 1 + .../tests/integration/formValidation.test.js | 17 ++++++---- 7 files changed, 53 insertions(+), 10 deletions(-) "}
diff --git a/validation-test/.claude/checkpoints/1755355148.json b/validation-test/.claude/checkpoints/1755355148.json
deleted file mode 100644
index d0aae06608..0000000000
--- a/validation-test/.claude/checkpoints/1755355148.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250816-143908", "file": "/workspaces/claude-code-flow/validation-test/docs/TEST_GUIDE.md", "timestamp": "2025-08-16T14:39:08Z", "type": "pre-edit", "original_branch": "alpha90"}
diff --git a/validation-test/.claude/checkpoints/1755355149.json b/validation-test/.claude/checkpoints/1755355149.json
deleted file mode 100644
index 1b26347cd7..0000000000
--- a/validation-test/.claude/checkpoints/1755355149.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250816-143909", "file": "/workspaces/claude-code-flow/validation-test/docs/TEST_GUIDE.md", "timestamp": "2025-08-16T14:39:09Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/system-metrics.json | 12 ++++ .claude/checkpoints/task-1755355114.json | 1 + claude-flow-wiki | 0 validation-test/docs/TEST_GUIDE.md | 114 +++++++++++++++++++++++++++++++ 4 files changed, 127 insertions(+) "}
diff --git a/validation-test/.claude/checkpoints/1755355151.json b/validation-test/.claude/checkpoints/1755355151.json
deleted file mode 100644
index 3a0f4393e0..0000000000
--- a/validation-test/.claude/checkpoints/1755355151.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250816-143910", "file": "/workspaces/claude-code-flow/validation-test/docs/TEST_SCENARIOS.md", "timestamp": "2025-08-16T14:39:10Z", "type": "pre-edit", "original_branch": "alpha90"}
diff --git a/validation-test/.claude/checkpoints/1755355152.json b/validation-test/.claude/checkpoints/1755355152.json
deleted file mode 100644
index a7dce8770b..0000000000
--- a/validation-test/.claude/checkpoints/1755355152.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250816-143912", "file": "/workspaces/claude-code-flow/validation-test/docs/TEST_SCENARIOS.md", "timestamp": "2025-08-16T14:39:12Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/system-metrics.json | 12 ++ claude-flow-wiki | 0 .../.claude/checkpoints/1755355148.json | 1 + .../.claude/checkpoints/1755355149.json | 1 + validation-test/docs/TEST_SCENARIOS.md | 137 +++++++++++++++++++++ 5 files changed, 151 insertions(+) "}
diff --git a/validation-test/.claude/checkpoints/1755355274.json b/validation-test/.claude/checkpoints/1755355274.json
deleted file mode 100644
index 6b5b9c3f92..0000000000
--- a/validation-test/.claude/checkpoints/1755355274.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250816-144114", "file": "/workspaces/claude-code-flow/validation-test/.github/workflows/test.yml", "timestamp": "2025-08-16T14:41:14Z", "type": "pre-edit", "original_branch": "alpha90"}
diff --git a/validation-test/.claude/checkpoints/1755355276.json b/validation-test/.claude/checkpoints/1755355276.json
deleted file mode 100644
index bccc790d70..0000000000
--- a/validation-test/.claude/checkpoints/1755355276.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250816-144116", "file": "/workspaces/claude-code-flow/validation-test/.github/workflows/test.yml", "timestamp": "2025-08-16T14:41:16Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 60 +++++++++ .claude-flow/metrics/task-metrics.json | 6 +- .claude/checkpoints/1755355159.json | 1 + .claude/checkpoints/1755355161.json | 1 + claude-flow-wiki | 0 issue-653-response.md | 142 -------------------- issue-implement-mcp-tools.md | 208 ----------------------------- validation-test/.github/workflows/test.yml | 64 +++++++++ 9 files changed, 130 insertions(+), 354 deletions(-) "}
diff --git a/validation-test/.claude/checkpoints/1755355277.json b/validation-test/.claude/checkpoints/1755355277.json
deleted file mode 100644
index a8627988d7..0000000000
--- a/validation-test/.claude/checkpoints/1755355277.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch": "checkpoint/pre-edit-20250816-144117", "file": "/workspaces/claude-code-flow/validation-test/README.md", "timestamp": "2025-08-16T14:41:17Z", "type": "pre-edit", "original_branch": "alpha90"}
diff --git a/validation-test/.claude/checkpoints/1755355278.json b/validation-test/.claude/checkpoints/1755355278.json
deleted file mode 100644
index bfe3ba36b1..0000000000
--- a/validation-test/.claude/checkpoints/1755355278.json
+++ /dev/null
@@ -1 +0,0 @@
-{"tag": "checkpoint-20250816-144118", "file": "/workspaces/claude-code-flow/validation-test/README.md", "timestamp": "2025-08-16T14:41:18Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 60 ++++++ .claude-flow/metrics/task-metrics.json | 6 +- claude-flow-wiki | 0 issue-653-response.md | 142 -------------- issue-implement-mcp-tools.md | 208 --------------------- .../.claude/checkpoints/1755355274.json | 1 + .../.claude/checkpoints/1755355276.json | 1 + validation-test/README.md | 107 +++++++++++ 9 files changed, 173 insertions(+), 354 deletions(-) "}
diff --git a/validation-test/.claude/checkpoints/summary-session-20250816-144213.md b/validation-test/.claude/checkpoints/summary-session-20250816-144213.md
deleted file mode 100644
index 8c48245f25..0000000000
--- a/validation-test/.claude/checkpoints/summary-session-20250816-144213.md
+++ /dev/null
@@ -1,147 +0,0 @@
-# Session Summary - 2025-08-16 14:42:13
-
-## Checkpoints Created
-1755354939.json
-1755354940.json
-1755354941.json
-1755354943.json
-1755354944.json
-1755354945.json
-1755354946.json
-1755354947.json
-1755354949.json
-1755354950.json
-1755354997.json
-1755354999.json
-1755355000.json
-1755355001.json
-1755355073.json
-1755355074.json
-1755355075.json
-1755355076.json
-1755355148.json
-1755355149.json
-1755355151.json
-1755355152.json
-1755355274.json
-1755355276.json
-1755355277.json
-1755355278.json
-
-## Files Modified
-.claude-flow/metrics/performance.json
-.claude-flow/metrics/system-metrics.json
-.claude-flow/metrics/task-metrics.json
-.claude/checkpoints/1755354407.json
-.claude/checkpoints/1755354410.json
-.claude/checkpoints/1755354414.json
-.claude/checkpoints/1755354417.json
-.claude/checkpoints/1755354528.json
-.claude/checkpoints/1755354530.json
-.claude/checkpoints/1755354532.json
-.claude/checkpoints/1755354533.json
-.claude/checkpoints/1755354535.json
-.claude/checkpoints/1755354537.json
-.claude/checkpoints/1755354662.json
-.claude/checkpoints/1755354664.json
-.claude/checkpoints/1755354700.json
-.claude/checkpoints/1755354702.json
-.claude/checkpoints/1755354703.json
-.claude/checkpoints/1755354705.json
-.claude/checkpoints/1755354808.json
-.claude/checkpoints/1755354810.json
-.claude/checkpoints/1755354967.json
-.claude/checkpoints/1755354969.json
-.claude/checkpoints/1755355159.json
-.claude/checkpoints/1755355161.json
-.claude/checkpoints/summary-session-20250816-142659.md
-.claude/checkpoints/summary-session-20250816-143114.md
-.claude/checkpoints/summary-session-20250816-143344.md
-.claude/checkpoints/summary-session-20250816-143645.md
-.claude/checkpoints/summary-session-20250816-144204.md
-.claude/checkpoints/task-1755190646.json
-.claude/checkpoints/task-1755353920.json
-.claude/checkpoints/task-1755354063.json
-.claude/checkpoints/task-1755354084.json
-.claude/checkpoints/task-1755354301.json
-.claude/checkpoints/task-1755354322.json
-.claude/checkpoints/task-1755354490.json
-.claude/checkpoints/task-1755354720.json
-.claude/checkpoints/task-1755354761.json
-.claude/checkpoints/task-1755354870.json
-.claude/checkpoints/task-1755355114.json
-claude-flow-wiki
-implementation-roadmap.md
-mcp-tools-review.md
-validation-report.md
-validation-test/.claude/checkpoints/1755354939.json
-validation-test/.claude/checkpoints/1755354940.json
-validation-test/.claude/checkpoints/1755354941.json
-validation-test/.claude/checkpoints/1755354943.json
-validation-test/.claude/checkpoints/1755354944.json
-validation-test/.claude/checkpoints/1755354945.json
-validation-test/.claude/checkpoints/1755354946.json
-validation-test/.claude/checkpoints/1755354947.json
-validation-test/.claude/checkpoints/1755354949.json
-validation-test/.claude/checkpoints/1755354950.json
-validation-test/.claude/checkpoints/1755354997.json
-validation-test/.claude/checkpoints/1755354999.json
-validation-test/.claude/checkpoints/1755355000.json
-validation-test/.claude/checkpoints/1755355001.json
-validation-test/.claude/checkpoints/1755355073.json
-validation-test/.claude/checkpoints/1755355074.json
-validation-test/.claude/checkpoints/1755355075.json
-validation-test/.claude/checkpoints/1755355076.json
-validation-test/.claude/checkpoints/1755355148.json
-validation-test/.claude/checkpoints/1755355149.json
-validation-test/.claude/checkpoints/1755355151.json
-validation-test/.claude/checkpoints/1755355152.json
-validation-test/.claude/checkpoints/1755355274.json
-validation-test/.claude/checkpoints/1755355276.json
-validation-test/.claude/checkpoints/1755355277.json
-validation-test/.claude/checkpoints/1755355278.json
-validation-test/.github/workflows/test.yml
-validation-test/README.md
-validation-test/docs/TEST_GUIDE.md
-validation-test/docs/TEST_SCENARIOS.md
-validation-test/memory/memory-store.json
-validation-test/package-lock.json
-validation-test/package.json
-validation-test/src/formValidator.js
-validation-test/src/index.js
-validation-test/src/validationRules.js
-validation-test/src/validationService.js
-validation-test/src/validator.js
-validation-test/tests/e2e/validation.e2e.test.js
-validation-test/tests/fixtures/testData.js
-validation-test/tests/helpers/testHelpers.js
-validation-test/tests/integration/formValidation.test.js
-validation-test/tests/unit/validator.test.js
-
-## Recent Commits
-5415e337 🔖 Checkpoint: Edit /workspaces/claude-code-flow/validation-test/README.md
-8cee35ce 🔖 Checkpoint: Edit /workspaces/claude-code-flow/validation-test/.github/workflows/test.yml
-1b49119c 🔖 Checkpoint: Edit /workspaces/claude-code-flow/issue-implement-mcp-tools.md
-d7478a15 🔖 Checkpoint: Edit /workspaces/claude-code-flow/validation-test/docs/TEST_SCENARIOS.md
-a321656c 🔖 Checkpoint: Edit /workspaces/claude-code-flow/validation-test/docs/TEST_GUIDE.md
-5410b1d3 🔖 Checkpoint: Edit /workspaces/claude-code-flow/validation-test/tests/integration/formValidation.test.js
-0548e024 🔖 Checkpoint: Edit /workspaces/claude-code-flow/validation-test/src/formValidator.js
-b47f3b00 🔖 Checkpoint: Edit /workspaces/claude-code-flow/validation-test/src/formValidator.js
-c2bded94 🔖 Checkpoint: Edit /workspaces/claude-code-flow/validation-test/src/formValidator.js
-e7e79d42 🔖 Checkpoint: Edit /workspaces/claude-code-flow/implementation-roadmap.md
-
-## GitHub Releases Created
-No GitHub releases
-
-## Rollback Instructions
-To rollback to a specific checkpoint:
-```bash
-# List all checkpoints
-git tag -l checkpoint-* | sort -r
-
-# List GitHub releases
-gh release list
-
-# Rollback to a checkpoint
-git checkout checkpoint-YYYYMMDD-HHMMSS
-```
diff --git a/validation-test/.github/workflows/test.yml b/validation-test/.github/workflows/test.yml
deleted file mode 100644
index a9461eed1a..0000000000
--- a/validation-test/.github/workflows/test.yml
+++ /dev/null
@@ -1,64 +0,0 @@
-name: Test Suite
-
-on:
- push:
- branches: [ main, develop ]
- pull_request:
- branches: [ main ]
-
-jobs:
- test:
- runs-on: ubuntu-latest
-
- strategy:
- matrix:
- node-version: [18.x, 20.x]
-
- steps:
- - uses: actions/checkout@v3
-
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
- with:
- node-version: ${{ matrix.node-version }}
- cache: 'npm'
-
- - name: Install dependencies
- run: npm ci
-
- - name: Run linter
- run: npm run lint --if-present
-
- - name: Run tests with coverage
- run: npm test
-
- - name: Upload coverage reports
- uses: codecov/codecov-action@v3
- with:
- file: ./coverage/coverage-final.json
- flags: unittests
- name: codecov-umbrella
- fail_ci_if_error: false
-
- validate:
- runs-on: ubuntu-latest
- needs: test
-
- steps:
- - uses: actions/checkout@v3
-
- - name: Use Node.js
- uses: actions/setup-node@v3
- with:
- node-version: '18.x'
-
- - name: Install dependencies
- run: npm ci
-
- - name: Check coverage thresholds
- run: npm run coverage
-
- - name: Generate coverage badge
- run: |
- COVERAGE=$(cat coverage/coverage-summary.json | jq '.total.lines.pct')
- echo "Coverage: ${COVERAGE}%"
\ No newline at end of file
diff --git a/validation-test/README.md b/validation-test/README.md
deleted file mode 100644
index 890abce021..0000000000
--- a/validation-test/README.md
+++ /dev/null
@@ -1,107 +0,0 @@
-# Validation Test Library
-
-A comprehensive validation library built using Test-Driven Development (TDD) principles with full test coverage.
-
-## Features
-
-- ✅ Email validation
-- ✅ Phone number validation
-- ✅ URL validation
-- ✅ Password strength checking
-- ✅ Credit card validation (with Luhn algorithm)
-- ✅ Form validation with field dependencies
-- ✅ Async validation support
-- ✅ Batch validation for large datasets
-- ✅ Real-time validation with debouncing
-- ✅ Custom validation rules
-- ✅ Internationalization support
-
-## Installation
-
-```bash
-npm install
-```
-
-## Usage
-
-### Basic Validation
-
-```javascript
-const { Validator } = require('./src');
-
-const validator = new Validator();
-
-// Email validation
-const emailResult = validator.validateEmail('[email protected]');
-console.log(emailResult.isValid); // true
-
-// Password validation
-const passwordResult = validator.validatePassword('MyP@ssw0rd123!');
-console.log(passwordResult.strength); // 'strong'
-
-// Credit card validation
-const cardResult = validator.validateCreditCard('4111111111111111');
-console.log(cardResult.cardType); // 'visa'
-```
-
-### Form Validation
-
-```javascript
-const { FormValidator } = require('./src');
-
-const formValidator = new FormValidator();
-
-const formData = {
- email: '[email protected]',
- password: 'SecurePass123!',
- confirmPassword: 'SecurePass123!',
- age: 25,
- terms: true
-};
-
-const rules = {
- email: { required: true, type: 'email' },
- password: { required: true, type: 'password' },
- confirmPassword: { required: true, matches: 'password' },
- age: { required: true, min: 18 },
- terms: { required: true, value: true }
-};
-
-const result = formValidator.validate(formData, rules);
-console.log(result.isValid); // true
-```
-
-## Testing
-
-Run all tests:
-```bash
-npm test
-```
-
-Generate coverage report:
-```bash
-npm run coverage
-```
-
-## Test Coverage
-
-The library maintains >85% test coverage across:
-- Unit tests
-- Integration tests
-- End-to-end tests
-
-## Documentation
-
-- [Test Guide](docs/TEST_GUIDE.md) - How to run and write tests
-- [Test Scenarios](docs/TEST_SCENARIOS.md) - Detailed test case documentation
-
-## CI/CD
-
-Tests run automatically via GitHub Actions on:
-- Push to main branch
-- Pull requests
-- Multiple Node.js versions (18.x, 20.x)
-
-## License
-
-MIT
\ No newline at end of file
diff --git a/validation-test/docs/TEST_GUIDE.md b/validation-test/docs/TEST_GUIDE.md
deleted file mode 100644
index 6ba4e4a008..0000000000
--- a/validation-test/docs/TEST_GUIDE.md
+++ /dev/null
@@ -1,114 +0,0 @@
-# Validation Library Test Guide
-
-## Overview
-This validation library has been built using Test-Driven Development (TDD) principles with comprehensive test coverage.
-
-## Test Structure
-
-```
-tests/
-├── unit/ # Unit tests for individual components
-│ └── validator.test.js
-├── integration/ # Integration tests for component interactions
-│ └── formValidation.test.js
-├── e2e/ # End-to-end workflow tests
-│ └── validation.e2e.test.js
-├── fixtures/ # Test data and mock data
-│ └── testData.js
-└── helpers/ # Testing utilities
- └── testHelpers.js
-```
-
-## Running Tests
-
-### All Tests
-```bash
-npm test
-```
-
-### Unit Tests Only
-```bash
-npm run test:unit
-```
-
-### Integration Tests Only
-```bash
-npm run test:integration
-```
-
-### End-to-End Tests Only
-```bash
-npm run test:e2e
-```
-
-### Watch Mode (for development)
-```bash
-npm run test:watch
-```
-
-### Coverage Report
-```bash
-npm run coverage
-```
-
-## Test Coverage
-
-The project maintains a minimum of 90% code coverage across:
-- Statements
-- Branches
-- Functions
-- Lines
-
-Coverage reports are generated in the `coverage/` directory.
-
-## Testing Best Practices
-
-1. **No Hardcoded Values**: All test data is stored in fixtures
-2. **Test Independence**: Each test runs in isolation
-3. **Mock External Dependencies**: External services are mocked
-4. **Behavior Testing**: Tests focus on behavior, not implementation
-5. **Descriptive Names**: Test names clearly describe what is being tested
-
-## Test Categories
-
-### Unit Tests
-- Email validation
-- Phone number validation
-- URL validation
-- Password strength validation
-- Credit card validation
-- Custom validation rules
-- Async validation
-- Batch validation
-
-### Integration Tests
-- User registration forms
-- Payment forms
-- Dynamic form validation
-- Real-time validation
-- Field dependencies
-- Conditional validation
-
-### E2E Tests
-- Complete registration workflow
-- Payment processing workflow
-- Multi-step forms
-- Bulk data import
-- API validation
-- Large dataset handling
-
-## Debugging Tests
-
-To debug a specific test:
-```bash
-node --inspect-brk node_modules/.bin/jest tests/unit/validator.test.js
-```
-
-## CI/CD Integration
-
-Tests run automatically on:
-- Push to main branch
-- Pull requests
-- Pre-commit hooks (if configured)
-
-See `.github/workflows/test.yml` for CI configuration.
\ No newline at end of file
diff --git a/validation-test/docs/TEST_SCENARIOS.md b/validation-test/docs/TEST_SCENARIOS.md
deleted file mode 100644
index b6afd0aca2..0000000000
--- a/validation-test/docs/TEST_SCENARIOS.md
+++ /dev/null
@@ -1,137 +0,0 @@
-# Test Scenarios Documentation
-
-## Email Validation
-
-### Valid Cases
-- Standard email: `[email protected]`
-- With subdomain: `[email protected]`
-- With plus sign: `[email protected]`
-- With underscore: `[email protected]`
-
-### Invalid Cases
-- Missing @ symbol: `notanemail`
-- Missing local part: `@example.com`
-- Missing domain: `user@`
-- Invalid domain: `[email protected]`
-- Contains spaces: `user [email protected]`
-- Double dots: `[email protected]`
-
-## Phone Number Validation
-
-### Valid Cases
-- International format: `+1234567890`
-- With spaces: `+44 20 7123 1234`
-- US format with parentheses: `(555) 123-4567`
-- With dashes: `555-123-4567`
-- Plain numbers: `5551234567`
-
-### Invalid Cases
-- Too short: `123`
-- Contains letters: `phone`
-- Incomplete: `123-456`
-- Too long: `+1 234 567 890 123 456`
-
-## URL Validation
-
-### Valid Cases
-- HTTPS: `https://example.com`
-- HTTP: `http://subdomain.example.org`
-- With path: `https://example.com/path/to/page`
-- With port: `https://example.com:8080`
-- FTP: `ftp://files.example.com`
-
-### Invalid Cases
-- Plain text: `not a url`
-- Typo in protocol: `htp://example.com`
-- Missing protocol: `//example.com`
-- No protocol: `example.com`
-- Incomplete: `https://`
-
-## Password Validation
-
-### Strength Levels
-- **Weak**: Less than 8 characters, missing uppercase/numbers
-- **Medium**: 8+ characters with mixed case and numbers
-- **Strong**: 8+ characters with mixed case, numbers, and special characters
-
-### Validation Rules
-- Minimum length: 8 characters (configurable)
-- Must contain uppercase letters
-- Must contain numbers
-- Optional: special characters
-- Custom rules supported
-
-## Credit Card Validation
-
-### Supported Card Types
-- **Visa**: Starts with 4, 16 digits
-- **MasterCard**: Starts with 51-55, 16 digits
-- **American Express**: Starts with 34 or 37, 15 digits
-
-### Validation Method
-- Luhn algorithm for checksum validation
-- Card type detection based on prefix
-- Length validation
-
-## Form Validation Scenarios
-
-### User Registration
-- Username: 3-20 characters
-- Email: Valid format required
-- Password: Medium strength minimum
-- Confirm Password: Must match
-- Age: Must be 18+
-- Terms: Must accept
-
-### Payment Form
-- Card number validation
-- Expiry date checking
-- CVV format validation
-- Billing address validation
-- Fraud detection simulation
-
-### Dynamic Forms
-- Conditional field requirements
-- Field dependencies (country → state/province)
-- Real-time validation with debouncing
-- Progressive disclosure
-
-## Bulk Data Validation
-
-### CSV Import
-- Email format validation
-- Phone number validation
-- Required field checking
-- Error reporting by row
-- Batch processing support
-
-### Performance
-- Handle 1000+ records efficiently
-- Parallel processing option
-- Configurable batch sizes
-- Sub-5 second processing for large datasets
-
-## API Validation
-
-### Request Validation
-- Method validation
-- Header checking
-- Body schema validation
-- Authentication token presence
-
-### Response Validation
-- Status code checking
-- Schema conformance
-- Data type validation
-- Required field presence
-
-## Edge Cases Covered
-
-1. **Null/Undefined Handling**: All validators handle null/undefined gracefully
-2. **Whitespace Trimming**: Automatic trimming of input values
-3. **Type Coercion**: Safe type checking without coercion issues
-4. **Async Timeouts**: Configurable timeouts for async validations
-5. **Memory Efficiency**: Debouncing for real-time validation
-6. **Error Accumulation**: Collecting all errors, not stopping at first
-7. **Internationalization**: Support for multiple locales
-8. **Custom Rules**: Extensible validation system
\ No newline at end of file
diff --git a/validation-test/memory/memory-store.json b/validation-test/memory/memory-store.json
deleted file mode 100644
index 0ce7557f6e..0000000000
--- a/validation-test/memory/memory-store.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "default": [
- {
- "key": "tdd_complete",
- "value": "TDD validation test complete. Created comprehensive validation library with 74 tests (61 passing, 13 edge cases). Coverage: ~86% statements, ~79% branches. Structure: unit/integration/e2e tests, no hardcoded values, full documentation, CI/CD setup.",
- "namespace": "default",
- "timestamp": 1755355305102
- }
- ]
-}
\ No newline at end of file
diff --git a/validation-test/package-lock.json b/validation-test/package-lock.json
deleted file mode 100644
index ed93e76aae..0000000000
--- a/validation-test/package-lock.json
+++ /dev/null
@@ -1,4570 +0,0 @@
-{
- "name": "validation-test",
- "version": "1.0.0",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "validation-test",
- "version": "1.0.0",
- "license": "MIT",
- "devDependencies": {
- "@types/jest": "^29.5.12",
- "eslint": "^8.57.0",
- "jest": "^29.7.0",
- "prettier": "^3.2.5"
- }
- },
- "node_modules/@ampproject/remapping": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
- "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@jridgewell/gen-mapping": "^0.3.5",
- "@jridgewell/trace-mapping": "^0.3.24"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@babel/code-frame": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz",
- "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-validator-identifier": "^7.27.1",
- "js-tokens": "^4.0.0",
- "picocolors": "^1.1.1"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/compat-data": {
- "version": "7.28.0",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.0.tgz",
- "integrity": "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/core": {
- "version": "7.28.3",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.3.tgz",
- "integrity": "sha512-yDBHV9kQNcr2/sUr9jghVyz9C3Y5G2zUM2H2lo+9mKv4sFgbA8s8Z9t8D1jiTkGoO/NoIfKMyKWr4s6CN23ZwQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@ampproject/remapping": "^2.2.0",
- "@babel/code-frame": "^7.27.1",
- "@babel/generator": "^7.28.3",
- "@babel/helper-compilation-targets": "^7.27.2",
- "@babel/helper-module-transforms": "^7.28.3",
- "@babel/helpers": "^7.28.3",
- "@babel/parser": "^7.28.3",
- "@babel/template": "^7.27.2",
- "@babel/traverse": "^7.28.3",
- "@babel/types": "^7.28.2",
- "convert-source-map": "^2.0.0",
- "debug": "^4.1.0",
- "gensync": "^1.0.0-beta.2",
- "json5": "^2.2.3",
- "semver": "^6.3.1"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/babel"
- }
- },
- "node_modules/@babel/generator": {
- "version": "7.28.3",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz",
- "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/parser": "^7.28.3",
- "@babel/types": "^7.28.2",
- "@jridgewell/gen-mapping": "^0.3.12",
- "@jridgewell/trace-mapping": "^0.3.28",
- "jsesc": "^3.0.2"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-compilation-targets": {
- "version": "7.27.2",
- "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz",
- "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/compat-data": "^7.27.2",
- "@babel/helper-validator-option": "^7.27.1",
- "browserslist": "^4.24.0",
- "lru-cache": "^5.1.1",
- "semver": "^6.3.1"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-globals": {
- "version": "7.28.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz",
- "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-module-imports": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz",
- "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/traverse": "^7.27.1",
- "@babel/types": "^7.27.1"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-module-transforms": {
- "version": "7.28.3",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz",
- "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-module-imports": "^7.27.1",
- "@babel/helper-validator-identifier": "^7.27.1",
- "@babel/traverse": "^7.28.3"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0"
- }
- },
- "node_modules/@babel/helper-plugin-utils": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz",
- "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-string-parser": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
- "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-validator-identifier": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz",
- "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-validator-option": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz",
- "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helpers": {
- "version": "7.28.3",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.3.tgz",
- "integrity": "sha512-PTNtvUQihsAsDHMOP5pfobP8C6CM4JWXmP8DrEIt46c3r2bf87Ua1zoqevsMo9g+tWDwgWrFP5EIxuBx5RudAw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/template": "^7.27.2",
- "@babel/types": "^7.28.2"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/parser": {
- "version": "7.28.3",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.3.tgz",
- "integrity": "sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/types": "^7.28.2"
- },
- "bin": {
- "parser": "bin/babel-parser.js"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@babel/plugin-syntax-async-generators": {
- "version": "7.8.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
- "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-bigint": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz",
- "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-class-properties": {
- "version": "7.12.13",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz",
- "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.12.13"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-class-static-block": {
- "version": "7.14.5",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz",
- "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.14.5"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-import-attributes": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz",
- "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.27.1"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-import-meta": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz",
- "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.4"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-json-strings": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
- "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-jsx": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz",
- "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.27.1"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-logical-assignment-operators": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz",
- "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.4"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
- "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-numeric-separator": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz",
- "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.4"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-object-rest-spread": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
- "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-optional-catch-binding": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz",
- "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-optional-chaining": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz",
- "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-private-property-in-object": {
- "version": "7.14.5",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz",
- "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.14.5"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-top-level-await": {
- "version": "7.14.5",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz",
- "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.14.5"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-typescript": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz",
- "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.27.1"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/template": {
- "version": "7.27.2",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz",
- "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/code-frame": "^7.27.1",
- "@babel/parser": "^7.27.2",
- "@babel/types": "^7.27.1"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/traverse": {
- "version": "7.28.3",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.3.tgz",
- "integrity": "sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/code-frame": "^7.27.1",
- "@babel/generator": "^7.28.3",
- "@babel/helper-globals": "^7.28.0",
- "@babel/parser": "^7.28.3",
- "@babel/template": "^7.27.2",
- "@babel/types": "^7.28.2",
- "debug": "^4.3.1"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/types": {
- "version": "7.28.2",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz",
- "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-string-parser": "^7.27.1",
- "@babel/helper-validator-identifier": "^7.27.1"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@bcoe/v8-coverage": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz",
- "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@eslint-community/eslint-utils": {
- "version": "4.7.0",
- "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz",
- "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "eslint-visitor-keys": "^3.4.3"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- },
- "peerDependencies": {
- "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
- }
- },
- "node_modules/@eslint-community/regexpp": {
- "version": "4.12.1",
- "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz",
- "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
- }
- },
- "node_modules/@eslint/eslintrc": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz",
- "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ajv": "^6.12.4",
- "debug": "^4.3.2",
- "espree": "^9.6.0",
- "globals": "^13.19.0",
- "ignore": "^5.2.0",
- "import-fresh": "^3.2.1",
- "js-yaml": "^4.1.0",
- "minimatch": "^3.1.2",
- "strip-json-comments": "^3.1.1"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/@eslint/js": {
- "version": "8.57.1",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz",
- "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- }
- },
- "node_modules/@humanwhocodes/config-array": {
- "version": "0.13.0",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
- "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==",
- "deprecated": "Use @eslint/config-array instead",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@humanwhocodes/object-schema": "^2.0.3",
- "debug": "^4.3.1",
- "minimatch": "^3.0.5"
- },
- "engines": {
- "node": ">=10.10.0"
- }
- },
- "node_modules/@humanwhocodes/module-importer": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
- "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": ">=12.22"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/nzakas"
- }
- },
- "node_modules/@humanwhocodes/object-schema": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",
- "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
- "deprecated": "Use @eslint/object-schema instead",
- "dev": true,
- "license": "BSD-3-Clause"
- },
- "node_modules/@istanbuljs/load-nyc-config": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
- "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "camelcase": "^5.3.1",
- "find-up": "^4.1.0",
- "get-package-type": "^0.1.0",
- "js-yaml": "^3.13.1",
- "resolve-from": "^5.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
- "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "sprintf-js": "~1.0.2"
- }
- },
- "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "locate-path": "^5.0.0",
- "path-exists": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": {
- "version": "3.14.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
- "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "argparse": "^1.0.7",
- "esprima": "^4.0.0"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
- }
- },
- "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-locate": "^4.1.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
- "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-try": "^2.0.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-limit": "^2.2.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
- "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@istanbuljs/schema": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
- "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@jest/console": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz",
- "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/types": "^29.6.3",
- "@types/node": "*",
- "chalk": "^4.0.0",
- "jest-message-util": "^29.7.0",
- "jest-util": "^29.7.0",
- "slash": "^3.0.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/@jest/core": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz",
- "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/console": "^29.7.0",
- "@jest/reporters": "^29.7.0",
- "@jest/test-result": "^29.7.0",
- "@jest/transform": "^29.7.0",
- "@jest/types": "^29.6.3",
- "@types/node": "*",
- "ansi-escapes": "^4.2.1",
- "chalk": "^4.0.0",
- "ci-info": "^3.2.0",
- "exit": "^0.1.2",
- "graceful-fs": "^4.2.9",
- "jest-changed-files": "^29.7.0",
- "jest-config": "^29.7.0",
- "jest-haste-map": "^29.7.0",
- "jest-message-util": "^29.7.0",
- "jest-regex-util": "^29.6.3",
- "jest-resolve": "^29.7.0",
- "jest-resolve-dependencies": "^29.7.0",
- "jest-runner": "^29.7.0",
- "jest-runtime": "^29.7.0",
- "jest-snapshot": "^29.7.0",
- "jest-util": "^29.7.0",
- "jest-validate": "^29.7.0",
- "jest-watcher": "^29.7.0",
- "micromatch": "^4.0.4",
- "pretty-format": "^29.7.0",
- "slash": "^3.0.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- },
- "peerDependencies": {
- "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
- },
- "peerDependenciesMeta": {
- "node-notifier": {
- "optional": true
- }
- }
- },
- "node_modules/@jest/environment": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz",
- "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/fake-timers": "^29.7.0",
- "@jest/types": "^29.6.3",
- "@types/node": "*",
- "jest-mock": "^29.7.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/@jest/expect": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz",
- "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "expect": "^29.7.0",
- "jest-snapshot": "^29.7.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/@jest/expect-utils": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz",
- "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "jest-get-type": "^29.6.3"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/@jest/fake-timers": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz",
- "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/types": "^29.6.3",
- "@sinonjs/fake-timers": "^10.0.2",
- "@types/node": "*",
- "jest-message-util": "^29.7.0",
- "jest-mock": "^29.7.0",
- "jest-util": "^29.7.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/@jest/globals": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz",
- "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/environment": "^29.7.0",
- "@jest/expect": "^29.7.0",
- "@jest/types": "^29.6.3",
- "jest-mock": "^29.7.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/@jest/reporters": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz",
- "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@bcoe/v8-coverage": "^0.2.3",
- "@jest/console": "^29.7.0",
- "@jest/test-result": "^29.7.0",
- "@jest/transform": "^29.7.0",
- "@jest/types": "^29.6.3",
- "@jridgewell/trace-mapping": "^0.3.18",
- "@types/node": "*",
- "chalk": "^4.0.0",
- "collect-v8-coverage": "^1.0.0",
- "exit": "^0.1.2",
- "glob": "^7.1.3",
- "graceful-fs": "^4.2.9",
- "istanbul-lib-coverage": "^3.0.0",
- "istanbul-lib-instrument": "^6.0.0",
- "istanbul-lib-report": "^3.0.0",
- "istanbul-lib-source-maps": "^4.0.0",
- "istanbul-reports": "^3.1.3",
- "jest-message-util": "^29.7.0",
- "jest-util": "^29.7.0",
- "jest-worker": "^29.7.0",
- "slash": "^3.0.0",
- "string-length": "^4.0.1",
- "strip-ansi": "^6.0.0",
- "v8-to-istanbul": "^9.0.1"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- },
- "peerDependencies": {
- "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
- },
- "peerDependenciesMeta": {
- "node-notifier": {
- "optional": true
- }
- }
- },
- "node_modules/@jest/schemas": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",
- "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@sinclair/typebox": "^0.27.8"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/@jest/source-map": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz",
- "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/trace-mapping": "^0.3.18",
- "callsites": "^3.0.0",
- "graceful-fs": "^4.2.9"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/@jest/test-result": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz",
- "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/console": "^29.7.0",
- "@jest/types": "^29.6.3",
- "@types/istanbul-lib-coverage": "^2.0.0",
- "collect-v8-coverage": "^1.0.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/@jest/test-sequencer": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz",
- "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/test-result": "^29.7.0",
- "graceful-fs": "^4.2.9",
- "jest-haste-map": "^29.7.0",
- "slash": "^3.0.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/@jest/transform": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz",
- "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/core": "^7.11.6",
- "@jest/types": "^29.6.3",
- "@jridgewell/trace-mapping": "^0.3.18",
- "babel-plugin-istanbul": "^6.1.1",
- "chalk": "^4.0.0",
- "convert-source-map": "^2.0.0",
- "fast-json-stable-stringify": "^2.1.0",
- "graceful-fs": "^4.2.9",
- "jest-haste-map": "^29.7.0",
- "jest-regex-util": "^29.6.3",
- "jest-util": "^29.7.0",
- "micromatch": "^4.0.4",
- "pirates": "^4.0.4",
- "slash": "^3.0.0",
- "write-file-atomic": "^4.0.2"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/@jest/types": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz",
- "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/schemas": "^29.6.3",
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^17.0.8",
- "chalk": "^4.0.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/@jridgewell/gen-mapping": {
- "version": "0.3.13",
- "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
- "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/sourcemap-codec": "^1.5.0",
- "@jridgewell/trace-mapping": "^0.3.24"
- }
- },
- "node_modules/@jridgewell/resolve-uri": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
- "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.5.5",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
- "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@jridgewell/trace-mapping": {
- "version": "0.3.30",
- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.30.tgz",
- "integrity": "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/resolve-uri": "^3.1.0",
- "@jridgewell/sourcemap-codec": "^1.4.14"
- }
- },
- "node_modules/@nodelib/fs.scandir": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
- "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@nodelib/fs.stat": "2.0.5",
- "run-parallel": "^1.1.9"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@nodelib/fs.stat": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
- "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@nodelib/fs.walk": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
- "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@nodelib/fs.scandir": "2.1.5",
- "fastq": "^1.6.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@sinclair/typebox": {
- "version": "0.27.8",
- "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
- "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@sinonjs/commons": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz",
- "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "type-detect": "4.0.8"
- }
- },
- "node_modules/@sinonjs/fake-timers": {
- "version": "10.3.0",
- "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz",
- "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "@sinonjs/commons": "^3.0.0"
- }
- },
- "node_modules/@types/babel__core": {
- "version": "7.20.5",
- "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
- "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/parser": "^7.20.7",
- "@babel/types": "^7.20.7",
- "@types/babel__generator": "*",
- "@types/babel__template": "*",
- "@types/babel__traverse": "*"
- }
- },
- "node_modules/@types/babel__generator": {
- "version": "7.27.0",
- "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz",
- "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/types": "^7.0.0"
- }
- },
- "node_modules/@types/babel__template": {
- "version": "7.4.4",
- "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",
- "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/parser": "^7.1.0",
- "@babel/types": "^7.0.0"
- }
- },
- "node_modules/@types/babel__traverse": {
- "version": "7.28.0",
- "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz",
- "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/types": "^7.28.2"
- }
- },
- "node_modules/@types/graceful-fs": {
- "version": "4.1.9",
- "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz",
- "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/istanbul-lib-coverage": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",
- "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/istanbul-lib-report": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz",
- "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/istanbul-lib-coverage": "*"
- }
- },
- "node_modules/@types/istanbul-reports": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz",
- "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "node_modules/@types/jest": {
- "version": "29.5.14",
- "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz",
- "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "expect": "^29.0.0",
- "pretty-format": "^29.0.0"
- }
- },
- "node_modules/@types/node": {
- "version": "24.3.0",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz",
- "integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "undici-types": "~7.10.0"
- }
- },
- "node_modules/@types/stack-utils": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz",
- "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/yargs": {
- "version": "17.0.33",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz",
- "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/yargs-parser": "*"
- }
- },
- "node_modules/@types/yargs-parser": {
- "version": "21.0.3",
- "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz",
- "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@ungap/structured-clone": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz",
- "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/acorn": {
- "version": "8.15.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
- "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
- "dev": true,
- "license": "MIT",
- "bin": {
- "acorn": "bin/acorn"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/acorn-jsx": {
- "version": "5.3.2",
- "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
- "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
- "dev": true,
- "license": "MIT",
- "peerDependencies": {
- "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
- }
- },
- "node_modules/ajv": {
- "version": "6.12.6",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
- "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "fast-deep-equal": "^3.1.1",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
- }
- },
- "node_modules/ansi-escapes": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
- "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "type-fest": "^0.21.3"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/ansi-escapes/node_modules/type-fest": {
- "version": "0.21.3",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
- "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
- "dev": true,
- "license": "(MIT OR CC0-1.0)",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/anymatch": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
- "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "normalize-path": "^3.0.0",
- "picomatch": "^2.0.4"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/argparse": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
- "dev": true,
- "license": "Python-2.0"
- },
- "node_modules/babel-jest": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz",
- "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/transform": "^29.7.0",
- "@types/babel__core": "^7.1.14",
- "babel-plugin-istanbul": "^6.1.1",
- "babel-preset-jest": "^29.6.3",
- "chalk": "^4.0.0",
- "graceful-fs": "^4.2.9",
- "slash": "^3.0.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.8.0"
- }
- },
- "node_modules/babel-plugin-istanbul": {
- "version": "6.1.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz",
- "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.0.0",
- "@istanbuljs/load-nyc-config": "^1.0.0",
- "@istanbuljs/schema": "^0.1.2",
- "istanbul-lib-instrument": "^5.0.4",
- "test-exclude": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz",
- "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "@babel/core": "^7.12.3",
- "@babel/parser": "^7.14.7",
- "@istanbuljs/schema": "^0.1.2",
- "istanbul-lib-coverage": "^3.2.0",
- "semver": "^6.3.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/babel-plugin-jest-hoist": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz",
- "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/template": "^7.3.3",
- "@babel/types": "^7.3.3",
- "@types/babel__core": "^7.1.14",
- "@types/babel__traverse": "^7.0.6"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/babel-preset-current-node-syntax": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz",
- "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/plugin-syntax-async-generators": "^7.8.4",
- "@babel/plugin-syntax-bigint": "^7.8.3",
- "@babel/plugin-syntax-class-properties": "^7.12.13",
- "@babel/plugin-syntax-class-static-block": "^7.14.5",
- "@babel/plugin-syntax-import-attributes": "^7.24.7",
- "@babel/plugin-syntax-import-meta": "^7.10.4",
- "@babel/plugin-syntax-json-strings": "^7.8.3",
- "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",
- "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
- "@babel/plugin-syntax-numeric-separator": "^7.10.4",
- "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
- "@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
- "@babel/plugin-syntax-optional-chaining": "^7.8.3",
- "@babel/plugin-syntax-private-property-in-object": "^7.14.5",
- "@babel/plugin-syntax-top-level-await": "^7.14.5"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0 || ^8.0.0-0"
- }
- },
- "node_modules/babel-preset-jest": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz",
- "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "babel-plugin-jest-hoist": "^29.6.3",
- "babel-preset-current-node-syntax": "^1.0.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0"
- }
- },
- "node_modules/balanced-match": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/brace-expansion": {
- "version": "1.1.12",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
- "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/braces": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
- "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "fill-range": "^7.1.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/browserslist": {
- "version": "4.25.2",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.2.tgz",
- "integrity": "sha512-0si2SJK3ooGzIawRu61ZdPCO1IncZwS8IzuX73sPZsXW6EQ/w/DAfPyKI8l1ETTCr2MnvqWitmlCUxgdul45jA==",
- "dev": true,
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/browserslist"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/browserslist"
- },
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "caniuse-lite": "^1.0.30001733",
- "electron-to-chromium": "^1.5.199",
- "node-releases": "^2.0.19",
- "update-browserslist-db": "^1.1.3"
- },
- "bin": {
- "browserslist": "cli.js"
- },
- "engines": {
- "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
- }
- },
- "node_modules/bser": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz",
- "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "node-int64": "^0.4.0"
- }
- },
- "node_modules/buffer-from": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
- "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/callsites": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
- "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/camelcase": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
- "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/caniuse-lite": {
- "version": "1.0.30001735",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001735.tgz",
- "integrity": "sha512-EV/laoX7Wq2J9TQlyIXRxTJqIw4sxfXS4OYgudGxBYRuTv0q7AM6yMEpU/Vo1I94thg9U6EZ2NfZx9GJq83u7w==",
- "dev": true,
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/browserslist"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
- },
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
- "license": "CC-BY-4.0"
- },
- "node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/char-regex": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz",
- "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/ci-info": {
- "version": "3.9.0",
- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz",
- "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/sibiraj-s"
- }
- ],
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/cjs-module-lexer": {
- "version": "1.4.3",
- "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz",
- "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/cliui": {
- "version": "8.0.1",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
- "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "string-width": "^4.2.0",
- "strip-ansi": "^6.0.1",
- "wrap-ansi": "^7.0.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/co": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
- "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "iojs": ">= 1.0.0",
- "node": ">= 0.12.0"
- }
- },
- "node_modules/collect-v8-coverage": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz",
- "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/convert-source-map": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
- "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/create-jest": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz",
- "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/types": "^29.6.3",
- "chalk": "^4.0.0",
- "exit": "^0.1.2",
- "graceful-fs": "^4.2.9",
- "jest-config": "^29.7.0",
- "jest-util": "^29.7.0",
- "prompts": "^2.0.1"
- },
- "bin": {
- "create-jest": "bin/create-jest.js"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/cross-spawn": {
- "version": "7.0.6",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
- "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "path-key": "^3.1.0",
- "shebang-command": "^2.0.0",
- "which": "^2.0.1"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/debug": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
- "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ms": "^2.1.3"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/dedent": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz",
- "integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==",
- "dev": true,
- "license": "MIT",
- "peerDependencies": {
- "babel-plugin-macros": "^3.1.0"
- },
- "peerDependenciesMeta": {
- "babel-plugin-macros": {
- "optional": true
- }
- }
- },
- "node_modules/deep-is": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
- "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/deepmerge": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
- "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/detect-newline": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz",
- "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/diff-sequences": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz",
- "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/doctrine": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
- "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "esutils": "^2.0.2"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/electron-to-chromium": {
- "version": "1.5.203",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.203.tgz",
- "integrity": "sha512-uz4i0vLhfm6dLZWbz/iH88KNDV+ivj5+2SA+utpgjKaj9Q0iDLuwk6Idhe9BTxciHudyx6IvTvijhkPvFGUQ0g==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/emittery": {
- "version": "0.13.1",
- "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz",
- "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/emittery?sponsor=1"
- }
- },
- "node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/error-ex": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
- "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "is-arrayish": "^0.2.1"
- }
- },
- "node_modules/escalade": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
- "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/escape-string-regexp": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eslint": {
- "version": "8.57.1",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz",
- "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==",
- "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@eslint-community/eslint-utils": "^4.2.0",
- "@eslint-community/regexpp": "^4.6.1",
- "@eslint/eslintrc": "^2.1.4",
- "@eslint/js": "8.57.1",
- "@humanwhocodes/config-array": "^0.13.0",
- "@humanwhocodes/module-importer": "^1.0.1",
- "@nodelib/fs.walk": "^1.2.8",
- "@ungap/structured-clone": "^1.2.0",
- "ajv": "^6.12.4",
- "chalk": "^4.0.0",
- "cross-spawn": "^7.0.2",
- "debug": "^4.3.2",
- "doctrine": "^3.0.0",
- "escape-string-regexp": "^4.0.0",
- "eslint-scope": "^7.2.2",
- "eslint-visitor-keys": "^3.4.3",
- "espree": "^9.6.1",
- "esquery": "^1.4.2",
- "esutils": "^2.0.2",
- "fast-deep-equal": "^3.1.3",
- "file-entry-cache": "^6.0.1",
- "find-up": "^5.0.0",
- "glob-parent": "^6.0.2",
- "globals": "^13.19.0",
- "graphemer": "^1.4.0",
- "ignore": "^5.2.0",
- "imurmurhash": "^0.1.4",
- "is-glob": "^4.0.0",
- "is-path-inside": "^3.0.3",
- "js-yaml": "^4.1.0",
- "json-stable-stringify-without-jsonify": "^1.0.1",
- "levn": "^0.4.1",
- "lodash.merge": "^4.6.2",
- "minimatch": "^3.1.2",
- "natural-compare": "^1.4.0",
- "optionator": "^0.9.3",
- "strip-ansi": "^6.0.1",
- "text-table": "^0.2.0"
- },
- "bin": {
- "eslint": "bin/eslint.js"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/eslint-scope": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
- "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "esrecurse": "^4.3.0",
- "estraverse": "^5.2.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/eslint-visitor-keys": {
- "version": "3.4.3",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
- "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/espree": {
- "version": "9.6.1",
- "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
- "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "acorn": "^8.9.0",
- "acorn-jsx": "^5.3.2",
- "eslint-visitor-keys": "^3.4.1"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/esprima": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
- "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
- "dev": true,
- "license": "BSD-2-Clause",
- "bin": {
- "esparse": "bin/esparse.js",
- "esvalidate": "bin/esvalidate.js"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/esquery": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz",
- "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "estraverse": "^5.1.0"
- },
- "engines": {
- "node": ">=0.10"
- }
- },
- "node_modules/esrecurse": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
- "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "estraverse": "^5.2.0"
- },
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/estraverse": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
- "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
- "dev": true,
- "license": "BSD-2-Clause",
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/esutils": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
- "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
- "dev": true,
- "license": "BSD-2-Clause",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/execa": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
- "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "cross-spawn": "^7.0.3",
- "get-stream": "^6.0.0",
- "human-signals": "^2.1.0",
- "is-stream": "^2.0.0",
- "merge-stream": "^2.0.0",
- "npm-run-path": "^4.0.1",
- "onetime": "^5.1.2",
- "signal-exit": "^3.0.3",
- "strip-final-newline": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/execa?sponsor=1"
- }
- },
- "node_modules/exit": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
- "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==",
- "dev": true,
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/expect": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz",
- "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/expect-utils": "^29.7.0",
- "jest-get-type": "^29.6.3",
- "jest-matcher-utils": "^29.7.0",
- "jest-message-util": "^29.7.0",
- "jest-util": "^29.7.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/fast-deep-equal": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/fast-json-stable-stringify": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
- "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/fast-levenshtein": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
- "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/fastq": {
- "version": "1.19.1",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",
- "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "reusify": "^1.0.4"
- }
- },
- "node_modules/fb-watchman": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz",
- "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "bser": "2.1.1"
- }
- },
- "node_modules/file-entry-cache": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
- "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "flat-cache": "^3.0.4"
- },
- "engines": {
- "node": "^10.12.0 || >=12.0.0"
- }
- },
- "node_modules/fill-range": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
- "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "to-regex-range": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/find-up": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
- "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "locate-path": "^6.0.0",
- "path-exists": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/flat-cache": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",
- "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "flatted": "^3.2.9",
- "keyv": "^4.5.3",
- "rimraf": "^3.0.2"
- },
- "engines": {
- "node": "^10.12.0 || >=12.0.0"
- }
- },
- "node_modules/flatted": {
- "version": "3.3.3",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz",
- "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/fsevents": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
- "node_modules/function-bind": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
- "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
- "dev": true,
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/gensync": {
- "version": "1.0.0-beta.2",
- "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
- "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/get-caller-file": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
- "dev": true,
- "license": "ISC",
- "engines": {
- "node": "6.* || 8.* || >= 10.*"
- }
- },
- "node_modules/get-package-type": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz",
- "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8.0.0"
- }
- },
- "node_modules/get-stream": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
- "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/glob": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "deprecated": "Glob versions prior to v9 are no longer supported",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.1.1",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "engines": {
- "node": "*"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/glob-parent": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
- "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "is-glob": "^4.0.3"
- },
- "engines": {
- "node": ">=10.13.0"
- }
- },
- "node_modules/globals": {
- "version": "13.24.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
- "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "type-fest": "^0.20.2"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/graceful-fs": {
- "version": "4.2.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
- "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/graphemer": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
- "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/hasown": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
- "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "function-bind": "^1.1.2"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/html-escaper": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
- "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/human-signals": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
- "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": ">=10.17.0"
- }
- },
- "node_modules/ignore": {
- "version": "5.3.2",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
- "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 4"
- }
- },
- "node_modules/import-fresh": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
- "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "parent-module": "^1.0.0",
- "resolve-from": "^4.0.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/import-local": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz",
- "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "pkg-dir": "^4.2.0",
- "resolve-cwd": "^3.0.0"
- },
- "bin": {
- "import-local-fixture": "fixtures/cli.js"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/imurmurhash": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
- "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.8.19"
- }
- },
- "node_modules/inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
- "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "node_modules/inherits": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/is-arrayish": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
- "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/is-core-module": {
- "version": "2.16.1",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
- "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "hasown": "^2.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/is-generator-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz",
- "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/is-glob": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "is-extglob": "^2.1.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.12.0"
- }
- },
- "node_modules/is-path-inside": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
- "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/is-stream": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
- "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/isexe": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/istanbul-lib-coverage": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz",
- "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==",
- "dev": true,
- "license": "BSD-3-Clause",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/istanbul-lib-instrument": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz",
- "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "@babel/core": "^7.23.9",
- "@babel/parser": "^7.23.9",
- "@istanbuljs/schema": "^0.1.3",
- "istanbul-lib-coverage": "^3.2.0",
- "semver": "^7.5.4"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/istanbul-lib-instrument/node_modules/semver": {
- "version": "7.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
- "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/istanbul-lib-report": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz",
- "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "istanbul-lib-coverage": "^3.0.0",
- "make-dir": "^4.0.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/istanbul-lib-source-maps": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz",
- "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "debug": "^4.1.1",
- "istanbul-lib-coverage": "^3.0.0",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/istanbul-reports": {
- "version": "3.1.7",
- "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz",
- "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "html-escaper": "^2.0.0",
- "istanbul-lib-report": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz",
- "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/core": "^29.7.0",
- "@jest/types": "^29.6.3",
- "import-local": "^3.0.2",
- "jest-cli": "^29.7.0"
- },
- "bin": {
- "jest": "bin/jest.js"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- },
- "peerDependencies": {
- "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
- },
- "peerDependenciesMeta": {
- "node-notifier": {
- "optional": true
- }
- }
- },
- "node_modules/jest-changed-files": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz",
- "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "execa": "^5.0.0",
- "jest-util": "^29.7.0",
- "p-limit": "^3.1.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-circus": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz",
- "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/environment": "^29.7.0",
- "@jest/expect": "^29.7.0",
- "@jest/test-result": "^29.7.0",
- "@jest/types": "^29.6.3",
- "@types/node": "*",
- "chalk": "^4.0.0",
- "co": "^4.6.0",
- "dedent": "^1.0.0",
- "is-generator-fn": "^2.0.0",
- "jest-each": "^29.7.0",
- "jest-matcher-utils": "^29.7.0",
- "jest-message-util": "^29.7.0",
- "jest-runtime": "^29.7.0",
- "jest-snapshot": "^29.7.0",
- "jest-util": "^29.7.0",
- "p-limit": "^3.1.0",
- "pretty-format": "^29.7.0",
- "pure-rand": "^6.0.0",
- "slash": "^3.0.0",
- "stack-utils": "^2.0.3"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-cli": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz",
- "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/core": "^29.7.0",
- "@jest/test-result": "^29.7.0",
- "@jest/types": "^29.6.3",
- "chalk": "^4.0.0",
- "create-jest": "^29.7.0",
- "exit": "^0.1.2",
- "import-local": "^3.0.2",
- "jest-config": "^29.7.0",
- "jest-util": "^29.7.0",
- "jest-validate": "^29.7.0",
- "yargs": "^17.3.1"
- },
- "bin": {
- "jest": "bin/jest.js"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- },
- "peerDependencies": {
- "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
- },
- "peerDependenciesMeta": {
- "node-notifier": {
- "optional": true
- }
- }
- },
- "node_modules/jest-config": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz",
- "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/core": "^7.11.6",
- "@jest/test-sequencer": "^29.7.0",
- "@jest/types": "^29.6.3",
- "babel-jest": "^29.7.0",
- "chalk": "^4.0.0",
- "ci-info": "^3.2.0",
- "deepmerge": "^4.2.2",
- "glob": "^7.1.3",
- "graceful-fs": "^4.2.9",
- "jest-circus": "^29.7.0",
- "jest-environment-node": "^29.7.0",
- "jest-get-type": "^29.6.3",
- "jest-regex-util": "^29.6.3",
- "jest-resolve": "^29.7.0",
- "jest-runner": "^29.7.0",
- "jest-util": "^29.7.0",
- "jest-validate": "^29.7.0",
- "micromatch": "^4.0.4",
- "parse-json": "^5.2.0",
- "pretty-format": "^29.7.0",
- "slash": "^3.0.0",
- "strip-json-comments": "^3.1.1"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- },
- "peerDependencies": {
- "@types/node": "*",
- "ts-node": ">=9.0.0"
- },
- "peerDependenciesMeta": {
- "@types/node": {
- "optional": true
- },
- "ts-node": {
- "optional": true
- }
- }
- },
- "node_modules/jest-diff": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz",
- "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "chalk": "^4.0.0",
- "diff-sequences": "^29.6.3",
- "jest-get-type": "^29.6.3",
- "pretty-format": "^29.7.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-docblock": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz",
- "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "detect-newline": "^3.0.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-each": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz",
- "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/types": "^29.6.3",
- "chalk": "^4.0.0",
- "jest-get-type": "^29.6.3",
- "jest-util": "^29.7.0",
- "pretty-format": "^29.7.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-environment-node": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz",
- "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/environment": "^29.7.0",
- "@jest/fake-timers": "^29.7.0",
- "@jest/types": "^29.6.3",
- "@types/node": "*",
- "jest-mock": "^29.7.0",
- "jest-util": "^29.7.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-get-type": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz",
- "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-haste-map": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz",
- "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/types": "^29.6.3",
- "@types/graceful-fs": "^4.1.3",
- "@types/node": "*",
- "anymatch": "^3.0.3",
- "fb-watchman": "^2.0.0",
- "graceful-fs": "^4.2.9",
- "jest-regex-util": "^29.6.3",
- "jest-util": "^29.7.0",
- "jest-worker": "^29.7.0",
- "micromatch": "^4.0.4",
- "walker": "^1.0.8"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- },
- "optionalDependencies": {
- "fsevents": "^2.3.2"
- }
- },
- "node_modules/jest-leak-detector": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz",
- "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "jest-get-type": "^29.6.3",
- "pretty-format": "^29.7.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-matcher-utils": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz",
- "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "chalk": "^4.0.0",
- "jest-diff": "^29.7.0",
- "jest-get-type": "^29.6.3",
- "pretty-format": "^29.7.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-message-util": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz",
- "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/code-frame": "^7.12.13",
- "@jest/types": "^29.6.3",
- "@types/stack-utils": "^2.0.0",
- "chalk": "^4.0.0",
- "graceful-fs": "^4.2.9",
- "micromatch": "^4.0.4",
- "pretty-format": "^29.7.0",
- "slash": "^3.0.0",
- "stack-utils": "^2.0.3"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-mock": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz",
- "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/types": "^29.6.3",
- "@types/node": "*",
- "jest-util": "^29.7.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-pnp-resolver": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz",
- "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- },
- "peerDependencies": {
- "jest-resolve": "*"
- },
- "peerDependenciesMeta": {
- "jest-resolve": {
- "optional": true
- }
- }
- },
- "node_modules/jest-regex-util": {
- "version": "29.6.3",
- "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz",
- "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-resolve": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz",
- "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "chalk": "^4.0.0",
- "graceful-fs": "^4.2.9",
- "jest-haste-map": "^29.7.0",
- "jest-pnp-resolver": "^1.2.2",
- "jest-util": "^29.7.0",
- "jest-validate": "^29.7.0",
- "resolve": "^1.20.0",
- "resolve.exports": "^2.0.0",
- "slash": "^3.0.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-resolve-dependencies": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz",
- "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "jest-regex-util": "^29.6.3",
- "jest-snapshot": "^29.7.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-runner": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz",
- "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/console": "^29.7.0",
- "@jest/environment": "^29.7.0",
- "@jest/test-result": "^29.7.0",
- "@jest/transform": "^29.7.0",
- "@jest/types": "^29.6.3",
- "@types/node": "*",
- "chalk": "^4.0.0",
- "emittery": "^0.13.1",
- "graceful-fs": "^4.2.9",
- "jest-docblock": "^29.7.0",
- "jest-environment-node": "^29.7.0",
- "jest-haste-map": "^29.7.0",
- "jest-leak-detector": "^29.7.0",
- "jest-message-util": "^29.7.0",
- "jest-resolve": "^29.7.0",
- "jest-runtime": "^29.7.0",
- "jest-util": "^29.7.0",
- "jest-watcher": "^29.7.0",
- "jest-worker": "^29.7.0",
- "p-limit": "^3.1.0",
- "source-map-support": "0.5.13"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-runtime": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz",
- "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/environment": "^29.7.0",
- "@jest/fake-timers": "^29.7.0",
- "@jest/globals": "^29.7.0",
- "@jest/source-map": "^29.6.3",
- "@jest/test-result": "^29.7.0",
- "@jest/transform": "^29.7.0",
- "@jest/types": "^29.6.3",
- "@types/node": "*",
- "chalk": "^4.0.0",
- "cjs-module-lexer": "^1.0.0",
- "collect-v8-coverage": "^1.0.0",
- "glob": "^7.1.3",
- "graceful-fs": "^4.2.9",
- "jest-haste-map": "^29.7.0",
- "jest-message-util": "^29.7.0",
- "jest-mock": "^29.7.0",
- "jest-regex-util": "^29.6.3",
- "jest-resolve": "^29.7.0",
- "jest-snapshot": "^29.7.0",
- "jest-util": "^29.7.0",
- "slash": "^3.0.0",
- "strip-bom": "^4.0.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-snapshot": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz",
- "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/core": "^7.11.6",
- "@babel/generator": "^7.7.2",
- "@babel/plugin-syntax-jsx": "^7.7.2",
- "@babel/plugin-syntax-typescript": "^7.7.2",
- "@babel/types": "^7.3.3",
- "@jest/expect-utils": "^29.7.0",
- "@jest/transform": "^29.7.0",
- "@jest/types": "^29.6.3",
- "babel-preset-current-node-syntax": "^1.0.0",
- "chalk": "^4.0.0",
- "expect": "^29.7.0",
- "graceful-fs": "^4.2.9",
- "jest-diff": "^29.7.0",
- "jest-get-type": "^29.6.3",
- "jest-matcher-utils": "^29.7.0",
- "jest-message-util": "^29.7.0",
- "jest-util": "^29.7.0",
- "natural-compare": "^1.4.0",
- "pretty-format": "^29.7.0",
- "semver": "^7.5.3"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-snapshot/node_modules/semver": {
- "version": "7.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
- "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/jest-util": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz",
- "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/types": "^29.6.3",
- "@types/node": "*",
- "chalk": "^4.0.0",
- "ci-info": "^3.2.0",
- "graceful-fs": "^4.2.9",
- "picomatch": "^2.2.3"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-validate": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz",
- "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/types": "^29.6.3",
- "camelcase": "^6.2.0",
- "chalk": "^4.0.0",
- "jest-get-type": "^29.6.3",
- "leven": "^3.1.0",
- "pretty-format": "^29.7.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-validate/node_modules/camelcase": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
- "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/jest-watcher": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz",
- "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/test-result": "^29.7.0",
- "@jest/types": "^29.6.3",
- "@types/node": "*",
- "ansi-escapes": "^4.2.1",
- "chalk": "^4.0.0",
- "emittery": "^0.13.1",
- "jest-util": "^29.7.0",
- "string-length": "^4.0.1"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-worker": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz",
- "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/node": "*",
- "jest-util": "^29.7.0",
- "merge-stream": "^2.0.0",
- "supports-color": "^8.0.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/jest-worker/node_modules/supports-color": {
- "version": "8.1.1",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
- "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/supports-color?sponsor=1"
- }
- },
- "node_modules/js-tokens": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/js-yaml": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "argparse": "^2.0.1"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
- }
- },
- "node_modules/jsesc": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
- "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
- "dev": true,
- "license": "MIT",
- "bin": {
- "jsesc": "bin/jsesc"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/json-buffer": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
- "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/json-parse-even-better-errors": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
- "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/json-schema-traverse": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
- "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/json-stable-stringify-without-jsonify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
- "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/json5": {
- "version": "2.2.3",
- "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
- "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
- "dev": true,
- "license": "MIT",
- "bin": {
- "json5": "lib/cli.js"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/keyv": {
- "version": "4.5.4",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
- "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "json-buffer": "3.0.1"
- }
- },
- "node_modules/kleur": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
- "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/leven": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
- "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/levn": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
- "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "prelude-ls": "^1.2.1",
- "type-check": "~0.4.0"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/lines-and-columns": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
- "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/locate-path": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
- "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-locate": "^5.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/lodash.merge": {
- "version": "4.6.2",
- "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
- "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "yallist": "^3.0.2"
- }
- },
- "node_modules/make-dir": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz",
- "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "semver": "^7.5.3"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/make-dir/node_modules/semver": {
- "version": "7.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
- "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/makeerror": {
- "version": "1.0.12",
- "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz",
- "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "tmpl": "1.0.5"
- }
- },
- "node_modules/merge-stream": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
- "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/micromatch": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
- "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "braces": "^3.0.3",
- "picomatch": "^2.3.1"
- },
- "engines": {
- "node": ">=8.6"
- }
- },
- "node_modules/mimic-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/natural-compare": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
- "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/node-int64": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",
- "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/node-releases": {
- "version": "2.0.19",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",
- "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/normalize-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/npm-run-path": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
- "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "path-key": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "wrappy": "1"
- }
- },
- "node_modules/onetime": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
- "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "mimic-fn": "^2.1.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/optionator": {
- "version": "0.9.4",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
- "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "deep-is": "^0.1.3",
- "fast-levenshtein": "^2.0.6",
- "levn": "^0.4.1",
- "prelude-ls": "^1.2.1",
- "type-check": "^0.4.0",
- "word-wrap": "^1.2.5"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/p-limit": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
- "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "yocto-queue": "^0.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/p-locate": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
- "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-limit": "^3.0.2"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/p-try": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
- "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/parent-module": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
- "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "callsites": "^3.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/parse-json": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
- "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/code-frame": "^7.0.0",
- "error-ex": "^1.3.1",
- "json-parse-even-better-errors": "^2.3.0",
- "lines-and-columns": "^1.1.6"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/path-exists": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
- "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/path-key": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
- "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/path-parse": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
- "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/picocolors": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
- "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
- "node_modules/pirates": {
- "version": "4.0.7",
- "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz",
- "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/pkg-dir": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
- "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "find-up": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/pkg-dir/node_modules/find-up": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "locate-path": "^5.0.0",
- "path-exists": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/pkg-dir/node_modules/locate-path": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-locate": "^4.1.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/pkg-dir/node_modules/p-limit": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
- "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-try": "^2.0.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/pkg-dir/node_modules/p-locate": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "p-limit": "^2.2.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/prelude-ls": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
- "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/prettier": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz",
- "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
- "dev": true,
- "license": "MIT",
- "bin": {
- "prettier": "bin/prettier.cjs"
- },
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/prettier/prettier?sponsor=1"
- }
- },
- "node_modules/pretty-format": {
- "version": "29.7.0",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz",
- "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/schemas": "^29.6.3",
- "ansi-styles": "^5.0.0",
- "react-is": "^18.0.0"
- },
- "engines": {
- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
- }
- },
- "node_modules/pretty-format/node_modules/ansi-styles": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
- "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/prompts": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz",
- "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "kleur": "^3.0.3",
- "sisteransi": "^1.0.5"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/punycode": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
- "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/pure-rand": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz",
- "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==",
- "dev": true,
- "funding": [
- {
- "type": "individual",
- "url": "https://github.com/sponsors/dubzzz"
- },
- {
- "type": "opencollective",
- "url": "https://opencollective.com/fast-check"
- }
- ],
- "license": "MIT"
- },
- "node_modules/queue-microtask": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
- "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
- "node_modules/react-is": {
- "version": "18.3.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
- "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/require-directory": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/resolve": {
- "version": "1.22.10",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
- "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "is-core-module": "^2.16.0",
- "path-parse": "^1.0.7",
- "supports-preserve-symlinks-flag": "^1.0.0"
- },
- "bin": {
- "resolve": "bin/resolve"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/resolve-cwd": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
- "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "resolve-from": "^5.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/resolve-cwd/node_modules/resolve-from": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
- "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/resolve-from": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
- "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/resolve.exports": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz",
- "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/reusify": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
- "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "iojs": ">=1.0.0",
- "node": ">=0.10.0"
- }
- },
- "node_modules/rimraf": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
- "deprecated": "Rimraf versions prior to v4 are no longer supported",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "glob": "^7.1.3"
- },
- "bin": {
- "rimraf": "bin.js"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/run-parallel": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
- "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "queue-microtask": "^1.2.2"
- }
- },
- "node_modules/semver": {
- "version": "6.3.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
- "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/shebang-command": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
- "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "shebang-regex": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/shebang-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
- "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/signal-exit": {
- "version": "3.0.7",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
- "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/sisteransi": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
- "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/slash": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true,
- "license": "BSD-3-Clause",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/source-map-support": {
- "version": "0.5.13",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
- "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "buffer-from": "^1.0.0",
- "source-map": "^0.6.0"
- }
- },
- "node_modules/sprintf-js": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
- "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
- "dev": true,
- "license": "BSD-3-Clause"
- },
- "node_modules/stack-utils": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
- "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "escape-string-regexp": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/stack-utils/node_modules/escape-string-regexp": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
- "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/string-length": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz",
- "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "char-regex": "^1.0.2",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-bom": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
- "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-final-newline": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
- "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/strip-json-comments": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
- "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/supports-preserve-symlinks-flag": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
- "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/test-exclude": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
- "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "@istanbuljs/schema": "^0.1.2",
- "glob": "^7.1.4",
- "minimatch": "^3.0.4"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/text-table": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
- "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/tmpl": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz",
- "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==",
- "dev": true,
- "license": "BSD-3-Clause"
- },
- "node_modules/to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "is-number": "^7.0.0"
- },
- "engines": {
- "node": ">=8.0"
- }
- },
- "node_modules/type-check": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
- "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "prelude-ls": "^1.2.1"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/type-detect": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
- "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/type-fest": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
- "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
- "dev": true,
- "license": "(MIT OR CC0-1.0)",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/undici-types": {
- "version": "7.10.0",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz",
- "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/update-browserslist-db": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
- "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==",
- "dev": true,
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/browserslist"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/browserslist"
- },
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "escalade": "^3.2.0",
- "picocolors": "^1.1.1"
- },
- "bin": {
- "update-browserslist-db": "cli.js"
- },
- "peerDependencies": {
- "browserslist": ">= 4.21.0"
- }
- },
- "node_modules/uri-js": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
- "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "punycode": "^2.1.0"
- }
- },
- "node_modules/v8-to-istanbul": {
- "version": "9.3.0",
- "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz",
- "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "@jridgewell/trace-mapping": "^0.3.12",
- "@types/istanbul-lib-coverage": "^2.0.1",
- "convert-source-map": "^2.0.0"
- },
- "engines": {
- "node": ">=10.12.0"
- }
- },
- "node_modules/walker": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz",
- "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "makeerror": "1.0.12"
- }
- },
- "node_modules/which": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "node-which": "bin/node-which"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/word-wrap": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
- "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/wrap-ansi": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
- }
- },
- "node_modules/wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/write-file-atomic": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz",
- "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "imurmurhash": "^0.1.4",
- "signal-exit": "^3.0.7"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/y18n": {
- "version": "5.0.8",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
- "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
- "dev": true,
- "license": "ISC",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/yargs": {
- "version": "17.7.2",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
- "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "cliui": "^8.0.1",
- "escalade": "^3.1.1",
- "get-caller-file": "^2.0.5",
- "require-directory": "^2.1.1",
- "string-width": "^4.2.3",
- "y18n": "^5.0.5",
- "yargs-parser": "^21.1.1"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/yargs-parser": {
- "version": "21.1.1",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
- "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
- "dev": true,
- "license": "ISC",
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/yocto-queue": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
- "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- }
- }
-}
diff --git a/validation-test/package.json b/validation-test/package.json
deleted file mode 100644
index 75b8e01d13..0000000000
--- a/validation-test/package.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "name": "validation-test",
- "version": "1.0.0",
- "description": "Simple validation library with comprehensive TDD tests",
- "main": "src/index.js",
- "scripts": {
- "test": "jest --coverage",
- "test:watch": "jest --watch",
- "test:unit": "jest tests/unit",
- "test:integration": "jest tests/integration",
- "test:e2e": "jest tests/e2e",
- "coverage": "jest --coverage --coverageReporters=html",
- "lint": "eslint src tests",
- "format": "prettier --write \"src/**/*.js\" \"tests/**/*.js\""
- },
- "keywords": ["validation", "testing", "tdd"],
- "author": "",
- "license": "MIT",
- "devDependencies": {
- "jest": "^29.7.0",
- "@types/jest": "^29.5.12",
- "eslint": "^8.57.0",
- "prettier": "^3.2.5"
- },
- "jest": {
- "testEnvironment": "node",
- "collectCoverageFrom": [
- "src/**/*.js",
- "!src/**/*.test.js"
- ],
- "coverageThreshold": {
- "global": {
- "branches": 90,
- "functions": 90,
- "lines": 90,
- "statements": 90
- }
- },
- "coverageDirectory": "coverage",
- "testMatch": [
- "**/tests/**/*.test.js"
- ]
- }
-}
\ No newline at end of file
diff --git a/validation-test/src/formValidator.js b/validation-test/src/formValidator.js
deleted file mode 100644
index 3df83a82c5..0000000000
--- a/validation-test/src/formValidator.js
+++ /dev/null
@@ -1,209 +0,0 @@
-// Form Validator class for complex form validation
-const Validator = require('./validator');
-
-class FormValidator {
- constructor() {
- this.validator = new Validator();
- this.debounceTimer = null;
- this.debounceDelay = 0;
- this._validateFieldSpy = null;
- }
-
- validate(formData, rules) {
- const result = {
- isValid: true,
- fields: {},
- errors: []
- };
-
- // Check for credit card in form data
- if (formData.cardNumber) {
- const cardValidation = this.validator.validateCreditCard(formData.cardNumber);
- if (cardValidation.cardType) {
- result.cardType = cardValidation.cardType;
- }
- }
-
- for (const field in rules) {
- const fieldRules = rules[field];
- const fieldValue = formData[field];
-
- // Handle nested objects (like billingAddress)
- if (typeof fieldRules === 'object' && !fieldRules.type && !fieldRules.required) {
- result.fields[field] = {};
- for (const nestedField in fieldRules) {
- const nestedValue = fieldValue ? fieldValue[nestedField] : undefined;
- const nestedResult = this.validateField(nestedField, nestedValue, fieldRules[nestedField]);
- result.fields[field][nestedField] = nestedResult;
-
- if (!nestedResult.isValid) {
- result.isValid = false;
- if (nestedField === 'street' && !nestedValue) {
- nestedResult.errors = ['Street is required'];
- } else if (nestedField === 'zipCode' && nestedValue && !/^\d{5}(-\d{4})?$/.test(nestedValue)) {
- nestedResult.errors = ['Invalid zip code format'];
- }
- }
- }
- continue;
- }
-
- const fieldResult = this.validateField(field, fieldValue, fieldRules);
- result.fields[field] = fieldResult;
-
- if (!fieldResult.isValid) {
- result.isValid = false;
- result.errors.push(...fieldResult.errors);
- }
- }
-
- // Check for special validations
- if (rules.confirmPassword && formData.password !== formData.confirmPassword) {
- result.isValid = false;
- result.fields.confirmPassword = {
- isValid: false,
- errors: ['Passwords do not match']
- };
- }
-
- if (rules.age && formData.age < 18) {
- result.isValid = false;
- result.fields.age = {
- isValid: false,
- errors: ['Must be at least 18']
- };
- }
-
- if (rules.terms && !formData.terms) {
- result.isValid = false;
- result.fields.terms = {
- isValid: false,
- errors: ['You must accept the terms']
- };
- }
-
- if (rules.expiryYear && formData.expiryYear < new Date().getFullYear()) {
- result.isValid = false;
- result.fields.expiryYear = {
- isValid: false,
- errors: ['Card has expired']
- };
- }
-
- return result;
- }
-
- validateField(fieldName, value, rules) {
- // Handle debounce if enabled
- if (this.debounceDelay > 0) {
- if (this.debounceTimer) {
- clearTimeout(this.debounceTimer);
- }
-
- // Store the latest validation request
- this._lastValidation = { fieldName, value, rules };
-
- // Don't perform validation immediately
- this.debounceTimer = setTimeout(() => {
- // Call the spy if it exists (for testing)
- if (this._validateFieldSpy) {
- this._validateFieldSpy(fieldName, value, rules);
- }
- this._performValidation(fieldName, value, rules);
- }, this.debounceDelay);
-
- // Return placeholder result
- return { isValid: true, errors: [] };
- }
-
- return this._performValidation(fieldName, value, rules);
- }
-
- _performValidation(fieldName, value, rules) {
- const errors = [];
- let isValid = true;
-
- // Handle conditional rules
- if (typeof rules === 'function') {
- return { isValid: true, errors: [] };
- }
-
- if (typeof rules === 'object') {
- // Check required
- if (rules.required) {
- const isRequired = typeof rules.required === 'function' ?
- rules.required({ [fieldName]: value }) : rules.required;
-
- if (isRequired && (!value || value === '')) {
- errors.push(`${this.formatFieldName(fieldName)} is required`);
- isValid = false;
- }
- }
-
- // Check type
- if (value && rules.type) {
- switch (rules.type) {
- case 'email':
- const emailResult = this.validator.validateEmail(value);
- if (!emailResult.isValid) {
- errors.push('Invalid email format');
- isValid = false;
- }
- break;
- case 'creditCard':
- const cardResult = this.validator.validateCreditCard(value);
- if (!cardResult.isValid) {
- errors.push('Invalid credit card number');
- isValid = false;
- }
- break;
- case 'number':
- if (isNaN(value)) {
- errors.push('Must be a number');
- isValid = false;
- }
- break;
- }
- }
-
- // Check min/max
- if (rules.min !== undefined && value < rules.min) {
- errors.push(`Must be at least ${rules.min}`);
- isValid = false;
- }
-
- if (rules.max !== undefined && value > rules.max) {
- errors.push(`Must be at most ${rules.max}`);
- isValid = false;
- }
-
- // Check pattern
- if (rules.pattern && !rules.pattern.test(value)) {
- errors.push(`Invalid ${fieldName} format`);
- isValid = false;
- }
-
- // Check minLength
- if (rules.minLength && (!value || value.length < rules.minLength)) {
- errors.push(`${this.formatFieldName(fieldName)} must be at least ${rules.minLength} characters`);
- isValid = false;
- }
- }
-
- return { isValid, errors };
- }
-
- formatFieldName(name) {
- // Convert camelCase to Title Case
- return name
- .replace(/([A-Z])/g, ' $1')
- .replace(/^./, str => str.toUpperCase())
- .trim();
- }
-
- enableDebounce(delay) {
- this.debounceDelay = delay;
- }
-}
-
-module.exports = FormValidator;
\ No newline at end of file
diff --git a/validation-test/src/index.js b/validation-test/src/index.js
deleted file mode 100644
index b7a2e73866..0000000000
--- a/validation-test/src/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// Main entry point for validation library
-const Validator = require('./validator');
-const ValidationRules = require('./validationRules');
-const FormValidator = require('./formValidator');
-const ValidationService = require('./validationService');
-
-module.exports = {
- Validator,
- ValidationRules,
- FormValidator,
- ValidationService
-};
\ No newline at end of file
diff --git a/validation-test/src/validationRules.js b/validation-test/src/validationRules.js
deleted file mode 100644
index dfd009d9ee..0000000000
--- a/validation-test/src/validationRules.js
+++ /dev/null
@@ -1,34 +0,0 @@
-// Validation Rules class
-class ValidationRules {
- constructor() {
- this.rules = {
- email: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
- phone: /^[\+]?[(]?[0-9]{1,4}[)]?[-\s\.]?[(]?[0-9]{1,4}[)]?[-\s\.]?[0-9]{1,9}$/,
- url: /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/,
- alphanumeric: /^[a-zA-Z0-9]+$/,
- numeric: /^[0-9]+$/,
- alpha: /^[a-zA-Z]+$/
- };
- }
-
- getRules() {
- return this.rules;
- }
-
- addRule(name, pattern) {
- this.rules[name] = pattern;
- }
-
- removeRule(name) {
- delete this.rules[name];
- }
-
- validate(value, ruleName) {
- if (!this.rules[ruleName]) {
- throw new Error(`Rule ${ruleName} not found`);
- }
- return this.rules[ruleName].test(value);
- }
-}
-
-module.exports = ValidationRules;
\ No newline at end of file
diff --git a/validation-test/src/validationService.js b/validation-test/src/validationService.js
deleted file mode 100644
index 16fc690d27..0000000000
--- a/validation-test/src/validationService.js
+++ /dev/null
@@ -1,290 +0,0 @@
-// Validation Service for E2E workflows
-const Validator = require('./validator');
-const FormValidator = require('./formValidator');
-
-class ValidationService {
- constructor() {
- this.validator = new Validator();
- this.formValidator = new FormValidator();
- }
-
- async validateBasicInfo(info) {
- const emailResult = this.validator.validateEmail(info.email);
- const usernameValid = info.username && info.username.length >= 3;
-
- return {
- isValid: emailResult.isValid && usernameValid
- };
- }
-
- async checkUsernameAvailability(username) {
- // Simulate async check
- return new Promise(resolve => {
- setTimeout(() => {
- resolve(username !== 'taken');
- }, 10);
- });
- }
-
- validatePassword(password) {
- return this.validator.validatePassword(password);
- }
-
- validatePersonalInfo(info) {
- const age = this.calculateAge(info.dateOfBirth);
- return {
- isValid: info.firstName && info.lastName && age >= 18,
- age
- };
- }
-
- calculateAge(dateOfBirth) {
- const today = new Date();
- const birthDate = new Date(dateOfBirth);
- let age = today.getFullYear() - birthDate.getFullYear();
- const monthDiff = today.getMonth() - birthDate.getMonth();
-
- if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
- age--;
- }
-
- return age;
- }
-
- validateContactInfo(info) {
- const phoneResult = this.validator.validatePhone(info.phone);
- const addressValid = info.address &&
- info.address.street &&
- info.address.city &&
- info.address.state &&
- info.address.zipCode &&
- info.address.country;
-
- return {
- isValid: phoneResult.isValid && addressValid
- };
- }
-
- async completeRegistration(userData) {
- const errors = {};
-
- // Validate username
- if (!userData.username || userData.username.length < 3) {
- errors.username = ['Username must be at least 3 characters'];
- }
-
- // Validate email
- const emailResult = this.validator.validateEmail(userData.email);
- if (!emailResult.isValid) {
- errors.email = emailResult.errors;
- }
-
- // Validate password
- const passwordResult = this.validator.validatePassword(userData.password);
- if (!passwordResult.isValid) {
- errors.password = ['Password is too weak'];
- }
-
- // Check password match
- if (userData.password !== userData.confirmPassword) {
- errors.confirmPassword = ['Passwords do not match'];
- }
-
- // Check age
- const age = this.calculateAge(userData.dateOfBirth);
- if (age < 18) {
- errors.age = ['Must be at least 18 years old'];
- }
-
- // Check terms
- if (!userData.termsAccepted) {
- errors.terms = ['You must accept the terms'];
- }
-
- if (Object.keys(errors).length > 0) {
- return {
- success: false,
- errors
- };
- }
-
- return {
- success: true,
- userId: 'user_' + Date.now(),
- validationReport: {
- username: userData.username,
- email: userData.email,
- registeredAt: new Date().toISOString()
- }
- };
- }
-
- validateCreditCard(card) {
- return this.validator.validateCreditCard(card.number);
- }
-
- validateAddress(address) {
- const isValid = address.street &&
- address.city &&
- address.state &&
- address.zipCode &&
- address.country;
-
- return { isValid };
- }
-
- async performFraudCheck(paymentData) {
- // Simulate fraud check
- return new Promise(resolve => {
- setTimeout(() => {
- const riskLevel = paymentData.amount > 5000 ? 'high' : 'low';
- resolve({
- riskLevel,
- approved: riskLevel !== 'high'
- });
- }, 10);
- });
- }
-
- async processPayment(paymentData) {
- if (paymentData.card && paymentData.card.number === '4000000000000002') {
- return {
- success: false,
- status: 'declined',
- reason: 'Card declined by bank'
- };
- }
-
- if (paymentData.amount > 5000) {
- return {
- success: false,
- status: 'declined',
- reason: 'Amount exceeds limit'
- };
- }
-
- return {
- success: true,
- transactionId: 'txn_' + Date.now(),
- status: 'completed'
- };
- }
-
- validateApplicationStep(step, data) {
- const validations = {
- 1: () => data.applicationType && data.purpose,
- 2: () => {
- const hasName = data.firstName && data.lastName;
- const emailValid = this.validator.validateEmail(data.email || '').isValid;
- const phoneValid = this.validator.validatePhone(data.phone || '').isValid;
-
- if (!hasName || !emailValid || !phoneValid) {
- const errors = {};
- if (!data.firstName) errors.firstName = ['First name is required'];
- if (!emailValid) errors.email = ['Invalid email'];
- if (!phoneValid) errors.phone = ['Invalid phone'];
- return { isValid: false, canProceed: false, errors };
- }
- return { isValid: true };
- },
- 3: () => data.employment && data.income > 0,
- 4: () => data.references && data.references.length >= 2,
- 5: () => data.documents && data.consent && data.signature
- };
-
- const validation = validations[step];
- if (!validation) return { isValid: false };
-
- const result = validation();
- if (typeof result === 'object') return result;
-
- return { isValid: result };
- }
-
- async submitApplication(applicationData) {
- // Validate all steps
- for (let i = 1; i <= 5; i++) {
- const stepData = applicationData[`step${i}`];
- const validation = this.validateApplicationStep(i, stepData);
- if (!validation.isValid) {
- return {
- success: false,
- errors: validation.errors || ['Validation failed at step ' + i]
- };
- }
- }
-
- return {
- success: true,
- applicationId: 'app_' + Date.now(),
- status: 'pending_review'
- };
- }
-
- async validateBulkImport(data, options = {}) {
- const results = {
- totalRows: data.length,
- validRows: 0,
- invalidRows: 0,
- errors: [],
- validData: []
- };
-
- for (let i = 0; i < data.length; i++) {
- const row = data[i];
- const rowErrors = [];
-
- if (!row.email || !this.validator.validateEmail(row.email).isValid) {
- rowErrors.push('Invalid email');
- }
-
- if (!row.phone || !this.validator.validatePhone(row.phone).isValid) {
- rowErrors.push('Invalid phone');
- }
-
- if (!row.name) {
- rowErrors.push('Name is required');
- }
-
- if (rowErrors.length > 0) {
- results.invalidRows++;
- results.errors.push({
- row: i + 1,
- errors: rowErrors
- });
- } else {
- results.validRows++;
- results.validData.push(row);
- }
- }
-
- return results;
- }
-
- validateApiRequest(request) {
- const isValid = request.method &&
- request.endpoint &&
- request.headers &&
- request.body;
-
- return {
- isValid,
- sanitized: {
- body: request.body
- }
- };
- }
-
- validateApiResponse(response) {
- const isValid = response.status === 200 &&
- response.data &&
- response.data.id;
-
- return {
- isValid,
- conformsToSchema: true
- };
- }
-}
-
-module.exports = ValidationService;
\ No newline at end of file
diff --git a/validation-test/src/validator.js b/validation-test/src/validator.js
deleted file mode 100644
index 086407c292..0000000000
--- a/validation-test/src/validator.js
+++ /dev/null
@@ -1,330 +0,0 @@
-// Main Validator class
-class Validator {
- constructor() {
- this.customRules = {};
- this.asyncRules = {};
- this.errorMessages = {
- email: 'Invalid email format',
- required: 'This field is required',
- phone: 'Invalid phone number',
- url: 'Invalid URL format',
- password: {
- minLength: 'Password must be at least 8 characters',
- uppercase: 'Password must contain uppercase letters',
- numbers: 'Password must contain numbers',
- special: 'Password must contain special characters'
- }
- };
- this.locale = 'en';
- this.chainedValidations = [];
- }
-
- validateEmail(email) {
- if (email === null || email === undefined) {
- return {
- isValid: false,
- errors: ['Email is required']
- };
- }
-
- const trimmedEmail = email.trim();
- const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
- const isValid = emailRegex.test(trimmedEmail);
-
- return {
- isValid,
- errors: isValid ? [] : [this.errorMessages.email]
- };
- }
-
- validatePhone(phone) {
- if (!phone) {
- return {
- isValid: false,
- errors: ['Phone number is required']
- };
- }
-
- const phoneRegex = /^[\+]?[(]?[0-9]{1,4}[)]?[-\s\.]?[(]?[0-9]{1,4}[)]?[-\s\.]?[0-9]{1,9}$/;
- const isValid = phoneRegex.test(phone);
- const normalized = phone.replace(/\D/g, '');
-
- return {
- isValid,
- errors: isValid ? [] : ['Invalid phone number'],
- normalized
- };
- }
-
- validateUrl(url, options = {}) {
- if (!url) {
- return {
- isValid: false,
- errors: ['URL is required']
- };
- }
-
- try {
- const urlObj = new URL(url);
-
- if (options.protocols) {
- const isValidProtocol = options.protocols.includes(urlObj.protocol.replace(':', ''));
- return {
- isValid: isValidProtocol,
- errors: isValidProtocol ? [] : ['Invalid protocol']
- };
- }
-
- return {
- isValid: true,
- errors: []
- };
- } catch {
- return {
- isValid: false,
- errors: [this.errorMessages.url]
- };
- }
- }
-
- validatePassword(password, rules = {}) {
- const defaultRules = {
- minLength: 8,
- requireUppercase: true,
- requireNumbers: true,
- requireSpecialChars: false
- };
-
- const mergedRules = { ...defaultRules, ...rules };
- const errors = [];
- let strength = 'weak';
-
- if (!password) {
- return {
- isValid: false,
- errors: ['Password is required'],
- strength
- };
- }
-
- if (password.length < mergedRules.minLength) {
- errors.push(`Password must be at least ${mergedRules.minLength} characters`);
- }
-
- if (mergedRules.requireUppercase && !/[A-Z]/.test(password)) {
- errors.push('Password must contain uppercase letters');
- }
-
- if (mergedRules.requireNumbers && !/\d/.test(password)) {
- errors.push('Password must contain numbers');
- }
-
- if (mergedRules.requireSpecialChars && !/[!@#$%^&*(),.?":{}|<>]/.test(password)) {
- errors.push('Password must contain special characters');
- }
-
- // Calculate strength
- let score = 0;
- if (password.length >= 8) score++;
- if (password.length >= 12) score++;
- if (/[a-z]/.test(password)) score++;
- if (/[A-Z]/.test(password)) score++;
- if (/\d/.test(password)) score++;
- if (/[!@#$%^&*(),.?":{}|<>]/.test(password)) score++;
-
- if (score <= 2) strength = 'weak';
- else if (score <= 4) strength = 'medium';
- else strength = 'strong';
-
- return {
- isValid: errors.length === 0,
- errors,
- strength
- };
- }
-
- validateCreditCard(number) {
- if (!number) {
- return {
- isValid: false,
- errors: ['Credit card number is required']
- };
- }
-
- const cleanNumber = number.replace(/\D/g, '');
-
- if (cleanNumber.length < 13 || cleanNumber.length > 19) {
- return {
- isValid: false,
- errors: ['Invalid credit card number length']
- };
- }
-
- // Luhn algorithm
- let sum = 0;
- let isEven = false;
-
- for (let i = cleanNumber.length - 1; i >= 0; i--) {
- let digit = parseInt(cleanNumber[i], 10);
-
- if (isEven) {
- digit *= 2;
- if (digit > 9) {
- digit -= 9;
- }
- }
-
- sum += digit;
- isEven = !isEven;
- }
-
- const checksumValid = sum % 10 === 0;
-
- // Detect card type
- let cardType = 'unknown';
- if (/^4/.test(cleanNumber)) cardType = 'visa';
- else if (/^5[1-5]/.test(cleanNumber)) cardType = 'mastercard';
- else if (/^3[47]/.test(cleanNumber)) cardType = 'amex';
-
- return {
- isValid: checksumValid,
- errors: checksumValid ? [] : ['Invalid credit card number'],
- cardType,
- checksumValid
- };
- }
-
- addCustomRule(field, validator) {
- this.customRules[field] = validator;
- }
-
- addAsyncRule(field, validator) {
- this.asyncRules[field] = validator;
- }
-
- validate(data, rules) {
- const result = {
- isValid: true,
- errors: []
- };
-
- for (const field in rules) {
- if (this.customRules[field]) {
- const isValid = this.customRules[field](data[field], data);
- if (!isValid) {
- result.isValid = false;
- result.errors.push(`${field} validation failed`);
- }
- }
- }
-
- return result;
- }
-
- async validateAsync(data, options = {}) {
- const timeout = options.timeout || 30000;
- const promises = [];
-
- for (const field in this.asyncRules) {
- if (data[field] !== undefined) {
- const promise = Promise.race([
- this.asyncRules[field](data[field], data),
- new Promise((_, reject) =>
- setTimeout(() => reject(new Error('Validation timeout')), timeout)
- )
- ]);
- promises.push(promise);
- }
- }
-
- try {
- const results = await Promise.all(promises);
- return {
- isValid: results.every(r => r === true),
- errors: []
- };
- } catch (error) {
- return {
- isValid: false,
- errors: [error.message]
- };
- }
- }
-
- validateBatch(data, rules) {
- const result = {
- isValid: true,
- fields: {},
- errors: []
- };
-
- for (const field in rules) {
- let fieldResult;
-
- switch (rules[field]) {
- case 'email':
- fieldResult = this.validateEmail(data[field]);
- break;
- case 'phone':
- fieldResult = this.validatePhone(data[field]);
- break;
- case 'url':
- fieldResult = this.validateUrl(data[field]);
- break;
- case 'password':
- fieldResult = this.validatePassword(data[field]);
- break;
- default:
- fieldResult = { isValid: true, errors: [] };
- }
-
- result.fields[field] = fieldResult;
-
- if (!fieldResult.isValid) {
- result.isValid = false;
- result.errors.push(...fieldResult.errors);
- }
- }
-
- return result;
- }
-
- chain() {
- this.chainedValidations = [];
- const chainableValidator = {
- validateEmail: (email) => {
- this.chainedValidations.push(this.validateEmail(email));
- return chainableValidator;
- },
- validatePhone: (phone) => {
- this.chainedValidations.push(this.validatePhone(phone));
- return chainableValidator;
- },
- validateUrl: (url) => {
- this.chainedValidations.push(this.validateUrl(url));
- return chainableValidator;
- },
- execute: () => {
- const isValid = this.chainedValidations.every(v => v.isValid);
- return {
- isValid,
- validations: this.chainedValidations
- };
- }
- };
- return chainableValidator;
- }
-
- setErrorMessages(messages) {
- this.errorMessages = { ...this.errorMessages, ...messages };
- }
-
- setLocale(locale) {
- this.locale = locale;
- if (locale === 'es') {
- this.errorMessages.email = 'Formato de correo electrónico inválido';
- }
- }
-}
-
-module.exports = Validator;
\ No newline at end of file
diff --git a/validation-test/tests/e2e/validation.e2e.test.js b/validation-test/tests/e2e/validation.e2e.test.js
deleted file mode 100644
index 0a27bb7d13..0000000000
--- a/validation-test/tests/e2e/validation.e2e.test.js
+++ /dev/null
@@ -1,334 +0,0 @@
-// End-to-end tests for complete validation workflows
-const ValidationService = require('../../src/validationService');
-const testData = require('../fixtures/testData');
-
-describe('E2E Validation Workflows', () => {
- let validationService;
-
- beforeEach(() => {
- validationService = new ValidationService();
- });
-
- describe('Complete User Registration Flow', () => {
- test('should handle full registration workflow', async () => {
- const userData = {
- username: 'newuser2024',
- email: '[email protected]',
- password: 'SecureP@ss2024!',
- confirmPassword: 'SecureP@ss2024!',
- firstName: 'John',
- lastName: 'Doe',
- dateOfBirth: '1990-01-01',
- phone: '+1 555-123-4567',
- address: {
- street: '123 Main Street',
- city: 'New York',
- state: 'NY',
- zipCode: '10001',
- country: 'USA'
- },
- preferences: {
- newsletter: true,
- notifications: 'email',
- language: 'en'
- },
- termsAccepted: true,
- privacyAccepted: true
- };
-
- // Step 1: Validate basic info
- const basicValidation = await validationService.validateBasicInfo({
- username: userData.username,
- email: userData.email
- });
- expect(basicValidation.isValid).toBe(true);
-
- // Step 2: Check username availability (async)
- const usernameAvailable = await validationService.checkUsernameAvailability(userData.username);
- expect(usernameAvailable).toBe(true);
-
- // Step 3: Validate password strength
- const passwordValidation = validationService.validatePassword(userData.password);
- expect(passwordValidation.strength).toBe('strong');
-
- // Step 4: Validate personal information
- const personalValidation = validationService.validatePersonalInfo({
- firstName: userData.firstName,
- lastName: userData.lastName,
- dateOfBirth: userData.dateOfBirth
- });
- expect(personalValidation.isValid).toBe(true);
- expect(personalValidation.age).toBeGreaterThanOrEqual(18);
-
- // Step 5: Validate contact information
- const contactValidation = validationService.validateContactInfo({
- phone: userData.phone,
- address: userData.address
- });
- expect(contactValidation.isValid).toBe(true);
-
- // Step 6: Complete registration
- const registrationResult = await validationService.completeRegistration(userData);
- expect(registrationResult.success).toBe(true);
- expect(registrationResult.userId).toBeDefined();
- expect(registrationResult.validationReport).toBeDefined();
- });
-
- test('should handle validation failures gracefully', async () => {
- const invalidUserData = {
- username: 'ab', // Too short
- email: 'invalid-email',
- password: 'weak',
- confirmPassword: 'different',
- firstName: '',
- lastName: '',
- dateOfBirth: '2010-01-01', // Too young
- phone: '123',
- address: {
- street: '',
- city: '',
- state: '',
- zipCode: 'invalid',
- country: ''
- },
- termsAccepted: false
- };
-
- const registrationResult = await validationService.completeRegistration(invalidUserData);
-
- expect(registrationResult.success).toBe(false);
- expect(registrationResult.errors).toBeDefined();
- expect(registrationResult.errors.username).toContain('Username must be at least 3 characters');
- expect(registrationResult.errors.email).toContain('Invalid email format');
- expect(registrationResult.errors.password).toContain('Password is too weak');
- expect(registrationResult.errors.confirmPassword).toContain('Passwords do not match');
- expect(registrationResult.errors.age).toContain('Must be at least 18 years old');
- expect(registrationResult.errors.terms).toContain('You must accept the terms');
- });
- });
-
- describe('Complete Payment Processing Flow', () => {
- test('should validate and process payment', async () => {
- const paymentData = {
- amount: 99.99,
- currency: 'USD',
- card: {
- number: '4111111111111111',
- holder: 'John Doe',
- expiryMonth: 12,
- expiryYear: 2025,
- cvv: '123'
- },
- billing: {
- street: '123 Main St',
- city: 'New York',
- state: 'NY',
- zipCode: '10001',
- country: 'USA'
- },
- email: '[email protected]',
- phone: '+1 555-123-4567'
- };
-
- // Step 1: Validate card details
- const cardValidation = validationService.validateCreditCard(paymentData.card);
- expect(cardValidation.isValid).toBe(true);
- expect(cardValidation.cardType).toBe('visa');
-
- // Step 2: Validate billing address
- const billingValidation = validationService.validateAddress(paymentData.billing);
- expect(billingValidation.isValid).toBe(true);
-
- // Step 3: Fraud check (async)
- const fraudCheck = await validationService.performFraudCheck(paymentData);
- expect(fraudCheck.riskLevel).toBe('low');
- expect(fraudCheck.approved).toBe(true);
-
- // Step 4: Process payment
- const paymentResult = await validationService.processPayment(paymentData);
- expect(paymentResult.success).toBe(true);
- expect(paymentResult.transactionId).toBeDefined();
- expect(paymentResult.status).toBe('completed');
- });
-
- test('should handle declined payments', async () => {
- const declinedPayment = {
- amount: 10000, // High amount triggers decline
- card: {
- number: '4000000000000002', // Test card that declines
- holder: 'John Doe',
- expiryMonth: 12,
- expiryYear: 2025,
- cvv: '123'
- }
- };
-
- const paymentResult = await validationService.processPayment(declinedPayment);
- expect(paymentResult.success).toBe(false);
- expect(paymentResult.status).toBe('declined');
- expect(paymentResult.reason).toBeDefined();
- });
- });
-
- describe('Multi-step Form Validation', () => {
- test('should validate multi-step application form', async () => {
- const applicationSteps = {
- step1: {
- applicationType: 'individual',
- purpose: 'personal'
- },
- step2: {
- firstName: 'Jane',
- lastName: 'Smith',
- email: '[email protected]',
- phone: '+1 555-987-6543'
- },
- step3: {
- employment: 'employed',
- employer: 'Tech Corp',
- income: 75000,
- yearsEmployed: 3
- },
- step4: {
- references: [
- { name: 'John Ref', phone: '555-111-2222', relationship: 'colleague' },
- { name: 'Mary Ref', phone: '555-333-4444', relationship: 'manager' }
- ]
- },
- step5: {
- documents: {
- id: 'uploaded',
- proof_of_income: 'uploaded',
- references: 'uploaded'
- },
- consent: true,
- signature: 'Jane Smith'
- }
- };
-
- // Validate each step
- const step1Result = validationService.validateApplicationStep(1, applicationSteps.step1);
- expect(step1Result.isValid).toBe(true);
-
- const step2Result = validationService.validateApplicationStep(2, applicationSteps.step2);
- expect(step2Result.isValid).toBe(true);
-
- const step3Result = validationService.validateApplicationStep(3, applicationSteps.step3);
- expect(step3Result.isValid).toBe(true);
-
- const step4Result = validationService.validateApplicationStep(4, applicationSteps.step4);
- expect(step4Result.isValid).toBe(true);
-
- const step5Result = validationService.validateApplicationStep(5, applicationSteps.step5);
- expect(step5Result.isValid).toBe(true);
-
- // Submit complete application
- const submissionResult = await validationService.submitApplication(applicationSteps);
- expect(submissionResult.success).toBe(true);
- expect(submissionResult.applicationId).toBeDefined();
- expect(submissionResult.status).toBe('pending_review');
- });
-
- test('should prevent progression with invalid steps', () => {
- const invalidStep2 = {
- firstName: '', // Required field missing
- lastName: 'Smith',
- email: 'invalid-email',
- phone: '123'
- };
-
- const result = validationService.validateApplicationStep(2, invalidStep2);
- expect(result.isValid).toBe(false);
- expect(result.canProceed).toBe(false);
- expect(result.errors).toHaveProperty('firstName');
- expect(result.errors).toHaveProperty('email');
- expect(result.errors).toHaveProperty('phone');
- });
- });
-
- describe('Bulk Data Validation', () => {
- test('should validate CSV import data', async () => {
- const csvData = [
- { email: '[email protected]', phone: '555-111-1111', name: 'User One' },
- { email: '[email protected]', phone: '555-222-2222', name: 'User Two' },
- { email: 'invalid-email', phone: '123', name: '' }, // Invalid row
- { email: '[email protected]', phone: '555-444-4444', name: 'User Four' },
- { email: '', phone: '555-555-5555', name: 'User Five' } // Missing email
- ];
-
- const validationResult = await validationService.validateBulkImport(csvData);
-
- expect(validationResult.totalRows).toBe(5);
- expect(validationResult.validRows).toBe(3);
- expect(validationResult.invalidRows).toBe(2);
- expect(validationResult.errors).toHaveLength(2);
- expect(validationResult.errors[0].row).toBe(3);
- expect(validationResult.errors[1].row).toBe(5);
- expect(validationResult.validData).toHaveLength(3);
- });
-
- test('should handle large dataset validation efficiently', async () => {
- // Generate large dataset
- const largeDataset = Array.from({ length: 1000 }, (_, i) => ({
- id: i + 1,
- email: `user${i}@example.com`,
- phone: `555-${String(i).padStart(3, '0')}-${String(i % 10000).padStart(4, '0')}`,
- name: `User ${i}`
- }));
-
- const startTime = Date.now();
- const result = await validationService.validateBulkImport(largeDataset, {
- batchSize: 100,
- parallel: true
- });
- const endTime = Date.now();
-
- expect(result.validRows).toBe(1000);
- expect(endTime - startTime).toBeLessThan(5000); // Should complete within 5 seconds
- });
- });
-
- describe('API Integration Validation', () => {
- test('should validate API request payload', () => {
- const apiRequest = {
- method: 'POST',
- endpoint: '/api/users',
- headers: {
- 'Content-Type': 'application/json',
- 'Authorization': 'Bearer token123'
- },
- body: {
- username: 'apiuser',
- email: '[email protected]',
- role: 'user',
- permissions: ['read', 'write']
- }
- };
-
- const validation = validationService.validateApiRequest(apiRequest);
- expect(validation.isValid).toBe(true);
- expect(validation.sanitized).toBeDefined();
- expect(validation.sanitized.body.email).toBe('[email protected]');
- });
-
- test('should validate API response format', () => {
- const apiResponse = {
- status: 200,
- data: {
- id: 123,
- username: 'apiuser',
- email: '[email protected]',
- createdAt: '2024-01-01T00:00:00Z'
- },
- meta: {
- version: '1.0',
- timestamp: Date.now()
- }
- };
-
- const validation = validationService.validateApiResponse(apiResponse);
- expect(validation.isValid).toBe(true);
- expect(validation.conformsToSchema).toBe(true);
- });
- });
-});
\ No newline at end of file
diff --git a/validation-test/tests/fixtures/testData.js b/validation-test/tests/fixtures/testData.js
deleted file mode 100644
index 05cfe8ce25..0000000000
--- a/validation-test/tests/fixtures/testData.js
+++ /dev/null
@@ -1,68 +0,0 @@
-// Test fixtures - no hardcoded values in tests
-module.exports = {
- validEmails: [
- ],
- invalidEmails: [
- 'notanemail',
- '@example.com',
- 'user@',
- 'user@domain',
- ],
- validPhones: [
- '+1234567890',
- '+44 20 7123 1234',
- '(555) 123-4567',
- '555-123-4567',
- '5551234567'
- ],
- invalidPhones: [
- '123',
- 'phone',
- '123-456',
- '+1 234 567 890 123 456'
- ],
- validUrls: [
- 'https://example.com',
- 'http://subdomain.example.org',
- 'https://example.com/path/to/page',
- 'https://example.com:8080',
- 'ftp://files.example.com'
- ],
- invalidUrls: [
- 'not a url',
- 'htp://example.com',
- '//example.com',
- 'example.com',
- 'https://'
- ],
- validPasswords: {
- strong: 'MyP@ssw0rd123!',
- medium: 'Password123',
- withSpecialChars: 'Test@2024#Secure'
- },
- invalidPasswords: {
- tooShort: '123',
- noUppercase: 'password123',
- noNumbers: 'Password',
- noSpecialChars: 'Password123'
- },
- creditCards: {
- valid: {
- visa: '4111111111111111',
- mastercard: '5500000000000004',
- amex: '340000000000009'
- },
- invalid: {
- short: '411111111111',
- letters: '4111abcd11111111',
- wrongChecksum: '4111111111111112'
- }
- }
-};
\ No newline at end of file
diff --git a/validation-test/tests/helpers/testHelpers.js b/validation-test/tests/helpers/testHelpers.js
deleted file mode 100644
index e4cc881232..0000000000
--- a/validation-test/tests/helpers/testHelpers.js
+++ /dev/null
@@ -1,51 +0,0 @@
-// Test helper utilities
-class TestHelpers {
- static createMockValidator(options = {}) {
- return {
- validate: jest.fn().mockReturnValue(options.isValid || false),
- errors: options.errors || [],
- rules: options.rules || {}
- };
- }
-
- static createValidationContext(data, rules) {
- return {
- data,
- rules,
- errors: [],
- warnings: []
- };
- }
-
- static generateTestCases(validData, invalidData, testName) {
- const cases = [];
-
- validData.forEach((data, index) => {
- cases.push({
- name: `${testName} - valid case ${index + 1}`,
- input: data,
- expected: true
- });
- });
-
- invalidData.forEach((data, index) => {
- cases.push({
- name: `${testName} - invalid case ${index + 1}`,
- input: data,
- expected: false
- });
- });
-
- return cases;
- }
-
- static mockAsyncValidator(delay = 100, result = true) {
- return jest.fn().mockImplementation(() =>
- new Promise(resolve =>
- setTimeout(() => resolve(result), delay)
- )
- );
- }
-}
-
-module.exports = TestHelpers;
\ No newline at end of file
diff --git a/validation-test/tests/integration/formValidation.test.js b/validation-test/tests/integration/formValidation.test.js
deleted file mode 100644
index 957deb0dbf..0000000000
--- a/validation-test/tests/integration/formValidation.test.js
+++ /dev/null
@@ -1,278 +0,0 @@
-// Integration tests for form validation scenarios
-const Validator = require('../../src/validator');
-const FormValidator = require('../../src/formValidator');
-const testData = require('../fixtures/testData');
-
-describe('Form Validation Integration', () => {
- let formValidator;
-
- beforeEach(() => {
- formValidator = new FormValidator();
- });
-
- describe('User Registration Form', () => {
- const registrationRules = {
- username: { required: true, minLength: 3, maxLength: 20 },
- email: { required: true, type: 'email' },
- password: { required: true, type: 'password', strength: 'medium' },
- confirmPassword: { required: true, matches: 'password' },
- age: { required: true, type: 'number', min: 18 },
- terms: { required: true, type: 'boolean', value: true }
- };
-
- test('should validate complete registration form', () => {
- const formData = {
- username: 'testuser123',
- email: '[email protected]',
- password: 'Password123!',
- confirmPassword: 'Password123!',
- age: 25,
- terms: true
- };
-
- const result = formValidator.validate(formData, registrationRules);
-
- expect(result.isValid).toBe(true);
- expect(result.errors).toHaveLength(0);
- });
-
- test('should detect password mismatch', () => {
- const formData = {
- username: 'testuser123',
- email: '[email protected]',
- password: 'Password123!',
- confirmPassword: 'DifferentPassword123!',
- age: 25,
- terms: true
- };
-
- const result = formValidator.validate(formData, registrationRules);
-
- expect(result.isValid).toBe(false);
- expect(result.fields.confirmPassword.errors).toContain('Passwords do not match');
- });
-
- test('should enforce age restrictions', () => {
- const formData = {
- username: 'younguser',
- email: '[email protected]',
- password: 'Password123!',
- confirmPassword: 'Password123!',
- age: 16,
- terms: true
- };
-
- const result = formValidator.validate(formData, registrationRules);
-
- expect(result.isValid).toBe(false);
- expect(result.fields.age.errors).toContain('Must be at least 18');
- });
-
- test('should require terms acceptance', () => {
- const formData = {
- username: 'testuser123',
- email: '[email protected]',
- password: 'Password123!',
- confirmPassword: 'Password123!',
- age: 25,
- terms: false
- };
-
- const result = formValidator.validate(formData, registrationRules);
-
- expect(result.isValid).toBe(false);
- expect(result.fields.terms.errors).toContain('You must accept the terms');
- });
- });
-
- describe('Payment Form', () => {
- const paymentRules = {
- cardNumber: { required: true, type: 'creditCard' },
- cardHolder: { required: true, minLength: 2 },
- expiryMonth: { required: true, type: 'number', min: 1, max: 12 },
- expiryYear: { required: true, type: 'number', min: new Date().getFullYear() },
- cvv: { required: true, pattern: /^\d{3,4}$/ },
- billingAddress: {
- street: { required: true },
- city: { required: true },
- zipCode: { required: true, pattern: /^\d{5}(-\d{4})?$/ },
- country: { required: true }
- }
- };
-
- test('should validate complete payment form', () => {
- const formData = {
- cardNumber: '4111111111111111',
- cardHolder: 'John Doe',
- expiryMonth: 12,
- expiryYear: 2025,
- cvv: '123',
- billingAddress: {
- street: '123 Main St',
- city: 'New York',
- zipCode: '10001',
- country: 'USA'
- }
- };
-
- const result = formValidator.validate(formData, paymentRules);
-
- expect(result.isValid).toBe(true);
- expect(result.cardType).toBe('visa');
- });
-
- test('should reject expired cards', () => {
- const formData = {
- cardNumber: '4111111111111111',
- cardHolder: 'John Doe',
- expiryMonth: 12,
- expiryYear: 2020,
- cvv: '123',
- billingAddress: {
- street: '123 Main St',
- city: 'New York',
- zipCode: '10001',
- country: 'USA'
- }
- };
-
- const result = formValidator.validate(formData, paymentRules);
-
- expect(result.isValid).toBe(false);
- expect(result.fields.expiryYear.errors).toContain('Card has expired');
- });
-
- test('should validate nested billing address', () => {
- const formData = {
- cardNumber: '4111111111111111',
- cardHolder: 'John Doe',
- expiryMonth: 12,
- expiryYear: 2025,
- cvv: '123',
- billingAddress: {
- street: '',
- city: 'New York',
- zipCode: 'invalid',
- country: 'USA'
- }
- };
-
- const result = formValidator.validate(formData, paymentRules);
-
- expect(result.isValid).toBe(false);
- expect(result.fields.billingAddress.street.errors).toContain('Street is required');
- expect(result.fields.billingAddress.zipCode.errors).toContain('Invalid zip code format');
- });
- });
-
- describe('Dynamic Form Validation', () => {
- test('should handle conditional validation rules', () => {
- const conditionalRules = {
- accountType: { required: true, enum: ['personal', 'business'] },
- businessName: {
- required: (data) => data.accountType === 'business',
- minLength: 2
- },
- taxId: {
- required: (data) => data.accountType === 'business',
- pattern: /^\d{2}-\d{7}$/
- }
- };
-
- const personalAccount = {
- accountType: 'personal'
- };
-
- const businessAccount = {
- accountType: 'business',
- businessName: 'ACME Corp',
- taxId: '12-3456789'
- };
-
- const personalResult = formValidator.validate(personalAccount, conditionalRules);
- const businessResult = formValidator.validate(businessAccount, conditionalRules);
-
- expect(personalResult.isValid).toBe(true);
- expect(businessResult.isValid).toBe(true);
-
- const invalidBusiness = {
- accountType: 'business'
- };
-
- const invalidResult = formValidator.validate(invalidBusiness, conditionalRules);
- expect(invalidResult.isValid).toBe(false);
- expect(invalidResult.fields.businessName.errors).toContain('Business name is required');
- expect(invalidResult.fields.taxId.errors).toContain('Tax ID is required');
- });
-
- test('should support field dependencies', () => {
- const dependencyRules = {
- country: { required: true },
- state: {
- required: (data) => data.country === 'USA',
- enum: (data) => data.country === 'USA' ? ['CA', 'NY', 'TX'] : null
- },
- province: {
- required: (data) => data.country === 'Canada',
- enum: (data) => data.country === 'Canada' ? ['ON', 'QC', 'BC'] : null
- }
- };
-
- const usAddress = {
- country: 'USA',
- state: 'CA'
- };
-
- const canadianAddress = {
- country: 'Canada',
- province: 'ON'
- };
-
- const usResult = formValidator.validate(usAddress, dependencyRules);
- const canadaResult = formValidator.validate(canadianAddress, dependencyRules);
-
- expect(usResult.isValid).toBe(true);
- expect(canadaResult.isValid).toBe(true);
- });
- });
-
- describe('Real-time Validation', () => {
- test('should support field-level validation', () => {
- const rules = {
- email: { required: true, type: 'email' }
- };
-
- const result1 = formValidator.validateField('email', '', rules.email);
- expect(result1.isValid).toBe(false);
- expect(result1.errors).toContain('Email is required');
-
- const result2 = formValidator.validateField('email', 'invalid', rules.email);
- expect(result2.isValid).toBe(false);
- expect(result2.errors).toContain('Invalid email format');
-
- const result3 = formValidator.validateField('email', '[email protected]', rules.email);
- expect(result3.isValid).toBe(true);
- });
-
- test('should debounce validation for performance', (done) => {
- const originalValidate = formValidator.validateField.bind(formValidator);
- let callCount = 0;
-
- formValidator._validateFieldSpy = jest.fn(() => {
- callCount++;
- });
-
- formValidator.enableDebounce(100);
-
- formValidator.validateField('username', 'a', {});
- formValidator.validateField('username', 'ab', {});
- formValidator.validateField('username', 'abc', {});
-
- setTimeout(() => {
- expect(callCount).toBe(1);
- expect(formValidator._validateFieldSpy).toHaveBeenCalledWith('username', 'abc', {});
- done();
- }, 150);
- });
- });
-});
\ No newline at end of file
diff --git a/validation-test/tests/unit/validator.test.js b/validation-test/tests/unit/validator.test.js
deleted file mode 100644
index 5b98f42f06..0000000000
--- a/validation-test/tests/unit/validator.test.js
+++ /dev/null
@@ -1,263 +0,0 @@
-// Unit tests for Validator class - London School TDD
-const Validator = require('../../src/validator');
-const ValidationRules = require('../../src/validationRules');
-const testData = require('../fixtures/testData');
-const TestHelpers = require('../helpers/testHelpers');
-
-describe('Validator', () => {
- let validator;
- let mockRules;
-
- beforeEach(() => {
- validator = new Validator();
- mockRules = jest.spyOn(ValidationRules.prototype, 'getRules');
- });
-
- afterEach(() => {
- jest.clearAllMocks();
- });
-
- describe('Email Validation', () => {
- test.each(testData.validEmails)('should validate valid email: %s', (email) => {
- const result = validator.validateEmail(email);
- expect(result.isValid).toBe(true);
- expect(result.errors).toHaveLength(0);
- });
-
- test.each(testData.invalidEmails)('should reject invalid email: %s', (email) => {
- const result = validator.validateEmail(email);
- expect(result.isValid).toBe(false);
- expect(result.errors).toHaveLength(1);
- expect(result.errors[0]).toMatch(/invalid email/i);
- });
-
- test('should handle null email input', () => {
- const result = validator.validateEmail(null);
- expect(result.isValid).toBe(false);
- expect(result.errors[0]).toMatch(/email is required/i);
- });
-
- test('should trim whitespace from email', () => {
- const result = validator.validateEmail(' [email protected] ');
- expect(result.isValid).toBe(true);
- });
- });
-
- describe('Phone Number Validation', () => {
- test.each(testData.validPhones)('should validate valid phone: %s', (phone) => {
- const result = validator.validatePhone(phone);
- expect(result.isValid).toBe(true);
- expect(result.errors).toHaveLength(0);
- });
-
- test.each(testData.invalidPhones)('should reject invalid phone: %s', (phone) => {
- const result = validator.validatePhone(phone);
- expect(result.isValid).toBe(false);
- expect(result.errors).toHaveLength(1);
- });
-
- test('should normalize phone numbers', () => {
- const result = validator.validatePhone('(555) 123-4567');
- expect(result.normalized).toBe('5551234567');
- });
- });
-
- describe('URL Validation', () => {
- test.each(testData.validUrls)('should validate valid URL: %s', (url) => {
- const result = validator.validateUrl(url);
- expect(result.isValid).toBe(true);
- expect(result.errors).toHaveLength(0);
- });
-
- test.each(testData.invalidUrls)('should reject invalid URL: %s', (url) => {
- const result = validator.validateUrl(url);
- expect(result.isValid).toBe(false);
- expect(result.errors).toHaveLength(1);
- });
-
- test('should validate URLs with specific protocols', () => {
- const result = validator.validateUrl('https://example.com', { protocols: ['https'] });
- expect(result.isValid).toBe(true);
-
- const httpResult = validator.validateUrl('http://example.com', { protocols: ['https'] });
- expect(httpResult.isValid).toBe(false);
- });
- });
-
- describe('Password Validation', () => {
- test('should validate strong passwords', () => {
- const result = validator.validatePassword(testData.validPasswords.strong);
- expect(result.isValid).toBe(true);
- expect(result.strength).toBe('strong');
- });
-
- test('should reject weak passwords with detailed errors', () => {
- const result = validator.validatePassword(testData.invalidPasswords.tooShort);
- expect(result.isValid).toBe(false);
- expect(result.errors).toContain('Password must be at least 8 characters');
- });
-
- test('should enforce custom password rules', () => {
- const customRules = {
- minLength: 12,
- requireUppercase: true,
- requireNumbers: true,
- requireSpecialChars: true
- };
-
- const result = validator.validatePassword('Short123!', customRules);
- expect(result.isValid).toBe(false);
- expect(result.errors).toContain('Password must be at least 12 characters');
- });
-
- test('should calculate password strength', () => {
- const weak = validator.validatePassword('password');
- const medium = validator.validatePassword('Password123');
- const strong = validator.validatePassword('MyP@ssw0rd123!');
-
- expect(weak.strength).toBe('weak');
- expect(medium.strength).toBe('medium');
- expect(strong.strength).toBe('strong');
- });
- });
-
- describe('Credit Card Validation', () => {
- test.each(Object.entries(testData.creditCards.valid))(
- 'should validate valid %s card',
- (type, number) => {
- const result = validator.validateCreditCard(number);
- expect(result.isValid).toBe(true);
- expect(result.cardType).toBe(type);
- }
- );
-
- test.each(Object.values(testData.creditCards.invalid))(
- 'should reject invalid card: %s',
- (number) => {
- const result = validator.validateCreditCard(number);
- expect(result.isValid).toBe(false);
- }
- );
-
- test('should use Luhn algorithm for checksum validation', () => {
- const result = validator.validateCreditCard('4111111111111111');
- expect(result.isValid).toBe(true);
- expect(result.checksumValid).toBe(true);
- });
- });
-
- describe('Custom Validation Rules', () => {
- test('should allow custom validation functions', () => {
- const customRule = jest.fn().mockReturnValue(true);
- validator.addCustomRule('customField', customRule);
-
- const result = validator.validate({ customField: 'test' }, { customField: 'custom' });
-
- expect(customRule).toHaveBeenCalledWith('test', expect.any(Object));
- expect(result.isValid).toBe(true);
- });
-
- test('should chain multiple validators', () => {
- const result = validator
- .chain()
- .validateEmail('[email protected]')
- .validatePhone('555-123-4567')
- .validateUrl('https://example.com')
- .execute();
-
- expect(result.isValid).toBe(true);
- expect(result.validations).toHaveLength(3);
- });
- });
-
- describe('Async Validation', () => {
- test('should handle async validation rules', async () => {
- const asyncValidator = TestHelpers.mockAsyncValidator(100, true);
- validator.addAsyncRule('username', asyncValidator);
-
- const result = await validator.validateAsync({ username: 'testuser' });
-
- expect(asyncValidator).toHaveBeenCalled();
- expect(result.isValid).toBe(true);
- });
-
- test('should timeout long-running async validations', async () => {
- const slowValidator = TestHelpers.mockAsyncValidator(5000, true);
- validator.addAsyncRule('slowField', slowValidator);
-
- const result = await validator.validateAsync(
- { slowField: 'test' },
- { timeout: 1000 }
- );
-
- expect(result.isValid).toBe(false);
- expect(result.errors).toContain('Validation timeout');
- });
- });
-
- describe('Batch Validation', () => {
- test('should validate multiple fields in batch', () => {
- const data = {
- email: '[email protected]',
- phone: '555-123-4567',
- url: 'https://example.com',
- password: 'MyP@ssw0rd123!'
- };
-
- const rules = {
- email: 'email',
- phone: 'phone',
- url: 'url',
- password: 'password'
- };
-
- const result = validator.validateBatch(data, rules);
-
- expect(result.isValid).toBe(true);
- expect(result.fields).toHaveProperty('email');
- expect(result.fields).toHaveProperty('phone');
- expect(result.fields).toHaveProperty('url');
- expect(result.fields).toHaveProperty('password');
- });
-
- test('should collect all errors in batch validation', () => {
- const data = {
- email: 'invalid',
- phone: '123',
- url: 'not-a-url'
- };
-
- const rules = {
- email: 'email',
- phone: 'phone',
- url: 'url'
- };
-
- const result = validator.validateBatch(data, rules);
-
- expect(result.isValid).toBe(false);
- expect(result.errors).toHaveLength(3);
- expect(result.fields.email.isValid).toBe(false);
- expect(result.fields.phone.isValid).toBe(false);
- expect(result.fields.url.isValid).toBe(false);
- });
- });
-
- describe('Error Messages', () => {
- test('should provide customizable error messages', () => {
- validator.setErrorMessages({
- email: 'Please provide a valid email address',
- required: 'This field is mandatory'
- });
-
- const result = validator.validateEmail('invalid');
- expect(result.errors[0]).toBe('Please provide a valid email address');
- });
-
- test('should support internationalization', () => {
- validator.setLocale('es');
- const result = validator.validateEmail('invalid');
- expect(result.errors[0]).toMatch(/correo electrónico/i);
- });
- });
-});
\ No newline at end of file