Compare commits

..

98 Commits

Author SHA1 Message Date
Alexander Whitestone
a4ce674577 fix: closes #721
Some checks failed
CI / test (pull_request) Failing after 9s
CI / validate (pull_request) Failing after 15s
Review Approval Gate / verify-review (pull_request) Failing after 3s
2026-04-12 12:36:04 -04:00
e28775372f Integrate ResonanceVisualizer into app.js 2026-04-12 12:36:04 -04:00
a7d0116753 Add ResonanceLinker 2026-04-12 12:36:04 -04:00
36bc60f940 Add rules 2026-04-12 12:36:04 -04:00
b6ce446b8c Add Reasoner 2026-04-12 12:36:04 -04:00
0a990a8880 Enhance MemoryOptimizer 2026-04-12 12:36:04 -04:00
03539cf947 Add ResonanceVisualizer 2026-04-12 12:36:04 -04:00
16bf1555d6 Add test_resonance.py 2026-04-12 12:36:04 -04:00
e49b1df8d7 Add test_discover.py 2026-04-12 12:36:04 -04:00
2bf607ca1e Add test_snapshot.py 2026-04-12 12:36:04 -04:00
c18583b346 Add snapshot.py 2026-04-12 12:36:04 -04:00
02748d0a03 Integrate MemoryOptimizer 2026-04-12 12:36:04 -04:00
43be5c5a52 Add smoke test 2026-04-12 12:36:04 -04:00
e55d9c6ebd Add guardrails 2026-04-12 12:36:04 -04:00
9646ce6730 Add MemoryOptimizer 2026-04-12 12:36:04 -04:00
8ae7d778d2 Rewrite Fleet Vocabulary — replace Robing pattern with Hermes-native comms 2026-04-12 12:36:04 -04:00
47b6071dee Remove OpenClaw sidecar reference from README — Hermes maxi directive 2026-04-12 12:36:04 -04:00
160f2281b7 [claude] Mnemosyne file-based document ingestion pipeline (#1275) (#1276) 2026-04-12 12:36:04 -04:00
71fc4ab20b [claude] Mnemosyne Memory Resonance — latent connection discovery (#1272) (#1274) 2026-04-12 12:36:04 -04:00
ec8a2fc8fd [claude] Mnemosyne archive snapshots — backup and restore (#1268) (#1270) 2026-04-12 12:36:04 -04:00
d78656ca07 docs: update FEATURES.yaml with new CLI commands 2026-04-12 12:36:04 -04:00
5788925f38 test: add CLI command tests for path, touch, decay, vitality, fading, vibrant 2026-04-12 12:36:04 -04:00
ce546e0f42 fix: mnemosyne path command bug + add vitality/decay CLI commands
Closes #1266

- Fix cmd_path calling nonexistent _load() -> use MnemosyneArchive()
- Add path to dispatch dict
- Add touch, decay, vitality, fading, vibrant CLI commands
2026-04-12 12:36:04 -04:00
8a1623dbcd docs: mark memory_pulse as shipped, add memory_path feature 2026-04-12 12:36:04 -04:00
820b8635a6 test: add tests for shortest_path and path_explanation 2026-04-12 12:36:04 -04:00
2ef37d1d61 feat: add 'path' CLI command for memory pathfinding 2026-04-12 12:36:04 -04:00
af80963d4f feat: add shortest_path and path_explanation to MnemosyneArchive
BFS-based pathfinding between memories through the connection graph.
Enables 'how is X related to Y?' queries across the holographic archive.
2026-04-12 12:36:04 -04:00
fb6ed0d7bb [claude] Memory Pulse — BFS wave animation on crystal click (#1263) (#1264) 2026-04-12 12:36:04 -04:00
486c98894a [claude] Mnemosyne: memory consolidation — auto-merge duplicates (#1260) (#1262) 2026-04-12 12:36:04 -04:00
8d92ea9905 docs(mnemosyne): mark memory_decay as shipped
Part of #1258.
2026-04-12 12:36:04 -04:00
95f3434c08 test(mnemosyne): add memory decay test suite
Part of #1258.
- Test vitality fields on entry model
- Test touch() access recording and boost
- Test compute_vitality decay math
- Test fading/vibrant queries
- Test apply_decay bulk operation
- Test stats integration
- Integration lifecycle test
2026-04-12 12:36:04 -04:00
6dce93d948 feat(mnemosyne): add memory decay system to MnemosyneArchive
Part of #1258.
- touch(entry_id): record access, boost vitality
- get_vitality(entry_id): current vitality status  
- fading(limit): most neglected entries
- vibrant(limit): most alive entries
- apply_decay(): decay all entries, persist
- stats() updated with avg_vitality, fading_count, vibrant_count

Decay: exponential with 30-day half-life.
Touch: 0.1 * (1 - current_vitality) — diminishing returns.
2026-04-12 12:36:04 -04:00
be45c7f88b feat(mnemosyne): add vitality and last_accessed fields to ArchiveEntry
Part of #1258 — memory decay system.
- vitality: float 0.0-1.0 (default 1.0)
- last_accessed: ISO datetime of last access

Also ensures updated_at and content_hash fields from main are present.
2026-04-12 12:36:04 -04:00
77f2ad4a80 feat: export embedding backends from mnemosyne __init__ 2026-04-12 12:36:04 -04:00
23a89f22b7 docs: mark embedding_backend as shipped in FEATURES.yaml 2026-04-12 12:36:04 -04:00
0317e72d6e feat: CLI --backend flag for embedding backend selection
- search: --backend ollama|tfidf|auto
- rebuild: --backend flag
- Auto-detects best backend when --semantic is used
2026-04-12 12:36:04 -04:00
0cf152317d test: add embedding backend test suite
Tests cosine similarity, TF-IDF backend,
auto-detection, and fallback behavior.
2026-04-12 12:36:04 -04:00
3aa084bdb6 feat: archive.py uses embedding backend for semantic search
- MnemosyneArchive.__init__ accepts optional EmbeddingBackend
- Auto-detects best backend via get_embedding_backend()
- semantic_search uses embedding cosine similarity when available
- Falls back to Jaccard token similarity gracefully
2026-04-12 12:36:04 -04:00
e31c8179da feat: linker supports pluggable embedding backend
HolographicLinker now accepts optional EmbeddingBackend.
Uses cosine similarity on embeddings when available,
falls back to Jaccard token similarity otherwise.
Embedding cache for performance during link operations.
2026-04-12 12:36:04 -04:00
48fcadb4e8 feat: add pluggable embedding backend (Ollama + TF-IDF)
Implements embedding_backend from FEATURES.yaml:
- Abstract EmbeddingBackend interface
- OllamaEmbeddingBackend for local sovereign models
- TfidfEmbeddingBackend pure-Python fallback
- get_embedding_backend() auto-detection
2026-04-12 12:36:04 -04:00
perplexity
879cc2a336 [IaC] Add CONTRIBUTING.md — assignment-lock protocol and workflow conventions
Closes #1252

- Assignment-as-lock protocol for humans and agents
- Branch naming conventions
- PR requirements (rebase, reference issues, no bytecode)
- Path conventions table
- Feature manifest workflow
- Stale PR policy documentation
2026-04-12 12:36:04 -04:00
perplexity
b2bb253157 [IaC] Add Mnemosyne FEATURES.yaml — declarative feature manifest
Closes #1251

- Documents all shipped backend modules (archive, entry, ingest, linker, cli, tests)
- Documents all shipped frontend components (11 components)
- Lists planned/unshipped features (decay, pulse, embeddings, consolidation)
- References merged PRs for each feature
- Enforces canon_path: nexus/mnemosyne/
2026-04-12 12:36:04 -04:00
perplexity
68d2fa7abb [IaC] Add stale PR closer script — auto-close conflicted superseded PRs
Closes #1250

- Shell/Python script for cron on Hermes (every 6h)
- Identifies PRs that are both conflicted AND superseded
- Matches by Closes #NNN references and title similarity (60%+ overlap)
- Configurable grace period via GRACE_HOURS env var
- DRY_RUN mode for safe testing
- Idempotent — safe to re-run
2026-04-12 12:36:04 -04:00
perplexity
b1d86f6a07 [IaC] Fix .gitignore — recursive __pycache__ exclusion + purge 22 cached .pyc files
Closes #1249

- Replace path-specific __pycache__ entries with recursive **/__pycache__/
- Add *.pyc and *.pyo globs
- Remove 22 tracked .pyc files from bin/, nexus/evennia_mempalace/,
  nexus/mempalace/, and nexus/mnemosyne/
- Reorganize .gitignore with section comments for clarity
2026-04-12 12:36:04 -04:00
Alexander Whitestone
2d7a531f82 feat(mnemosyne): Add connection panel HTML + CSS
- Panel container in index.html after memory-inspect-panel
- Full CSS styles matching Mnemosyne aesthetic
- Slide-in from right, positioned next to inspect panel
- Connected memories list with navigate/remove actions
- Suggested memories with add-connection button
- Hover highlight state for 3D crystal feedback
2026-04-12 12:36:04 -04:00
Alexander Whitestone
d37b9ae074 feat(mnemosyne): Memory Connection Panel — interactive connection management
- Browse all connections from a selected memory crystal
- Suggested connections from same region + nearby memories
- Add/remove connections with bidirectional sync
- Hover highlights connected crystals in 3D world
- Navigate to connected memories via click
- Clean slide-in panel UI matching Mnemosyne aesthetic
2026-04-12 12:36:04 -04:00
dd05abe4f7 [claude] Add temporal query methods: by_date_range and temporal_neighbors (#1244) (#1246) 2026-04-12 12:36:04 -04:00
05b01ad771 [claude] Mnemosyne entry update + content deduplication (#1239) (#1241) 2026-04-12 12:36:04 -04:00
2adcbd0372 [claude] Mnemosyne tag management — add, remove, replace topics (#1236) (#1238) 2026-04-12 12:36:04 -04:00
Alexander Whitestone
25f07dcc63 test(mnemosyne): graph cluster analysis tests — 22 tests
- graph_clusters: empty, orphans, linked pairs, separate clusters, topics, density
- hub_entries: ordering, limit, inbound/outbound counting
- bridge_entries: triangle (none), chain (B is bridge), small cluster filtered
- rebuild_links: creates links, threshold override, persistence
2026-04-12 12:36:04 -04:00
Alexander Whitestone
64686d81a3 feat(mnemosyne): CLI commands for graph analysis
- mnemosyne clusters: show connected component clusters with density + topics
- mnemosyne hubs: most connected entries by degree centrality
- mnemosyne bridges: articulation points (entries connecting clusters)
- mnemosyne rebuild: recompute all links from scratch
2026-04-12 12:36:04 -04:00
Alexander Whitestone
c13b9b52d5 feat(mnemosyne): graph cluster analysis — clusters, hubs, bridges, rebuild_links
- graph_clusters(): BFS connected component discovery with density + topic analysis
- hub_entries(): degree centrality ranking of most connected entries
- bridge_entries(): Tarjan's articulation points — entries that connect clusters
- rebuild_links(): full link recomputation after bulk ingestion
- _build_adjacency(): internal adjacency builder with validation
2026-04-12 12:36:04 -04:00
Alexander Whitestone
fbafa10ee7 test(mnemosyne): add graph_data() tests
- empty archive returns empty nodes/edges
- nodes have all required fields
- edges have weights in [0,1]
- topic_filter returns subgraph
- bidirectional edges deduplicated
2026-04-12 12:36:04 -04:00
Alexander Whitestone
3e9b9a215a feat(mnemosyne): add graph_data() for 3D constellation export
Returns {nodes, edges} with live link weights. Supports topic_filter
for subgraph extraction. Edges are deduplicated (bidirectional links
become single undirected edges).

Closes #1232
2026-04-12 12:36:04 -04:00
33fbe851b2 feat: add metadata for ordinal archive 2026-04-12 12:36:03 -04:00
fe9139262d feat: Sovereign Ordinal Archive - block 944648
Scanned 2026-04-11, documenting philosophical and moral inscriptions on Bitcoin blockchain.
2026-04-12 12:36:03 -04:00
0b352bc436 [claude] Memory Inspect Panel — click-to-read detail view (#1227) (#1229) 2026-04-12 12:36:03 -04:00
a03db862fa feat: integrate MemoryBirth into app.js
- Import MemoryBirth module
- Initialize alongside SpatialMemory
- Wrap placeMemory() for automatic birth animations
- Call MemoryBirth.update() in render loop
2026-04-12 12:36:03 -04:00
1cb28fec34 feat: add memory-birth.js — crystal materialization animation system
- Elastic scale-in from 0 to full size
- Bloom flash at materialization peak
- Neighbor pulse: nearby memories brighten on birth
- Connection line progressive draw-in
- Auto-wraps SpatialMemory.placeMemory() for zero-config use
2026-04-12 12:36:03 -04:00
b5ae7f4c2c [claude] Mnemosyne: semantic search via holographic linker similarity (#1223) (#1225) 2026-04-12 12:36:03 -04:00
46da2a8c81 [claude] Mnemosyne: export, deletion, and richer stats (#1218) (#1220) 2026-04-12 12:36:03 -04:00
a9f4a0651f merge: Mnemosyne Phase 1 — Living Holographic Archive
Co-authored-by: Alexander Whitestone <alexander@alexanderwhitestone.com>
Co-committed-by: Alexander Whitestone <alexander@alexanderwhitestone.com>
2026-04-12 12:36:03 -04:00
63334387e6 feat(mnemosyne): wire memory filter panel in app.js
- G key toggles filter panel
- Escape closes filter panel
- toggleMemoryFilter() bridge function
2026-04-12 12:36:03 -04:00
360155f1b6 feat(mnemosyne): add memory filter panel CSS
- Frosted glass panel matching Mnemosyne theme
- Category toggle switches with color dots
- Slide-in animation from right
2026-04-12 12:36:03 -04:00
68a6fad1d6 feat(mnemosyne): add memory filter panel with category toggles
- Filter panel with toggle switches per memory region
- Show All / Hide All bulk controls
- Memory count per category
- Frosted glass UI matching Mnemosyne design
2026-04-12 12:36:03 -04:00
ff7fef4f73 feat(mnemosyne): add region filter visibility methods to SpatialMemory
- setRegionVisibility(category, visible) — toggle single region
- setAllRegionsVisible(visible) — bulk toggle
- getMemoryCountByRegion() — count memories per category
- isRegionVisible(category) — query visibility state
2026-04-12 12:36:03 -04:00
298a2bf3f6 fix: wire SpatialMemory.setCamera(camera) for entity line LOD (#1167)
Pass camera reference to SpatialMemory so entity resolution lines get distance-based opacity fade and LOD culling.
2026-04-12 12:36:03 -04:00
060832a8ed fix: export setCamera from SpatialMemory (#1167)
Entity resolution lines were drawn but LOD culling never activated because setCamera() was defined but not exported. Without camera reference, _updateEntityLines() was a no-op.
2026-04-12 12:36:03 -04:00
7d78f4bfbf [claude] Mnemosyne archive health dashboard — statistics overlay panel (#1210) (#1211) 2026-04-12 12:36:03 -04:00
32171242f8 [Mnemosyne] Integrate MemoryOptimizer into app.js 2026-04-12 12:36:03 -04:00
b06cdf3fd3 [Mnemosyne] Add scripts/smoke.mjs (GOFAI improvements and guardrails) 2026-04-12 12:36:03 -04:00
f2d7466849 [Mnemosyne] Add scripts/guardrails.sh (GOFAI improvements and guardrails) 2026-04-12 12:36:03 -04:00
e1fab2b5e1 [Mnemosyne] Add nexus/components/memory-optimizer.js (GOFAI improvements and guardrails) 2026-04-12 12:36:03 -04:00
e3d383ca12 Update style.css (manual merge) 2026-04-12 12:36:03 -04:00
d23583e269 Update index.html (manual merge) 2026-04-12 12:36:03 -04:00
09f6ac53d4 Update app.js (manual merge) 2026-04-12 12:36:03 -04:00
3e8e7c6cd7 Update nexus/components/spatial-memory.js (manual merge) 2026-04-12 12:36:03 -04:00
Alexander Whitestone
67d3b784fd feat: Project Genie + Nano Banana concept pack for The Nexus (closes #680)
Complete concept generation pipeline:
- shot-list.yaml: 17 shots across 5 priorities (environments, portals, landmarks, skyboxes, textures)
- prompts/: 5 YAML prompt packs with 17 detailed generation prompts
- pipeline.md: Concept-to-Three.js translation workflow
- storage-policy.md: Repo vs local split for binary media
- references/palette.md: Canonical Nexus color/material/lighting spec

All prompts match existing Nexus visual language (Orbitron/JetBrains,
#4af0c0/#7b5cff/#ffd700 palette, cyberpunk cathedral mood).
Genie world prompts designed for explorable 3D prototyping.
Nano Banana prompts designed for concept art that translates to
specific Three.js geometry, materials, and post-processing.
2026-04-12 12:36:03 -04:00
Alexander Whitestone
15b5417ca6 WIP: Browser smoke tests (issue #686) 2026-04-12 12:36:03 -04:00
9e00962d82 feat(mnemosyne): integrate ambient particle system into Nexus
- Import MemoryParticles component
- Init after SpatialMemory, wire onMemoryPlaced callback
- Update in animation loop
- Spawn burst on memory placement (via callback)
- Access trail on crystal click and navigate
- Category colors for all particles
2026-04-12 12:36:03 -04:00
80e7b5ad16 feat: add onMemoryPlaced callback for particle system integration 2026-04-12 12:36:03 -04:00
706ecc2b00 feat(mnemosyne): ambient particle system for memory activity visualization
Issue #1173
- Spawn burst (20 particles, 2s fade) on new fact stored
- Access trail (10 particles) streaming to crystal on fact access
- Ambient cosmic dust (200 particles, slow drift)
- Category colors for all particles
- Total budget < 500 particles at any time
2026-04-12 12:36:03 -04:00
942e9a03c7 [claude] Fix mimo swarm worker tool access — add -t terminal,code_execution (#1203) (#1204) 2026-04-12 12:36:03 -04:00
83dac15b62 merge: Mnemosyne spatial search
Co-authored-by: Alexander Whitestone <alexander@alexanderwhitestone.com>
Co-committed-by: Alexander Whitestone <alexander@alexanderwhitestone.com>
2026-04-12 12:36:03 -04:00
60bc0b3899 merge: Mnemosyne timeline scrubber
Co-authored-by: Alexander Whitestone <alexander@alexanderwhitestone.com>
Co-committed-by: Alexander Whitestone <alexander@alexanderwhitestone.com>
2026-04-12 12:36:03 -04:00
155fcc3230 merge: Mnemosyne crystal rendering
Co-authored-by: Alexander Whitestone <alexander@alexanderwhitestone.com>
Co-committed-by: Alexander Whitestone <alexander@alexanderwhitestone.com>
2026-04-12 12:36:03 -04:00
fc888e8c75 fix: remove auto-merge stub 2026-04-12 12:36:03 -04:00
bb7db603f3 fix: [MIGRATION] Preserve legacy the-matrix quality work before Nexus rewrite (#1195) 2026-04-12 12:36:03 -04:00
55198170f8 fix: [MONITORING] Integrate Kimi Heartbeat status into Nexus Watchdog (#1192) 2026-04-12 12:36:03 -04:00
5f43ebbaaa fix: [RESEARCH] MemPalace — Local AI Memory System Assessment & Leverage Plan (#1191) 2026-04-12 12:36:03 -04:00
fb8c2d0bf2 fix: [TRAINING] Capture the first replayable local Bannerlord session trace for Timmy
Closes #1197

Automated squash merge by mimo swarm.
2026-04-12 12:36:03 -04:00
c5a1400e2d fix: [MEDIA] Veo/Flow flythrough prototypes for The Nexus and Timmy
Closes #1194

Automated squash merge by mimo swarm.
2026-04-12 12:36:03 -04:00
531a817ce1 fix: [PORTAL] Add honest local Bannerlord readiness/status to the Nexus
Closes #1193

Automated squash merge by mimo swarm.
2026-04-12 12:36:03 -04:00
c59dd90b9b fix: [SOVEREIGNTY] Audit NostrIdentity for side-channel timing attacks
Closes #1190

Automated squash merge by mimo swarm.
2026-04-12 12:34:14 -04:00
5c5f2032b4 fix: [A11Y] Add labels/tooltips for top-right icon controls
Closes #1189

Automated squash merge by mimo swarm.
2026-04-12 12:34:14 -04:00
c4983aa0d7 fix: [Mnemosyne] Memory persistence export — dump spatial state to JSON
Closes #1188

Automated squash merge by mimo swarm.
2026-04-12 12:34:14 -04:00
61eca3096a fix: [UX] Add starter prompts / quick actions for meaningful Timmy interaction
Squash merge #1185: fix: [UX] Add starter prompts / quick actions for meaningful Timmy interaction

Closes #701

Automated by mimo-v2-pro swarm.
Worker: mimo-build-701-1775864556
2026-04-12 12:34:14 -04:00
Alexander Whitestone
536744ec21 fix: [INSTALL] Launch GOG Bannerlord locally on the Mac with operator proof (closes #721)
Some checks failed
CI / test (pull_request) Failing after 11s
CI / validate (pull_request) Failing after 13s
Review Approval Gate / verify-review (pull_request) Failing after 4s
- Add portal/bannerlord/INSTALL.md: step-by-step macOS setup guide
- Add portal/bannerlord/launch.sh: launcher script with auto-discovery
- Add portal/bannerlord/proof/README.md: proof capture instructions
- Update portals.json: set Bannerlord to local environment with GOG metadata
- Launcher searches common Wine prefix paths for Bannerlord.exe
- Auto-generates launch logs for operator proof
2026-04-10 20:19:05 -04:00
11 changed files with 364 additions and 12 deletions

8
app.js
View File

@@ -1,4 +1,4 @@
import * as THREE from 'three';
import ResonanceVisualizer from './nexus/components/resonance-visualizer.js';\nimport * as THREE from 'three';
import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
import { UnrealBloomPass } from 'three/addons/postprocessing/UnrealBloomPass.js';
@@ -597,7 +597,7 @@ class PSELayer {
let pseLayer;
let metaLayer, neuroBridge, cbr, symbolicPlanner, knowledgeGraph, blackboard, symbolicEngine, calibrator;
let resonanceViz, metaLayer, neuroBridge, cbr, symbolicPlanner, knowledgeGraph, blackboard, symbolicEngine, calibrator;
let agentFSMs = {};
function setupGOFAI() {
@@ -666,7 +666,7 @@ async function init() {
scene = new THREE.Scene();
scene.fog = new THREE.FogExp2(0x050510, 0.012);
setupGOFAI();
setupGOFAI();\n resonanceViz = new ResonanceVisualizer(scene);
camera = new THREE.PerspectiveCamera(65, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.copy(playerPos);
@@ -724,7 +724,7 @@ async function init() {
// Mnemosyne: Periodic GOFAI Optimization
setInterval(() => {
console.info('[Mnemosyne] Running periodic optimization...');
MemoryOptimizer.optimize(SpatialMemory);
MemoryOptimizer.decaySpatialMemory(SpatialMemory);
}, 1000 * 60 * 10); // Every 10 minutes
fetchGiteaData();

View File

@@ -1,13 +1,52 @@
class MemoryOptimizer {
static _lastRun = Date.now();
constructor(options = {}) {
this.threshold = options.threshold || 0.8;
this.decayRate = options.decayRate || 0.05;
this.threshold = options.threshold || 0.3;
this.decayRate = options.decayRate || 0.01;
this.lastRun = Date.now();
}
optimize(memory) {
console.log('Optimizing memory...');
// Heuristic-based pruning
return memory.filter(m => m.strength > this.threshold);
optimize(memories) {
const now = Date.now();
const elapsed = (now - this.lastRun) / 1000;
this.lastRun = now;
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);
}
/**
* Static decay pass — updates SpatialMemory crystals in-place.
* Call as: MemoryOptimizer.decaySpatialMemory(spatialMemoryModule)
*/
static decaySpatialMemory(spatialMemory, { decayRate = 0.005, threshold = 0.15 } = {}) {
const now = Date.now();
const elapsed = (now - MemoryOptimizer._lastRun) / 1000;
MemoryOptimizer._lastRun = now;
const memEntries = spatialMemory.getAllMemoryEntries();
if (!memEntries || memEntries.length === 0) return 0;
let decayed = 0;
memEntries.forEach(entry => {
const currentStrength = entry.mesh?.userData?.strength ?? 0.7;
const importance = entry.data?.importance || 1;
const decay = importance * decayRate * elapsed;
const newStrength = Math.max(0, currentStrength - decay);
if (newStrength <= threshold && !entry.data?.locked) {
spatialMemory.removeMemory(entry.data.id);
decayed++;
} else if (entry.mesh) {
spatialMemory.updateMemory(entry.data.id, { strength: newStrength });
}
});
console.info(`[MemoryOptimizer] Decay pass: ${decayed} faded, ${memEntries.length - decayed} retained`);
return decayed;
}
}
export default MemoryOptimizer;

View File

@@ -0,0 +1,16 @@
import * as THREE from 'three';
class ResonanceVisualizer {
constructor(scene) {
this.scene = scene;
this.links = [];
}
addLink(p1, p2, strength) {
const geometry = new THREE.BufferGeometry().setFromPoints([p1, p2]);
const material = new THREE.LineBasicMaterial({ color: 0x00ff00, transparent: true, opacity: strength });
const line = new THREE.Line(geometry, material);
this.scene.add(line);
this.links.push(line);
}
}
export default ResonanceVisualizer;

View File

@@ -601,6 +601,13 @@ const SpatialMemory = (() => {
return Object.values(_memoryObjects).map(o => o.data);
}
/**
* Return full memory entries (mesh + data) for batch operations like decay.
*/
function getAllMemoryEntries() {
return Object.values(_memoryObjects);
}
// ─── LOCALSTORAGE PERSISTENCE ────────────────────────
function _indexHash(index) {
// Simple hash of memory IDs + count to detect changes
@@ -863,6 +870,7 @@ const SpatialMemory = (() => {
return {
init, placeMemory, removeMemory, update, importMemories, updateMemory,
getMemoryAtPosition, getRegionAtPosition, getMemoriesInRegion, getAllMemories,
getAllMemoryEntries,
getCrystalMeshes, getMemoryFromMesh, highlightMemory, clearHighlight, getSelectedId,
exportIndex, importIndex, searchNearby, REGIONS,
saveToStorage, loadFromStorage, clearStorage,

View File

@@ -0,0 +1,14 @@
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

View File

@@ -0,0 +1,22 @@
"""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)

View File

@@ -0,0 +1,6 @@
[
{
"condition": "count(type=anomaly)>3",
"action": "alert"
}
]

View File

@@ -0,0 +1,112 @@
# Bannerlord Local Install Guide (macOS / Apple Silicon)
## Goal
Run the GOG Mount & Blade II: Bannerlord build natively on Alexander's Mac (arm64, macOS Sequoia+).
## Prerequisites
- macOS 14+ on Apple Silicon (arm64)
- ~60 GB free disk space (game + Wine prefix)
- GOG installer files in `~/Downloads/`:
- `setup_mount__blade_ii_bannerlord_1.3.15.109797_(64bit)_(89124).exe`
- `setup_mount__blade_ii_bannerlord_1.3.15.109797_(64bit)_(89124)-1.bin` through `-13.bin`
## Step 1: Install Porting Kit
Porting Kit (free) wraps Wine/GPTK for macOS. It has a GUI but we automate what we can.
```bash
brew install --cask porting-kit
```
Launch it once to complete first-run setup:
```bash
open -a "Porting Kit"
```
## Step 2: Create Wine Prefix + Install Game
**Option A: Via Porting Kit GUI (recommended)**
1. Open Porting Kit
2. Click "Install Game" → "Custom Port" or search for Bannerlord
3. Point it at: `~/Downloads/setup_mount__blade_ii_bannerlord_1.3.15.109797_(64bit)_(89124).exe`
4. Follow the GOG installer wizard
5. Install to default path inside the Wine prefix
6. When done, note the prefix path (usually `~/Library/Application Support/PortingKit/...`)
**Option B: Manual Wine prefix (advanced)**
If you have Homebrew Wine (or GPTK) installed:
```bash
# Create prefix
export WINEPREFIX="$HOME/Games/Bannerlord"
wine64 boot /init
# Run the GOG installer (it auto-chains the .bin files)
cd ~/Downloads
wine64 setup_mount__blade_ii_bannerlord_1.3.15.109797_\(64bit\)_\(89124\).exe
```
Follow the GOG installer wizard. Default install path is fine.
## Step 3: Locate the Game Binary
After installation, the game executable is at:
```
$WINEPREFIX/drive_c/GOG Games/Mount & Blade II Bannerlord/bin/Win64_Shipping_Client/Bannerlord.exe
```
Or inside Porting Kit's prefix at:
```
~/Library/Application Support/PortingKit/<prefix-name>/drive_c/GOG Games/Mount & Blade II Bannerlord/bin/Win64_Shipping_Client/Bannerlord.exe
```
## Step 4: First Launch
```bash
# Find the actual path first, then:
cd "$HOME/Games/Bannerlord/drive_c/GOG Games/Mount & Blade II Bannerlord/bin/Win64_Shipping_Client"
wine64 Bannerlord.exe
```
Or use the launcher script:
```bash
./portal/bannerlord/launch.sh
```
## Step 5: Proof (Operator Checklist)
- [ ] Game window opens and is visible on screen
- [ ] At least the main menu renders (TaleWorlds logo, "Campaign", "Custom Battle", etc.)
- [ ] Screenshot taken: save to `portal/bannerlord/proof/`
- [ ] Launch command recorded below for repeatability
**Launch command (fill in after install):**
```
# Repeatable launch:
./portal/bannerlord/launch.sh
```
## Troubleshooting
**Black screen on launch:**
- Try: `wine64 Bannerlord.exe -force-d3d11` or `-force-vulkan`
- Set Windows version: `winecfg` → set to Windows 10
**Missing DLLs:**
- Install DirectX runtime: `winetricks d3dx9 d3dx10 d3dx11 vcrun2019`
**Performance:**
- GPTK/Rosetta overhead is expected; 30-60 FPS is normal on M1/M2
- Lower in-game graphics settings to "Medium" for first run
**Installer won't chain .bin files:**
- Make sure all .bin files are in the same directory as the .exe
- Verify with: `ls -la ~/Downloads/setup_mount__blade_ii_bannerlord_*`
## References
- GamePortal Protocol: `GAMEPORTAL_PROTOCOL.md`
- Portal config: `portals.json` (entry: "bannerlord")
- GOG App ID: Mount & Blade II: Bannerlord
- Steam App ID: 261550 (for Steam stats integration)

115
portal/bannerlord/launch.sh Executable file
View File

@@ -0,0 +1,115 @@
#!/usr/bin/env bash
# Bannerlord Launcher for macOS (Apple Silicon via Wine/GPTK)
# Usage: ./portal/bannerlord/launch.sh [--wine-prefix PATH] [--exe PATH]
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
# Defaults — override with flags or environment
WINEPREFIX="${WINEPREFIX:-$HOME/Games/Bannerlord}"
BANNERLORD_EXE=""
WINE_CMD=""
# Parse args
while [[ $# -gt 0 ]]; do
case "$1" in
--wine-prefix) WINEPREFIX="$2"; shift 2 ;;
--exe) BANNERLORD_EXE="$2"; shift 2 ;;
--help)
echo "Usage: $0 [--wine-prefix PATH] [--exe PATH]"
echo ""
echo "Defaults:"
echo " Wine prefix: $WINEPREFIX"
echo " Auto-discovers Bannerlord.exe in the prefix"
exit 0
;;
*) echo "Unknown arg: $1"; exit 1 ;;
esac
done
# Find wine command
find_wine() {
if command -v wine64 &>/dev/null; then
echo "wine64"
elif command -v wine &>/dev/null; then
echo "wine"
elif [ -f "/Applications/Whisky.app/Contents/Resources/WhiskyCmd" ]; then
echo "/Applications/Whisky.app/Contents/Resources/WhiskyCmd"
else
echo ""
fi
}
WINE_CMD="$(find_wine)"
if [ -z "$WINE_CMD" ]; then
echo "ERROR: No Wine runtime found."
echo "Install one of:"
echo " brew install --cask porting-kit"
echo " brew install --cask crossover"
echo " brew tap apple/apple && brew install game-porting-toolkit"
exit 1
fi
echo "Wine runtime: $WINE_CMD"
echo "Wine prefix: $WINEPREFIX"
# Find Bannerlord.exe if not specified
if [ -z "$BANNERLORD_EXE" ]; then
# Search common GOG install paths
SEARCH_PATHS=(
"$WINEPREFIX/drive_c/GOG Games/Mount & Blade II Bannerlord/bin/Win64_Shipping_Client/Bannerlord.exe"
"$WINEPREFIX/drive_c/GOG Games/Mount Blade II Bannerlord/bin/Win64_Shipping_Client/Bannerlord.exe"
"$WINEPREFIX/drive_c/Program Files/Mount & Blade II Bannerlord/bin/Win64_Shipping_Client/Bannerlord.exe"
)
# Also search PortingKit prefixes
while IFS= read -r -d '' exe; do
SEARCH_PATHS+=("$exe")
done < <(find "$HOME/Library/Application Support/PortingKit" -name "Bannerlord.exe" -print0 2>/dev/null || true)
for path in "${SEARCH_PATHS[@]}"; do
if [ -f "$path" ]; then
BANNERLORD_EXE="$path"
break
fi
done
fi
if [ -z "$BANNERLORD_EXE" ] || [ ! -f "$BANNERLORD_EXE" ]; then
echo "ERROR: Bannerlord.exe not found."
echo "Searched:"
echo " $WINEPREFIX/drive_c/GOG Games/"
echo " ~/Library/Application Support/PortingKit/"
echo ""
echo "Run the install first. See: portal/bannerlord/INSTALL.md"
exit 1
fi
echo "Game binary: $BANNERLORD_EXE"
echo "Launching..."
echo ""
# Log the launch for proof
LAUNCH_LOG="$SCRIPT_DIR/proof/launch_$(date +%Y%m%d_%H%M%S).log"
mkdir -p "$SCRIPT_DIR/proof"
{
echo "=== Bannerlord Launch ==="
echo "Date: $(date -Iseconds)"
echo "Wine: $WINE_CMD"
echo "Prefix: $WINEPREFIX"
echo "Binary: $BANNERLORD_EXE"
echo "User: $(whoami)"
echo "macOS: $(sw_vers -productVersion)"
echo "Arch: $(uname -m)"
echo "========================="
} > "$LAUNCH_LOG"
echo "Launch log: $LAUNCH_LOG"
echo ""
# Set the prefix and launch
export WINEPREFIX
EXE_DIR="$(dirname "$BANNERLORD_EXE")"
cd "$EXE_DIR"
exec "$WINE_CMD" "Bannerlord.exe" "$@"

View File

@@ -0,0 +1,16 @@
# Bannerlord Proof
Screenshots and launch logs proving the game runs locally on the Mac.
## How to capture proof
1. Launch the game: `./portal/bannerlord/launch.sh`
2. Wait for main menu to render
3. Take screenshot: `screencapture -x portal/bannerlord/proof/main_menu_$(date +%Y%m%d).png`
4. Save launch log (auto-generated by launch.sh)
## Expected proof files
- `main_menu_*.png` — screenshot of game main menu
- `launch_*.log` — launch command + environment details
- `ingame_*.png` — optional in-game screenshots

View File

@@ -23,7 +23,7 @@
"rotation": { "y": 0.5 },
"portal_type": "game-world",
"world_category": "strategy-rpg",
"environment": "production",
"environment": "local",
"access_mode": "operator",
"readiness_state": "downloaded",
"readiness_steps": {
@@ -37,11 +37,15 @@
"owner": "Timmy",
"app_id": 261550,
"window_title": "Mount & Blade II: Bannerlord",
"install_source": "gog",
"gog_version": "1.3.15.109797",
"launcher_script": "portal/bannerlord/launch.sh",
"install_guide": "portal/bannerlord/INSTALL.md",
"destination": {
"url": null,
"type": "harness",
"action_label": "Enter Calradia",
"params": { "world": "calradia" }
"params": { "world": "calradia", "runtime": "wine/gptk" }
}
},
{