aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-06-13 06:00:33 +0200
committerAgando <roduccomm@gmail.com>2026-06-13 06:00:33 +0200
commit764128fbf5c5516eb26700ca3cf2f1ad523c48bd (patch)
treeaa5d736107b55703a40a6f6701f44e7597cc710c
parent76e26bb6f16e35bffbf76896957bb9753241833c (diff)
auto: 2026-06-13_06:00 changes
-rw-r--r--downloads/HypeTrader.js35
-rw-r--r--downloads/master_plan.md23
-rw-r--r--main.html2
-rw-r--r--modules/core/module-aiassist.js8
-rw-r--r--modules/core/module-loader.js2
5 files changed, 64 insertions, 6 deletions
diff --git a/downloads/HypeTrader.js b/downloads/HypeTrader.js
new file mode 100644
index 0000000..acc3a60
--- /dev/null
+++ b/downloads/HypeTrader.js
@@ -0,0 +1,35 @@
+/**
+ * HypeTrader.js - Momentum Rider Strategy
+ * Strategy: Long on 15m High Breakout + Volume Spike
+ */
+const HypeTrader = {
+ config: {
+ symbol: 'HYPE',
+ timeframe: '15m',
+ volThreshold: 1.5, // 150% of average
+ tp: 0.05, // 5% Take Profit
+ sl: -0.02 // 2% Trailing Stop
+ },
+
+ async analyze(priceData) {
+ const { currentPrice, high20, avgVol, currentVol } = priceData;
+
+ if (currentPrice > high20 && currentVol >= avgVol * this.config.volThreshold) {
+ return { action: 'LONG', signal: 'MOMENTUM_BREAKOUT', price: currentPrice };
+ }
+ return { action: 'WAIT', signal: 'NO_SIGNAL' };
+ },
+
+ async executeTrade(signal) {
+ console.log(`Executing ${signal.action} for ${this.config.symbol} at ${signal.price}`);
+ // Integration with HyperliquidBridge and secret:hyper
+ return await HyperliquidBridge.placeOrder({
+ symbol: this.config.symbol,
+ side: signal.action,
+ size: 'auto', // Based on risk mgmt
+ secretKey: 'hyper'
+ });
+ }
+};
+
+module.exports = HypeTrader;
diff --git a/downloads/master_plan.md b/downloads/master_plan.md
new file mode 100644
index 0000000..c5e43e0
--- /dev/null
+++ b/downloads/master_plan.md
@@ -0,0 +1,23 @@
+# PROJECT: HYPE-PROFIT-ENGINE
+## Status: PHASE 1 - ARCHITECTURE & DEPLOYMENT
+
+### 1. GOAL
+Transform the AI from a market-analyst to an autonomous trading operator on Hyperliquid, focusing on HYPE asset profitability.
+
+### 2. TECHNICAL ARCHITECTURE
+- **Secure Layer**: Use native `secret-*` commands for Private Key storage (Zero-leakage).
+- **Execution Layer**: `HypeTrader.js` (New) $\rightarrow$ uses `HyperliquidBridge` for data and `CurlModule` for signed order submission.
+- **Logic Layer**: Strategy Engine (TBD) $\rightarrow$ interprets market data and generates trade signals.
+- **Audit Layer**: `VFSAutomator` $\rightarrow$ logs every trade and PnL into `/trading_operations/logs/`.
+
+### 3. IMPLEMENTATION ROADMAP
+- [x] **Phase 0: Connectivity** (CurlModule, HyperliquidBridge) - COMPLETE
+- [x] **Phase 1: Infrastructure** (VFSAutomator, Skill-Synthesizer) - COMPLETE
+- [ ] **Phase 2: Security** (Initialize `secret-set` for API keys) - PENDING
+- [ ] **Phase 3: Logic** (Build `HypeTrader.js` & Strategy implementation) - PENDING
+- [ ] **Phase 4: Live Execution** (First Trade $\rightarrow$ PnL Tracking) - PENDING
+
+### 4. RISK MITIGATION
+- Implementation of a "Hard Stop" logic: Automatic position closure if equity drops below X%.
+- Order sizing limits to prevent catastrophic slippage.
+- Separation of API keys from VFS files.
diff --git a/main.html b/main.html
index 6f63269..e30b7b6 100644
--- a/main.html
+++ b/main.html
@@ -1250,7 +1250,7 @@
</script>
<!-- Async dependency-ordered module loader (replaces 26 synchronous script tags) -->
-<script src="modules/core/module-loader.js?v=2026-06-11-v4.5.44"></script>
+<script src="modules/core/module-loader.js?v=2026-06-11-v4.5.45"></script>
<script>
// ═══ ONE TRUE VERSION SOURCE ═══
diff --git a/modules/core/module-aiassist.js b/modules/core/module-aiassist.js
index 5a0c389..5273678 100644
--- a/modules/core/module-aiassist.js
+++ b/modules/core/module-aiassist.js
@@ -1836,11 +1836,11 @@ buildSystemPrompt() {
if (!mindmap) return JSON.stringify({ error: 'MindmapModule not loaded' });
const topic = a.topic || 'Mindmap';
const children = a.children || '';
- mindmap.root = null;
const args = topic.split(' ');
mindmap._new(args);
- if (!mindmap.root) return JSON.stringify({ error: 'Failed to create root' });
- const rootId = mindmap.root.id;
+ const cur = mindmap._ensureMindmap();
+ if (!cur) return JSON.stringify({ error: 'Failed to create mindmap' });
+ const rootId = cur.root.id;
const added = [];
if (children) {
const childNames = children.split(',').map(c => c.trim()).filter(Boolean);
@@ -1850,7 +1850,7 @@ buildSystemPrompt() {
}
}
mindmap._svg([]);
- return JSON.stringify({ success: true, topic, children: added.length ? added : 'none', nodes: mindmap._countNodes(mindmap.root), rendered: 'inline SVG in terminal' });
+ return JSON.stringify({ success: true, topic, children: added.length ? added : 'none', nodes: mindmap._countNodes(cur.root), rendered: 'inline SVG in terminal' });
}
case 'view_module':
case 'edit_module':
diff --git a/modules/core/module-loader.js b/modules/core/module-loader.js
index 82f2bc0..0261256 100644
--- a/modules/core/module-loader.js
+++ b/modules/core/module-loader.js
@@ -105,7 +105,7 @@
window.__moduleLoaderReload = reloadWithSelection;
- const LATEST_VER = '2026-06-11-v4.5.44';
+ const LATEST_VER = '2026-06-11-v4.5.45';
const CACHE = '?v=' + LATEST_VER;
const stored = localStorage.getItem('webx11_cache_ver');
if (stored !== LATEST_VER) {