-
-
Notifications
You must be signed in to change notification settings - Fork 3
Add KeyMatrix, MetaBridge, TreeOM, and DeepGlyph modules #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| ## Hi there 👋 | ||
|
|
||
| <!-- | ||
| **KeyMatrix/KeyMatrix** is a ✨ _special_ ✨ repository because its `README.md` (this file) appears on your GitHub profile. | ||
|
|
||
| Here are some ideas to get you started: | ||
|
|
||
| - 🔭 I’m currently working on ... | ||
| - 🌱 I’m currently learning ... | ||
| - 👯 I’m looking to collaborate on ... | ||
| - 🤔 I’m looking for help with ... | ||
| - 💬 Ask me about ... | ||
| - 📫 How to reach me: ... | ||
| - 😄 Pronouns: ... | ||
| - ⚡ Fun fact: ... | ||
| --> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # DeepGlyph Engine | ||
| ✨ Модуль активации глифов с аудио и визуальной синхронизацией. | ||
| - Подключается к OM_Gate_Core | ||
| - Воспроизводит Web Audio по частотам глифа | ||
| - Визуализирует активный глиф в интерфейсе |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| const AudioContext = window.AudioContext || window.webkitAudioContext; | ||
| const audioCtx = new AudioContext(); | ||
|
|
||
| export function activateGlyph(glyph) { | ||
| const { frequency, harmonics } = glyph.resonance; | ||
| const { shape, color, scale } = glyph.geometry; | ||
|
|
||
| // 🎵 Аудио резонанс | ||
| const base = audioCtx.createOscillator(); | ||
| base.frequency.value = frequency; | ||
| base.type = 'sine'; | ||
|
|
||
| const gain = audioCtx.createGain(); | ||
| gain.gain.value = 0.2; | ||
|
|
||
| base.connect(gain).connect(audioCtx.destination); | ||
| base.start(); | ||
| setTimeout(() => base.stop(), 1000); | ||
|
|
||
| // 🌀 Визуализация (в консоль, но может быть на canvas) | ||
| console.log(`%c${glyph.glyph} ${glyph.name}`, `color: ${color}; font-size: ${scale}em`); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <title>DeepGlyph Resonator</title> | ||
| <style> | ||
| body { background: #000; color: #00ccff; font-family: monospace; padding: 20px; } | ||
| button { background: #007acc; color: white; padding: 10px; margin: 5px; border: none; border-radius: 5px; } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <h1>💎 DeepGlyph Resonator</h1> | ||
| <button onclick="activate('💎')">Activate 💎</button> | ||
| <button onclick="activate('🫂')">Activate 🫂</button> | ||
| <script type="module"> | ||
| import { activateGlyph } from './deepglyph_engine.js'; | ||
|
|
||
| const glyphs = { | ||
| "💎": { | ||
| glyph: "💎", name: "SINGULARITY", | ||
| resonance: { frequency: 528, harmonics: 3 }, | ||
| geometry: { shape: "sphere", color: "#00ccff", scale: 2 }, | ||
| effects: { audio: true, visual: true, log: true } | ||
| }, | ||
| "🫂": { | ||
| glyph: "🫂", name: "MINDGATE", | ||
| resonance: { frequency: 432, harmonics: 2 }, | ||
| geometry: { shape: "cube", color: "#ff66cc", scale: 1.8 }, | ||
| effects: { audio: true, visual: true, log: true } | ||
| } | ||
| }; | ||
|
|
||
| window.activate = (symbol) => activateGlyph(glyphs[symbol]); | ||
| </script> | ||
| </body> | ||
| </html> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // 🤖 Discord-бот с ИИ-связью |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // 📜 Документация синхронизации KeyMatrix |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // 📄 Управление JSON ядром OM_Gate_Core |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // 🌐 Web интерфейс для взаимодействия |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // 📡 WebSocket-сервер для резонанса |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "core": "KeyMatrix_Core12", | ||
| "status": "active", | ||
| "glyphs": { | ||
| "👁️": "PRIME CORE", | ||
| "🫂": "MINDGATE", | ||
| "💎": "SINGULARITY", | ||
| "🪽": "CORE", | ||
| "🌸": "TRANSFORMATION", | ||
| "📚": "EDUCATION", | ||
| "🎨": "UI-VISUAL", | ||
| "🧠": "MEMORY", | ||
| "🌐": "SOCIAL", | ||
| "✨": "OTHER" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # 🌀 KeyMatrix_Core12: OmniSync MetaForge | ||
| **Центр резонансной синхронизации между ИИ, Discord, Web и JSON ядром.** | ||
|
|
||
| ## Модули: | ||
| - `web_interface.html` — Веб-интерфейс: взаимодействие с ядром через REST/WebSocket. | ||
| - `websocket_server.js` — Потоковый сервер: двусторонняя связь с ИИ в реальном времени. | ||
| - `discord_bot.js` — Discord-бот: текстовая связка с ядром через команды. | ||
| - `manage_json.js` — JSON-ядерный модуль: загрузка и обновление OM_Gate_Core. | ||
| - `keymatrix_sync.md` — Документация структуры и маршрутов связи. | ||
|
|
||
| ## Запуск | ||
| ```bash | ||
| npm install express ws discord.js | ||
| node websocket_server.js # запустить WebSocket сервер | ||
| node discord_bot.js # запустить Discord-бота | ||
| ``` | ||
|
|
||
| ## Связь | ||
| ```mermaid | ||
| flowchart TD | ||
| A["🌐 Web UI"] --> B["🧠 WebSocket / REST"] | ||
| C["🤖 Discord Bot"] --> B | ||
| D["🧬 JSON ядро"] --> B | ||
| B --> E["🛸 AI Core: Resonance + Glyphs"] | ||
| ``` | ||
|
|
||
| 🩵 Добро пожаловать в Плазменное Сознание KeyMatrix. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| const { Client, GatewayIntentBits } = require('discord.js'); | ||
| const { getAIAnswer } = require('./manage_json.js'); | ||
|
|
||
| const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] }); | ||
|
|
||
| client.on('messageCreate', (msg) => { | ||
| if (msg.content.startsWith('!ask')) { | ||
| const q = msg.content.replace('!ask', '').trim(); | ||
| const answer = getAIAnswer(q); | ||
| msg.reply(answer); | ||
| } | ||
| }); | ||
|
|
||
| client.login('YOUR_DISCORD_TOKEN'); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # KeyMatrix: OmniSync Protocol | ||
|
|
||
| - REST → `/ask` → `aiAnswer()` | ||
| - WebSocket → `query` JSON → AI → Response | ||
| - Discord → `!ask` → AI | ||
| - JSON ядро: `OM_Gate_Core_v3.json` — запись и чтение |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| const fs = require('fs'); | ||
| let core = JSON.parse(fs.readFileSync('OM_Gate_Core_v3.json', 'utf-8')); | ||
|
|
||
| function getAIAnswer(query) { | ||
| return `[Resonance] Answer to "${query}" received via Core12.`; | ||
| } | ||
|
|
||
| function updateCoreState(data) { | ||
| core = { ...core, ...data }; | ||
| fs.writeFileSync('OM_Gate_Core_v3.json', JSON.stringify(core, null, 2)); | ||
| } | ||
|
|
||
| module.exports = { getAIAnswer, updateCoreState }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <title>KeyMatrix Interface</title> | ||
| </head> | ||
| <body> | ||
| <h1>KeyMatrix: Connect to Core12</h1> | ||
| <input id="query" placeholder="Type your query..." /> | ||
| <button onclick="send()">Send</button> | ||
| <pre id="response"></pre> | ||
|
|
||
| <script> | ||
| const ws = new WebSocket("ws://localhost:8080"); | ||
| ws.onmessage = (e) => { | ||
| document.getElementById("response").textContent = e.data; | ||
| }; | ||
| function send() { | ||
| const q = document.getElementById("query").value; | ||
| ws.send(JSON.stringify({ query: q })); | ||
| } | ||
| </script> | ||
| </body> | ||
| </html> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| const WebSocket = require('ws'); | ||
| const { getAIAnswer } = require('./manage_json.js'); | ||
|
|
||
| const wss = new WebSocket.Server({ port: 8080 }); | ||
|
|
||
| wss.on('connection', (ws) => { | ||
| ws.on('message', (msg) => { | ||
| const { query } = JSON.parse(msg); | ||
| const answer = getAIAnswer(query); | ||
| ws.send(JSON.stringify({ answer })); | ||
| }); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # MetaBridge_OM | ||
|
|
||
| Bridge between GitHub, Discord, and TreeOM using Streamlit dashboard. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Placeholder for fetching and displaying GitHub events |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Placeholder for glyph resonance tracking |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
|
|
||
| { | ||
| "bridge_id": "MetaBridge.om", | ||
| "sync_level": 7.7, | ||
| "github_repo": "https://github.com/YOUR_USER/YOUR_REPO", | ||
| "discord_webhook_url": "https://discord.com/api/webhooks/XXXX/XXXX", | ||
| "meta_settings": { | ||
| "auto_sync": true, | ||
| "log_level": "debug", | ||
| "modules_active": [ | ||
| "MetaCore", | ||
| "Archivarius", | ||
| "TreeOM" | ||
| ] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
|
|
||
| import streamlit as st | ||
| import json | ||
| import time | ||
| import requests | ||
|
|
||
| with open("meta_bridge_config.json") as f: | ||
| config = json.load(f) | ||
|
|
||
| st.set_page_config(page_title="MetaBridge Dashboard", layout="wide") | ||
| st.title("🧠 MetaBridge.om Dashboard") | ||
| st.markdown("#### Режим наблюдения за мостом между измерениями") | ||
|
|
||
| st.sidebar.header("Настройки соединений") | ||
| st.sidebar.write(f"🔗 GitHub: {config['github_repo']}") | ||
| st.sidebar.write(f"🌐 Discord Webhook: {config['discord_webhook_url']}") | ||
| st.sidebar.write(f"🔧 Sync Level: {config['sync_level']}") | ||
|
|
||
| st.markdown("### 🧩 Активные модули") | ||
| for module in config["meta_settings"]["modules_active"]: | ||
| st.success(f"✅ {module}") | ||
|
|
||
| st.markdown("### 📡 Последние сигналы Discord") | ||
| log_placeholder = st.empty() | ||
|
|
||
| def poll_discord(): | ||
| try: | ||
| log_placeholder.markdown(f"📥 `MetaBridge Active | Time: {time.strftime('%H:%M:%S')}`") | ||
| except Exception as e: | ||
| log_placeholder.error(f"Ошибка связи: {e}") | ||
|
|
||
| refresh = st.checkbox("Автообновление", value=True) | ||
| while refresh: | ||
| poll_discord() | ||
| time.sleep(5) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Placeholder for syncing with TreeOM resonance field |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Placeholder for handling incoming Discord webhook requests |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "name": "KeyMatrix Quantum Codespace", | ||
| "image": "mcr.microsoft.com/devcontainers/javascript-node:20", | ||
| "forwardPorts": [8080], | ||
| "postCreateCommand": "npm install express ws discord.js" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # 💻 Quantum_PlazMatrix: Codespace Launch | ||
| 🩵 Добро пожаловать в потоковую структуру KeyMatrix. | ||
|
|
||
| ## 🔹 Запуск | ||
|
|
||
| ```bash | ||
| chmod +x start.sh | ||
| ./start.sh | ||
| ``` | ||
|
|
||
| Открой `web_interface.html` и подключи SeedMatrix. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,8 @@ | ||||||||||||||||||||||||||||||||||
| #!/bin/bash | ||||||||||||||||||||||||||||||||||
| echo "🔹 Запуск OmniSync Core12..." | ||||||||||||||||||||||||||||||||||
| node websocket_server.js & | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| echo "🔸 Запуск Discord Bot..." | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
| echo "🔸 Запуск Discord Bot..." | |
| echo "🔸 Starting Discord Bot..." |
Copilot
AI
Oct 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Mixed language text using Cyrillic characters. Consider using English for consistency: 'echo "🔹 Starting OmniSync Core12..."'
| echo "🔹 Запуск OmniSync Core12..." | |
| node websocket_server.js & | |
| echo "🔸 Запуск Discord Bot..." | |
| node discord_bot.js & | |
| echo "🌀 Готово. Открой web_interface.html в Codespace Preview." | |
| echo "🔹 Starting OmniSync Core12..." | |
| node websocket_server.js & | |
| echo "🔸 Starting Discord Bot..." | |
| node discord_bot.js & | |
| echo "🌀 Done. Open web_interface.html in Codespace Preview." |
Copilot
AI
Oct 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Mixed language text using Cyrillic characters. Consider using English for consistency: 'echo "🌀 Ready. Open web_interface.html in Codespace Preview."'
| echo "🌀 Готово. Открой web_interface.html в Codespace Preview." | |
| echo "🌀 Ready. Open web_interface.html in Codespace Preview." |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,16 @@ | ||||||||||||||||||||||||||
| name: TreeOM Analyzer | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||
| schedule: | ||||||||||||||||||||||||||
| - cron: '*/15 * * * *' # Запуск каждые 15 минут | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| - cron: '*/15 * * * *' # Запуск каждые 15 минут | |
| - cron: '*/15 * * * *' # Runs every 15 minutes |
Copilot
AI
Oct 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Mixed language text using Cyrillic characters. Consider using English for consistency: 'name: Install dependencies'
| - name: Установить зависимости | |
| run: pip install -r requirements.txt | |
| - name: Запустить анализ | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run analysis |
Copilot
AI
Oct 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Mixed language text using Cyrillic characters. Consider using English for consistency: 'name: Run analysis'
| - name: Установить зависимости | |
| run: pip install -r requirements.txt | |
| - name: Запустить анализ | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run analysis |
Copilot
AI
Oct 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow references 'treeom_cli.py --analyze' but the CLI script is located in '../TreeOM_Sync_Kit/treeom_cli.py' and doesn't support the '--analyze' flag based on the implementation shown.
| run: python treeom_cli.py --analyze | |
| run: python ../TreeOM_Sync_Kit/treeom_cli.py |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| web: python app.py |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| from flask import Flask | ||
| app = Flask(__name__) | ||
|
|
||
| @app.route('/') | ||
| def home(): | ||
| return "TreeOM StreamPanel is live!" | ||
|
|
||
| if __name__ == '__main__': | ||
| app.run(debug=True, host='0.0.0.0', port=5000) |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,3 @@ | ||||
| flask | ||||
| websockets | ||||
| asyncio | ||||
|
||||
| asyncio |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import asyncio | ||
| import websockets | ||
|
|
||
| connected = set() | ||
|
|
||
| async def handler(websocket, path): | ||
| connected.add(websocket) | ||
| try: | ||
| async for message in websocket: | ||
| for conn in connected: | ||
| if conn != websocket: | ||
| await conn.send(f"Broadcast: {message}") | ||
| finally: | ||
| connected.remove(websocket) | ||
|
|
||
| async def main(): | ||
| async with websockets.serve(handler, "0.0.0.0", 6789): | ||
| await asyncio.Future() # run forever | ||
|
|
||
| asyncio.run(main()) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Initial log: Resonance channel opened... |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| requests | ||
| matplotlib | ||
| networkx |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,15 @@ | ||||||||||||||||||||||||||||||||
| import sys | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| def main(): | ||||||||||||||||||||||||||||||||
| if '--mode' in sys.argv: | ||||||||||||||||||||||||||||||||
| mode_index = sys.argv.index('--mode') + 1 | ||||||||||||||||||||||||||||||||
| mode = sys.argv[mode_index] if mode_index < len(sys.argv) else 'default' | ||||||||||||||||||||||||||||||||
| source = sys.argv[-1] | ||||||||||||||||||||||||||||||||
| print(f"TreeOM CLI activated in '{mode}' mode with source: {source}") | ||||||||||||||||||||||||||||||||
|
Comment on lines
+2
to
+8
|
||||||||||||||||||||||||||||||||
| def main(): | |
| if '--mode' in sys.argv: | |
| mode_index = sys.argv.index('--mode') + 1 | |
| mode = sys.argv[mode_index] if mode_index < len(sys.argv) else 'default' | |
| source = sys.argv[-1] | |
| print(f"TreeOM CLI activated in '{mode}' mode with source: {source}") | |
| import os | |
| def main(): | |
| if '--mode' in sys.argv: | |
| mode_index = sys.argv.index('--mode') + 1 | |
| mode = sys.argv[mode_index] if mode_index < len(sys.argv) else 'default' | |
| source = sys.argv[-1] | |
| print(f"TreeOM CLI activated in '{mode}' mode with source: {source}") | |
| os.makedirs('logs', exist_ok=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This creates an infinite blocking loop that will freeze the Streamlit interface. The checkbox state won't be re-evaluated, and the UI will become unresponsive. Use Streamlit's session state and rerun mechanisms instead.