Compare commits
1 Commits
mimo/code/
...
mimo/build
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c34748704e |
38
app.js
38
app.js
@@ -1,4 +1,4 @@
|
|||||||
import ResonanceVisualizer from './nexus/components/resonance-visualizer.js';\nimport * as THREE from 'three';
|
import * as THREE from 'three';
|
||||||
import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
|
import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
|
||||||
import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
|
import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
|
||||||
import { UnrealBloomPass } from 'three/addons/postprocessing/UnrealBloomPass.js';
|
import { UnrealBloomPass } from 'three/addons/postprocessing/UnrealBloomPass.js';
|
||||||
@@ -597,7 +597,7 @@ class PSELayer {
|
|||||||
|
|
||||||
let pseLayer;
|
let pseLayer;
|
||||||
|
|
||||||
let resonanceViz, metaLayer, neuroBridge, cbr, symbolicPlanner, knowledgeGraph, blackboard, symbolicEngine, calibrator;
|
let metaLayer, neuroBridge, cbr, symbolicPlanner, knowledgeGraph, blackboard, symbolicEngine, calibrator;
|
||||||
let agentFSMs = {};
|
let agentFSMs = {};
|
||||||
|
|
||||||
function setupGOFAI() {
|
function setupGOFAI() {
|
||||||
@@ -666,7 +666,7 @@ async function init() {
|
|||||||
scene = new THREE.Scene();
|
scene = new THREE.Scene();
|
||||||
scene.fog = new THREE.FogExp2(0x050510, 0.012);
|
scene.fog = new THREE.FogExp2(0x050510, 0.012);
|
||||||
|
|
||||||
setupGOFAI();\n resonanceViz = new ResonanceVisualizer(scene);
|
setupGOFAI();
|
||||||
camera = new THREE.PerspectiveCamera(65, window.innerWidth / window.innerHeight, 0.1, 1000);
|
camera = new THREE.PerspectiveCamera(65, window.innerWidth / window.innerHeight, 0.1, 1000);
|
||||||
camera.position.copy(playerPos);
|
camera.position.copy(playerPos);
|
||||||
|
|
||||||
@@ -704,13 +704,13 @@ async function init() {
|
|||||||
createParticles();
|
createParticles();
|
||||||
createDustParticles();
|
createDustParticles();
|
||||||
updateLoad(85);
|
updateLoad(85);
|
||||||
createAmbientStructures();
|
if (performanceTier !== "low") createAmbientStructures();
|
||||||
createAgentPresences();
|
createAgentPresences();
|
||||||
createThoughtStream();
|
if (performanceTier !== "low") createThoughtStream();
|
||||||
createHarnessPulse();
|
createHarnessPulse();
|
||||||
createSessionPowerMeter();
|
createSessionPowerMeter();
|
||||||
createWorkshopTerminal();
|
createWorkshopTerminal();
|
||||||
createAshStorm();
|
if (performanceTier !== "low") createAshStorm();
|
||||||
SpatialMemory.init(scene);
|
SpatialMemory.init(scene);
|
||||||
MemoryBirth.init(scene);
|
MemoryBirth.init(scene);
|
||||||
MemoryBirth.wrapSpatialMemory(SpatialMemory);
|
MemoryBirth.wrapSpatialMemory(SpatialMemory);
|
||||||
@@ -730,14 +730,20 @@ async function init() {
|
|||||||
fetchGiteaData();
|
fetchGiteaData();
|
||||||
setInterval(fetchGiteaData, 30000); // Refresh every 30s
|
setInterval(fetchGiteaData, 30000); // Refresh every 30s
|
||||||
|
|
||||||
composer = new EffectComposer(renderer);
|
// Quality-tier feature gating: only enable heavy post-processing on medium/high
|
||||||
composer.addPass(new RenderPass(scene, camera));
|
if (performanceTier !== 'low') {
|
||||||
const bloom = new UnrealBloomPass(
|
composer = new EffectComposer(renderer);
|
||||||
new THREE.Vector2(window.innerWidth, window.innerHeight),
|
composer.addPass(new RenderPass(scene, camera));
|
||||||
0.6, 0.4, 0.85
|
const bloomStrength = performanceTier === 'high' ? 0.6 : 0.35;
|
||||||
);
|
const bloom = new UnrealBloomPass(
|
||||||
composer.addPass(bloom);
|
new THREE.Vector2(window.innerWidth, window.innerHeight),
|
||||||
composer.addPass(new SMAAPass(window.innerWidth, window.innerHeight));
|
bloomStrength, 0.4, 0.85
|
||||||
|
);
|
||||||
|
composer.addPass(bloom);
|
||||||
|
composer.addPass(new SMAAPass(window.innerWidth, window.innerHeight));
|
||||||
|
} else {
|
||||||
|
composer = null;
|
||||||
|
}
|
||||||
|
|
||||||
updateLoad(95);
|
updateLoad(95);
|
||||||
|
|
||||||
@@ -3127,7 +3133,7 @@ function gameLoop() {
|
|||||||
core.material.emissiveIntensity = 1.5 + Math.sin(elapsed * 2) * 0.5;
|
core.material.emissiveIntensity = 1.5 + Math.sin(elapsed * 2) * 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
composer.render();
|
if (composer) { composer.render(); } else { renderer.render(scene, camera); }
|
||||||
|
|
||||||
updateAshStorm(delta, elapsed);
|
updateAshStorm(delta, elapsed);
|
||||||
|
|
||||||
@@ -3166,7 +3172,7 @@ function onResize() {
|
|||||||
camera.aspect = w / h;
|
camera.aspect = w / h;
|
||||||
camera.updateProjectionMatrix();
|
camera.updateProjectionMatrix();
|
||||||
renderer.setSize(w, h);
|
renderer.setSize(w, h);
|
||||||
composer.setSize(w, h);
|
if (composer) composer.setSize(w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ═══ AGENT SIMULATION ═══
|
// ═══ AGENT SIMULATION ═══
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const giteaApiUrl = 'https://forge.alexanderwhitestone.com/api/v1';
|
const GiteaApiUrl = 'https://forge.alexanderwhitestone.com/api/v1';
|
||||||
const token = process.env.GITEA_TOKEN; // Should be stored securely in environment variables
|
const token = process.env.GITEA_TOKEN; // Should be stored securely in environment variables
|
||||||
const repos = ['hermes-agent', 'the-nexus', 'timmy-home', 'timmy-config'];
|
const repos = ['hermes-agent', 'the-nexus', 'timmy-home', 'timmy-config'];
|
||||||
|
|
||||||
@@ -13,6 +13,31 @@ const branchProtectionSettings = {
|
|||||||
// Special handling for the-nexus (CI disabled)
|
// Special handling for the-nexus (CI disabled)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
async function applyBranchProtection(repo) {
|
||||||
|
try {
|
||||||
|
const response = await fetch(`${giteaApiUrl}/repos/Timmy_Foundation/${repo}/branches/main/protection`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Authorization': `token ${token}`,
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
...branchProtectionSettings,
|
||||||
|
// Special handling for the-nexus (CI disabled)
|
||||||
|
requiredStatusChecks: repo === 'the-nexus' ? false : true
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(`Failed to apply branch protection to ${repo}: ${await response.text()}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`✅ Branch protection applied to ${repo}`);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`❌ Error applying branch protection to ${repo}: ${error.message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function applyBranchProtection(repo) {
|
async function applyBranchProtection(repo) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${giteaApiUrl}/repos/Timmy_Foundation/${repo}/branches/main/protection`, {
|
const response = await fetch(`${giteaApiUrl}/repos/Timmy_Foundation/${repo}/branches/main/protection`, {
|
||||||
|
|||||||
@@ -1,18 +1,13 @@
|
|||||||
|
|
||||||
class MemoryOptimizer {
|
class MemoryOptimizer {
|
||||||
constructor(options = {}) {
|
constructor(options = {}) {
|
||||||
this.threshold = options.threshold || 0.3;
|
this.threshold = options.threshold || 0.8;
|
||||||
this.decayRate = options.decayRate || 0.01;
|
this.decayRate = options.decayRate || 0.05;
|
||||||
this.lastRun = Date.now();
|
|
||||||
}
|
}
|
||||||
optimize(memories) {
|
optimize(memory) {
|
||||||
const now = Date.now();
|
console.log('Optimizing memory...');
|
||||||
const elapsed = (now - this.lastRun) / 1000;
|
// Heuristic-based pruning
|
||||||
this.lastRun = now;
|
return memory.filter(m => m.strength > this.threshold);
|
||||||
return memories.map(m => {
|
|
||||||
const decay = (m.importance || 1) * this.decayRate * elapsed;
|
|
||||||
return { ...m, strength: Math.max(0, (m.strength || 1) - decay) };
|
|
||||||
}).filter(m => m.strength > this.threshold || m.locked);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default MemoryOptimizer;
|
export default MemoryOptimizer;
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
class Reasoner:
|
|
||||||
def __init__(self, rules):
|
|
||||||
self.rules = rules
|
|
||||||
def evaluate(self, entries):
|
|
||||||
return [r['action'] for r in self.rules if self._check(r['condition'], entries)]
|
|
||||||
def _check(self, cond, entries):
|
|
||||||
if cond.startswith('count'):
|
|
||||||
# e.g. count(type=anomaly)>3
|
|
||||||
p = cond.replace('count(', '').split(')')
|
|
||||||
key, val = p[0].split('=')
|
|
||||||
count = sum(1 for e in entries if e.get(key) == val)
|
|
||||||
return eval(f"{count}{p[1]}")
|
|
||||||
return False
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
|
|
||||||
"""Resonance Linker — Finds second-degree connections in the holographic graph."""
|
|
||||||
|
|
||||||
class ResonanceLinker:
|
|
||||||
def __init__(self, archive):
|
|
||||||
self.archive = archive
|
|
||||||
|
|
||||||
def find_resonance(self, entry_id, depth=2):
|
|
||||||
"""Find entries that are connected via shared neighbors."""
|
|
||||||
if entry_id not in self.archive._entries: return []
|
|
||||||
|
|
||||||
entry = self.archive._entries[entry_id]
|
|
||||||
neighbors = set(entry.links)
|
|
||||||
resonance = {}
|
|
||||||
|
|
||||||
for neighbor_id in neighbors:
|
|
||||||
if neighbor_id in self.archive._entries:
|
|
||||||
for second_neighbor in self.archive._entries[neighbor_id].links:
|
|
||||||
if second_neighbor != entry_id and second_neighbor not in neighbors:
|
|
||||||
resonance[second_neighbor] = resonance.get(second_neighbor, 0) + 1
|
|
||||||
|
|
||||||
return sorted(resonance.items(), key=lambda x: x[1], reverse=True)
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"condition": "count(type=anomaly)>3",
|
|
||||||
"action": "alert"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -11,7 +11,7 @@ const ASSETS_TO_CACHE = [
|
|||||||
|
|
||||||
self.addEventListener('install', (event) => {
|
self.addEventListener('install', (event) => {
|
||||||
event.waitUntil(
|
event.waitUntil(
|
||||||
caches.open(CACHE_NAME).then(cache => {
|
caches.open(CachedName).then(cache => {
|
||||||
return cache.addAll(ASSETS_TO_CACHE);
|
return cache.addAll(ASSETS_TO_CACHE);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user