nyxora 26.7.1 → 26.7.2-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +86 -46
- package/README.md +14 -2
- package/dist/packages/core/src/agent/honchoDaemon.js +91 -0
- package/dist/packages/core/src/agent/osAgent.js +82 -60
- package/dist/packages/core/src/agent/reasoning.js +25 -14
- package/dist/packages/core/src/agent/updateProfile.js +13 -16
- package/dist/packages/core/src/agent/web3Agent.js +126 -62
- package/dist/packages/core/src/cognitive/cognitiveManager.js +52 -0
- package/dist/packages/core/src/cognitive/prompts/autonomous/binance-trading-integration.md +54 -0
- package/dist/packages/core/src/config/parser.js +1 -0
- package/dist/packages/core/src/config/paths.js +14 -4
- package/dist/packages/core/src/gateway/server.js +54 -2
- package/dist/packages/core/src/gateway/telegram.js +3 -104
- package/dist/packages/core/src/memory/episodic.js +47 -6
- package/dist/packages/core/src/memory/promotionEngine.js +4 -1
- package/dist/packages/core/src/plugin/PluginManager.js +18 -3
- package/dist/packages/core/src/plugin/registry.js +1 -0
- package/dist/packages/core/src/system/agentskills.js +184 -0
- package/dist/packages/core/src/system/plugins/SystemCorePlugin.js +6 -1
- package/dist/packages/core/src/system/plugins/SystemExternalPlugin.js +18 -0
- package/dist/packages/core/src/system/plugins/SystemWorkspacePlugin.js +6 -1
- package/dist/packages/core/src/system/plugins/createSkill.js +41 -0
- package/dist/packages/core/src/system/skillExtractor.js +105 -0
- package/dist/packages/core/src/system/skills/createAgentSkill.js +84 -0
- package/dist/packages/core/src/system/skills/createCognitiveSkill.js +53 -0
- package/dist/packages/core/src/system/skills/forgetMemory.js +38 -0
- package/dist/packages/core/src/test_mainnet.js +45 -0
- package/dist/packages/core/src/utils/llmUtils.js +4 -3
- package/dist/packages/core/src/utils/skillManager.js +5 -1
- package/dist/packages/core/src/web3/aggregator/routeSelector.js +7 -1
- package/dist/packages/core/src/web3/plugins/Web3DefiPlugin.js +6 -1
- package/dist/packages/core/src/web3/plugins/Web3MarketPlugin.js +239 -0
- package/dist/packages/core/src/web3/plugins/Web3SecurityPlugin.js +4 -4
- package/dist/packages/core/src/web3/skills/bridgeToken.js +28 -5
- package/dist/packages/core/src/web3/skills/checkAddress.js +2 -0
- package/dist/packages/core/src/web3/skills/checkPortfolio.js +2 -0
- package/dist/packages/core/src/web3/skills/checkRegistryStatus.js +1 -1
- package/dist/packages/core/src/web3/skills/checkSecurity.js +2 -0
- package/dist/packages/core/src/web3/skills/confirmPendingTx.js +134 -0
- package/dist/packages/core/src/web3/skills/createLimitOrder.js +15 -1
- package/dist/packages/core/src/web3/skills/customTx.js +47 -1
- package/dist/packages/core/src/web3/skills/defiLending.js +44 -2
- package/dist/packages/core/src/web3/skills/getBalance.js +2 -0
- package/dist/packages/core/src/web3/skills/getTrendingTokens.js +67 -0
- package/dist/packages/core/src/web3/skills/getTxHistory.js +2 -0
- package/dist/packages/core/src/web3/skills/marketAnalysis.js +2 -0
- package/dist/packages/core/src/web3/skills/mintNft.js +45 -1
- package/dist/packages/core/src/web3/skills/provideLiquidity.js +61 -15
- package/dist/packages/core/src/web3/skills/revokeApprovals.js +43 -1
- package/dist/packages/core/src/web3/skills/swapToken.js +38 -4
- package/dist/packages/core/src/web3/skills/transfer.js +48 -1
- package/dist/packages/core/src/web3/skills/yieldVault.js +44 -2
- package/dist/packages/core/src/web3/utils/balanceChecker.js +59 -0
- package/dist/packages/core/src/web3/utils/chains.js +19 -0
- package/package.json +1 -2
- package/packages/core/package.json +11 -1
- package/packages/core/src/agent/honchoDaemon.ts +96 -0
- package/packages/core/src/agent/osAgent.ts +90 -69
- package/packages/core/src/agent/reasoning.ts +28 -14
- package/packages/core/src/agent/updateProfile.ts +17 -16
- package/packages/core/src/agent/web3Agent.ts +135 -70
- package/packages/core/src/cognitive/cognitiveManager.ts +53 -0
- package/packages/core/src/cognitive/prompts/autonomous/binance-trading-integration.md +41 -0
- package/packages/core/src/cognitive/prompts/software-development/plan.md +15 -0
- package/packages/core/src/cognitive/prompts/software-development/systematic-debugging.md +14 -0
- package/packages/core/src/cognitive/prompts/software-development/test-driven-development.md +14 -0
- package/packages/core/src/config/parser.ts +4 -0
- package/packages/core/src/config/paths.ts +13 -4
- package/packages/core/src/gateway/server.ts +63 -2
- package/packages/core/src/gateway/telegram.ts +3 -95
- package/packages/core/src/memory/episodic.ts +52 -6
- package/packages/core/src/memory/promotionEngine.ts +5 -1
- package/packages/core/src/plugin/PluginManager.ts +21 -3
- package/packages/core/src/plugin/registry.ts +2 -0
- package/packages/core/src/system/agentskills.ts +175 -0
- package/packages/core/src/system/plugins/SystemCorePlugin.ts +6 -1
- package/packages/core/src/system/plugins/SystemExternalPlugin.ts +18 -0
- package/packages/core/src/system/plugins/SystemWorkspacePlugin.ts +6 -1
- package/packages/core/src/system/plugins/createSkill.ts +41 -0
- package/packages/core/src/system/skillExtractor.ts +112 -0
- package/packages/core/src/system/skills/createAgentSkill.ts +85 -0
- package/packages/core/src/system/skills/createCognitiveSkill.ts +50 -0
- package/packages/core/src/system/skills/forgetMemory.ts +34 -0
- package/packages/core/src/utils/llmUtils.ts +4 -3
- package/packages/core/src/utils/skillManager.ts +5 -1
- package/packages/core/src/web3/aggregator/routeSelector.ts +6 -1
- package/packages/core/src/web3/plugins/Web3DefiPlugin.ts +6 -1
- package/packages/core/src/web3/plugins/Web3MarketPlugin.ts +231 -0
- package/packages/core/src/web3/plugins/Web3SecurityPlugin.ts +4 -4
- package/packages/core/src/web3/skills/bridgeToken.ts +32 -8
- package/packages/core/src/web3/skills/checkAddress.ts +2 -0
- package/packages/core/src/web3/skills/checkPortfolio.ts +2 -0
- package/packages/core/src/web3/skills/checkRegistryStatus.ts +1 -1
- package/packages/core/src/web3/skills/checkSecurity.ts +2 -0
- package/packages/core/src/web3/skills/confirmPendingTx.ts +94 -0
- package/packages/core/src/web3/skills/createLimitOrder.ts +17 -2
- package/packages/core/src/web3/skills/customTx.ts +16 -1
- package/packages/core/src/web3/skills/defiLending.ts +12 -2
- package/packages/core/src/web3/skills/getBalance.ts +2 -0
- package/packages/core/src/web3/skills/getTrendingTokens.ts +89 -0
- package/packages/core/src/web3/skills/getTxHistory.ts +2 -0
- package/packages/core/src/web3/skills/marketAnalysis.ts +2 -0
- package/packages/core/src/web3/skills/mintNft.ts +13 -1
- package/packages/core/src/web3/skills/provideLiquidity.ts +28 -13
- package/packages/core/src/web3/skills/revokeApprovals.ts +10 -1
- package/packages/core/src/web3/skills/swapToken.ts +40 -6
- package/packages/core/src/web3/skills/transfer.ts +15 -1
- package/packages/core/src/web3/skills/yieldVault.ts +12 -2
- package/packages/core/src/web3/utils/balanceChecker.ts +68 -0
- package/packages/core/src/web3/utils/chains.ts +12 -0
- package/packages/dashboard/dist/assets/index-BrLPedT0.css +1 -0
- package/packages/dashboard/dist/assets/index-JRseMFEX.js +16 -0
- package/packages/dashboard/dist/index.html +2 -2
- package/packages/dashboard/package.json +1 -1
- package/packages/mcp-server/package.json +1 -1
- package/packages/policy/package.json +1 -1
- package/packages/signer/package.json +1 -1
- package/packages/core/src/plugin/registry.test.ts +0 -46
- package/packages/core/src/utils/formatter.test.ts +0 -41
- package/packages/dashboard/dist/assets/index-Djg8yTDk.js +0 -16
- package/packages/dashboard/dist/assets/index-VEis1hNq.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,47 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepashangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [26.7.1]
|
|
8
|
+
## [26.7.2-alpha.1]
|
|
9
|
+
### Security & Architecture
|
|
10
|
+
- **Front-to-Back Slippage Architecture (MEV Protection)**: Patched a critical security vulnerability across `swapToken.ts`, `bridgeToken.ts`, `createLimitOrder.ts`, and `provideLiquidity.ts` where LLM-hallucinated slippage parameters or hardcoded aggregator defaults bypassed the user's Dashboard `max_slippage` settings. All DeFi/AMM transactions now strictly fetch and enforce `max_slippage` from the local SQLite `user_profiles` database, guaranteeing absolute protection against MEV Sandwich Attacks on Mainnet.
|
|
11
|
+
|
|
12
|
+
### Core Architecture & Anti-LLM Hallucination
|
|
13
|
+
- **Mass-Sanitization Chain Name**: Injected an automated whitespace sanitizer (`.trim().replace(/\s+/g, '_')`) across 15 Web3 skills. This guarantees NLP robustness, allowing users to type casual chain names like "arbitrum sepolia" without triggering RouteSelector failures.
|
|
14
|
+
- **Skill Extractor YAML Strictness**: Overhauled the `skillExtractor.ts` template generation. It now strictly enforces YAML frontmatter formatting with an indented `required` array, completely eradicating the `property is not defined` Protobuf validation error in Gemini 2.5 Flash.
|
|
15
|
+
- **LLM Fallback Command Parser**: Deployed an emergency regex interceptor in `web3Agent.ts`. If an open-weight LLM (like Minimax) hallucinates and outputs raw text commands (e.g., `/transfer amount=...`), the parser autonomously hijacks the text, clears the UI, and synthetically converts it into a valid JSON tool call payload to trigger the UI transaction confirmation seamlessly.
|
|
16
|
+
|
|
17
|
+
### Infrastructure & Documentation
|
|
18
|
+
- **Phantom Dependencies Resolution**: Systematically eliminated phantom dependencies across the monorepo architecture. Explicitly injected essential modules (e.g., `grammy`, `croner`, `viem`, `jsonwebtoken`, `picocolors`) directly into `packages/core/package.json` to ensure the core engine is fully modular, self-contained, and safe for standalone NPM publishing.
|
|
19
|
+
- **Documentation Technical Accuracy**: Conducted a massive forensic audit and overhaul of the technical documentation to ensure 100% alignment with the actual codebase:
|
|
20
|
+
- Clarified LLM SDK usage (Native Fetch is used for Gemini, but official SDKs are retained for OpenAI/Anthropic).
|
|
21
|
+
- Corrected IPC Protocol claims (Policy Engine uses a combination of Unix Socket and local TCP Loopback, not exclusively Unix Sockets).
|
|
22
|
+
- Fixed outdated directory references for OS-level skills (now loaded directly from `packages/core/src/system/plugins/`).
|
|
23
|
+
- Removed false claims regarding the BIP-39 mnemonic interception in the Memory Validator.
|
|
24
|
+
|
|
25
|
+
## [26.7.2-alpha]
|
|
26
|
+
### Orchestrator Architecture & Extensibility
|
|
27
|
+
- **Multi-Turn Agentic Loop**: Radically overhauled the core LLM execution loop in `web3Agent.ts` and `osAgent.ts`. The engines now utilize a robust `while (turnCount < MAX_TURNS)` architecture. This definitively resolves the "lost context" bug where the AI would drop its tool schemas after a single execution turn, granting Nyxora the endurance to execute highly complex, multi-step operations (e.g., directory scanning followed by programmatic file generation) in a single uninterrupted stream.
|
|
28
|
+
- **External Skill Builder (`SystemExternalPlugin`)**: Engineered a completely isolated IoC plugin dedicated solely to third-party integrations. Introduced the `create_agent_skill` tool, enabling the AI to programmatically scaffold new Node.js execution scripts (`execute.ts`) and auto-generate strict YAML frontmatter for `SKILL.md`. This transforms Nyxora into a fully autonomous Agent-Building Platform that can code and register its own tools dynamically without muddying the native OS/Web3 tool ecosystems.
|
|
29
|
+
|
|
30
|
+
### Cognitive Reasoning & Identity Architecture
|
|
31
|
+
- **Cognitive Reasoning Engine**: Implemented a powerful new Cognitive Skill system that parses user intent and routes them to strict Standard Operating Procedures (SOPs). Added `cognitiveManager.ts` and foundational SOPs for Systematic Debugging, Test-Driven Development (TDD), and Architecture Planning to drastically improve agent output reliability and strictly enforce developer disciplines.
|
|
32
|
+
- **Episodic Memory V2 Architecture**: Completely overhauled the Episodic Memory SQLite database (`episodic.db`) to fix memory duplication and identity conflict issues (e.g., persona overlap).
|
|
33
|
+
- Added a `key_topic` deduplication layer to ensure old conflicting facts are automatically wiped before new ones are saved.
|
|
34
|
+
- Re-routed the `update_profile` AI tool to write directly to SQLite instead of `user.md`, fixing severe overwrite bugs caused by the background Promotion Engine.
|
|
35
|
+
- **`forget_memory` Tool**: Introduced a surgical memory deletion skill. The AI can now autonomously search for and permanently delete specific habits or mistaken persona traits from the SQLite database upon the user's explicit request.
|
|
36
|
+
|
|
37
|
+
### Architectural Revamps & UI/UX
|
|
38
|
+
- **Settings Dashboard Redesign**: Restructured the Settings interface into a sleek, full-width Master-Detail layout with a dedicated sidebar. Consolidated all advanced configuration menus (Web3 Skills, OS Skills, RPC, DeFi, Oracles) previously scattered across the main navigation directly into this unified command center for a cleaner user experience.
|
|
39
|
+
- **UI & Layout Optimizations**: Fixed restrictive width constraints on configuration panels, allowing them to fluidly span the entire viewport. Eliminated double-scrollbar bugs on embedded skill panels by seamlessly integrating them into the parent container with unified glassmorphism scrollbar styling.
|
|
40
|
+
- **Zero-Latency Conversational Approval**: Completely overhauled the Web3 transaction approval flow.
|
|
41
|
+
- Eradicated all intrusive UI modals (`PendingTransactions.tsx`) from the Dashboard and ripped out `InlineKeyboard` popup logic from the Telegram Gateway.
|
|
42
|
+
- Transactions are now approved organically via text. The AI autonomously interprets conversational cues (e.g., answering "Yes" or "No") and executes the pending on-chain transaction in the background using the new `confirmPendingTx` skill.
|
|
43
|
+
- **Token Efficiency Intact**: Ingeniously maintained the `fastReturnTools` bypass. Transaction preparation strings now output a direct prompt ("*Please reply with 'Yes' to execute, or 'No' to cancel*") instantly, achieving conversational UX without incurring the latency or API cost of generating an LLM prompt for every single transaction queue.
|
|
44
|
+
- **Pre-flight Balance & Gas Security Check**: Engineered a universal `balanceChecker` utility that validates wallet balances across all 9 Web3 transaction skills *before* queuing them.
|
|
45
|
+
- Acts as a smart guardrail similar to Rabby Wallet's UX. It automatically aborts transaction preparations entirely if the user lacks the required ERC20 tokens or if their Native Coin (ETH/BNB) balance is completely depleted (preventing out-of-gas failures).
|
|
46
|
+
- **Human-Readable Error Feedback**: Overhauled the raw error outputs from 18-decimal Wei formats to standard units. The system now dynamically fetches token metadata (decimals and symbols) on-the-fly and applies `formatUnits` to present clean, readable error messages (e.g., *"You need at least 500 USDC"* instead of raw Wei integers), significantly reducing friction for novice users.
|
|
47
|
+
|
|
48
|
+
## [26.7.1-alpha]
|
|
9
49
|
### Bug Fixes & Optimizations
|
|
10
50
|
- **Native Coin Resolution Mass Remediation**: Fixed a systemic architectural flaw where Web3 transaction modules strictly validated against the Zero Address (`0x00...00`) for native coins (ETH/BNB/MATIC). The codebase now universally intercepts and processes the `0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee` pseudo-address generated by aggregators. This stabilizes critical transactional skills including:
|
|
11
51
|
- **DEX Swapping**: Prevents contract decimals parsing crashes during Native to ERC20 swaps (`swapToken.ts`).
|
|
@@ -16,7 +56,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
16
56
|
- **Balance Queries**: Correctly routes to native balance RPC methods instead of standard ERC20 `balanceOf` (`getBalance.ts`).
|
|
17
57
|
|
|
18
58
|
|
|
19
|
-
## [26.6.30]
|
|
59
|
+
## [26.6.30-alpha]
|
|
20
60
|
### UI/UX & Quality of Life
|
|
21
61
|
- **AI Web Platform Style Empty State**: Overhauled the default chat interface when no messages are present. The dashboard now features a sleek, centered "What's on your mind today?" greeting, automatically repositioning the input bar to the center.
|
|
22
62
|
- **Dynamic Trending Tokens**: Replaced static suggestion pills with real-time Trending Tokens powered by the backend CoinGecko integration. Tokens gracefully appear under the input bar when the chat is empty.
|
|
@@ -33,12 +73,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
33
73
|
- **Dynamic Local-First Timezones**: Eradicated hardcoded `id-ID` and `Asia/Jakarta` parameter bindings deep within `reasoning.ts`, `osAgent.ts`, and `web3Agent.ts`. Nyxora now natively inherits the user's host OS timezone context while securely formatting dates in `en-US` for accurate LLM semantic parsing.
|
|
34
74
|
- **Text-to-Speech (TTS) Accent Correction**: Repaired the Dashboard's audio synthesis module by migrating `utterance.lang` to `en-US`, completely resolving the robotic accent glitch when reading English crypto analytics aloud.
|
|
35
75
|
|
|
36
|
-
## [26.6.29]
|
|
76
|
+
## [26.6.29-alpha]
|
|
37
77
|
### Release & Stability
|
|
38
|
-
- **Beta Phase**: Nyxora
|
|
78
|
+
- **Beta Phase (Reverted)**: Nyxora briefly entered the Beta phase here for wider public testing, but the status has since reverted to Alpha in `v26.7.2` to accommodate massive core architectural experiments.
|
|
39
79
|
- **NPM Publishing Integrity**: Explicitly whitelisted `CHANGELOG.md` within the `package.json` files array to guarantee release notes are synchronized onto the public NPM registry.
|
|
40
80
|
|
|
41
|
-
## [26.6.28]
|
|
81
|
+
## [26.6.28-alpha]
|
|
42
82
|
### Features & Personalization
|
|
43
83
|
- **Global Fiat Currency Converter:** Integrated a dynamic fiat currency selector in `Settings.tsx` that fetches live `supported_vs_currencies` from CoinGecko. The `Portfolio.tsx` dashboard now seamlessly converts and renders all balances in the selected global fiat (IDR, EUR, GBP, JPY, etc.) using client-side processing, while safely preserving core backend trading logic in pure USD.
|
|
44
84
|
- **Episodic Memory Panic Button:** Introduced a dedicated "Wipe All Episodic Memory" trigger in the UI that routes to `DELETE /api/memory/all`. This systematically purges SQLite records and instantly resynchronizes the LLM `user.md` prompt.
|
|
@@ -79,7 +119,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
79
119
|
- **Reflection Engine Session Binding:** Bound `ReflectionEngine` directly to the active `sessionId` pipeline and introduced an early-return safeguard, properly restoring episodic extraction which previously failed due to NULL session targets.
|
|
80
120
|
- **Relaxed Cryptographic Sanitization:** Disarmed the extremely aggressive 12-word regex heuristic in `validator.ts` that historically flagged standard conversational text inputs as security violations.
|
|
81
121
|
|
|
82
|
-
## [26.6.27]
|
|
122
|
+
## [26.6.27-alpha]
|
|
83
123
|
### Bug Fixes & Security
|
|
84
124
|
- **Aggregator Decimal Normalization:** Fixed a critical overflow bug in `swapToken.ts` and `bridgeToken.ts` where token amounts were hardcoded to 18 decimals (`parseUnits(amountStr, 18)`). The system now strictly queries `getTokenMetadata` via `viem` to fetch the true on-chain decimals (e.g., 6 for USDC/USDT) before transaction construction.
|
|
85
125
|
- **Native Token Consistency:** Standardized the Native Token fallback address inside `tokens.ts` (`TOKEN_MAP`). The application now strictly utilizes `0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee` across all layers instead of blending it with `0x000...`, which fixes execution anomalies with KyberSwap and 1inch resolvers.
|
|
@@ -97,7 +137,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
97
137
|
- **OpenOcean Precision Normalization:** Added architectural support for formatting human-readable decimals (`amountFormatted`) across the `QuoteRequest` interface to properly serve OpenOcean's API, resolving a critical logic inversion where it previously interpreted inputs as raw wei.
|
|
98
138
|
- **Aggregator Endpoint Patches:** Fixed `KyberSwapProvider` payload targeting to extract calldata from `buildData.data.data`, mapped `OpenOceanProvider` requests with enforced `gasPrice` thresholds, and migrated the `RelayProvider` HTTP method from the deprecated `/quote/v2` namespace down to `/quote` (POST).
|
|
99
139
|
|
|
100
|
-
## [26.6.26]
|
|
140
|
+
## [26.6.26-alpha]
|
|
101
141
|
### Bug Fixes & Improvements
|
|
102
142
|
- **Comprehensive Workspace Hardening**: Fixed missing workspace dependencies across `policy`, `signer`, `mcp-server`, and `dashboard` packages. Removed unused endpoints (`/sign-typed-data` in policy) and dead code (`decryptKey` in signer). Strengthened error handling by wrapping all JSON parsing of signer responses with robust `try/catch` blocks in the policy engine. Upgraded transaction IDs to use secure `crypto.randomUUID()`. Addressed critical frontend type safety by implementing optional chaining in `SwapWidget` to prevent React crashes and correcting `default_slippage` types in `Settings.tsx`. Improved Dashboard TypeScript configuration by adding `DOM.Iterable` support.
|
|
103
143
|
- **LLM Architecture Refactor (Bypass Prevention)**: Extracted and centralized LLM provider instantiation (`getLLMClient` & `getOpenAI`) and generic retry logic into `llmUtils.ts`. Eliminated dangerous anti-patterns in `osAgent.ts` and `web3Agent.ts` where the `LLMProvider` adapter was being bypassed by direct OpenAI client calls, which broke multi-provider support (Gemini/Anthropic).
|
|
@@ -109,7 +149,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
109
149
|
- **CoinGecko UI Integration**: Restored the missing official CoinGecko logo inside the Market Oracles configuration dashboard. Added explicit image mapping for both `coingecko_key` and `coingecko_pro_key` directly to the static CDN.
|
|
110
150
|
- **NPM Package Optimization**: Fully sterilized the distribution pipeline by automatically purging unused development testing scripts (`test_security.ts`, `test.ts`) prior to publishing.
|
|
111
151
|
|
|
112
|
-
## [26.6.25]
|
|
152
|
+
## [26.6.25-alpha]
|
|
113
153
|
### Architecture Updates
|
|
114
154
|
- **Market Oracles & Smart Fallback Engine:** Decoupled Data Oracles (Market Intelligence) from Transaction Routers (DeFi Aggregators) into a dedicated `marketConfigManager.ts`. Upgraded the `analyzeMarket` and `getPrice` AI skills with an extreme dual-tier Smart Routing fallback architecture. Tier 1 dynamically intercepts and prioritizes premium endpoints (`pro-api.coingecko.com` & `pro-api.coinmarketcap.com`) if API keys are configured in the new Zero-Trust "Market Oracles" Dashboard. If unconfigured, Tier 2 gracefully cascades to CoinGecko Public, CoinMarketCap Public, and finally DexScreener, ensuring robust, error-free token intelligence discovery even for obscure unlisted memecoins.
|
|
115
155
|
- **Extensible DeFi Liquidity-Routing Runtime (Meta-Aggregator v2):** Replaced hardcoded aggregator scripts with a highly modular `DefiAggregatorProvider` interface. Introduced an IoC registry (`AggregatorRegistry`) with Auto-Discovery for loading providers (1inch, 0x, Relay, LIFI, KyberSwap, ArbitrumBridge, OpBridge).
|
|
@@ -119,7 +159,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
119
159
|
- **Inversion of Control Plugin System:** Completely overhauled the agent execution architecture (`web3Agent.ts` and `osAgent.ts`) from a static, hardcoded `switch-case` paradigm to a dynamic `PluginManager` architecture. Successfully migrated over 30+ disparate skills into 8 distinct modular plugins (`Web3DefiPlugin`, `SystemCorePlugin`, `GoogleWorkspacePlugin`, etc.). This major refactoring dramatically improves the Developer Experience (DX) by allowing third-party developers to inject new capabilities seamlessly without modifying the core agent brains, while maintaining Zero-Trust Local Execution boundaries.
|
|
120
160
|
- **Zero-Dependency Gemini Engine:** Completely removed the `@google/genai` SDK and its heavy dependency tree (`protobufjs`, `google-auth-library`, `node-fetch`, etc.) in favor of a zero-dependency, native `fetch` REST implementation. This architectural refactor definitively eradicates both the `npm warn allow-scripts` security warning and the deprecated `node-domexception` warning during global installations, resulting in a cleaner, faster, and more secure dependency footprint.
|
|
121
161
|
|
|
122
|
-
## [26.6.24]
|
|
162
|
+
## [26.6.24-alpha]
|
|
123
163
|
### Features & Architectural Upgrades
|
|
124
164
|
- **Base Sepolia Registry Migration:** Successfully deployed and verified the `NyxoraAgentRegistry` smart contract on the Base Sepolia network. Shifted the global On-Chain Kill-Switch architecture from Arbitrum to Base. Synchronized all local Gateway configurations and VitePress documentation.
|
|
125
165
|
- **Physical Tri-Core Agent Architecture:** Radically restructured the monolithic `reasoning.ts` engine into three physically isolated files (`reasoning.ts`, `web3Agent.ts`, and `osAgent.ts`). Implemented a Facade Router pattern in `reasoning.ts` to intelligently route user intents without breaking external API contracts (`server.ts`, `telegram.ts`, `cli.ts`). This guarantees True Capability Isolation where the Web3 Agent is physically incapable of accessing OS tools, and completely eliminates context and tool bleeding between domains.
|
|
@@ -138,7 +178,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
138
178
|
- **Doctor CLI Port & UDS Calibration:** Updated the `nyxora doctor` utility to properly identify Port 3000 as `Core/Gateway API` and Port 3001 as `Policy Engine Fallback`. Additionally injected a UDS health-check module that proactively scans for and warns users about stale/zombie sockets (`/tmp/nyxora-*.sock`).
|
|
139
179
|
- **Documentation Restructure:** Synchronized the VitePress technical documentation (`index.md`, `architecture.md`, `troubleshooting.md`) to accurately reflect the new Unix Domain Sockets (UDS) architecture, removing outdated references to Port 3001. Relocated `bridge-routing.md` to `docs/guide/` and eliminated empty artifact folders.
|
|
140
180
|
|
|
141
|
-
## [26.6.23]
|
|
181
|
+
## [26.6.23-alpha]
|
|
142
182
|
### Features & Architectural Upgrades
|
|
143
183
|
- **Hybrid API Gateway (HTTP + WebSocket):** Upgraded the core API Gateway (`server.ts`) to operate on a dual HTTP and WebSocket architecture. UI clients now initiate asynchronous tasks via instant HTTP `POST /api/v1/trade` and receive real-time, zero-latency streaming terminal logs via WebSocket (`ws://.../ws/stream?traceId=...`). This definitively eliminates 504 Gateway Timeouts during heavy Web3 transaction analysis.
|
|
144
184
|
- **WebSocket Anti-Race Condition (Ring Buffer):** Engineered a 5-second, `traceId`-bound memory Ring Buffer inside the new `WebSocketManager`. This acts as a critical guardrail, caching high-speed logs emitted by the Core Runtime and instantly flushing them to the UI upon WS handshake, guaranteeing zero dropped logs during the microsecond gap between HTTP response and WS connection.
|
|
@@ -146,11 +186,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
146
186
|
- **Zero-Copy MessagePack Serialization:** Eliminated Node.js Event Loop blocking caused by massive `JSON.stringify()` operations. The UDS IPC pipeline natively encodes and decodes binary payloads at memory speed.
|
|
147
187
|
- **L3 Web Search Failover (Free Built-in Search):** Reintegrated `duck-duck-scrape` as a native Layer-3 fallback safety net for the `searchWeb` skill. The CLI `nyxora setup` now offers "DuckDuckGo (Free & Built-in)" as a zero-configuration provider, enabling rapid onboarding without API keys while acting as an automatic fallback if Tavily/Brave premium keys hit rate limits (HTTP 429).
|
|
148
188
|
|
|
149
|
-
## [26.6.22-1]
|
|
189
|
+
## [26.6.22-1-alpha]
|
|
150
190
|
### Bug Fixes
|
|
151
191
|
- **Hotfix: Missing Core Dependency:** Patched a severe global installation crash by explicitly injecting the missing `node-cron` module into the root `package.json` dependency tree. The AI Scheduler background daemon now correctly resolves its dependencies in global NPM environments, fully restoring the `nyxora dashboard` routing capability that was collateral damage from the crash.
|
|
152
192
|
|
|
153
|
-
## [26.6.22]
|
|
193
|
+
## [26.6.22-alpha]
|
|
154
194
|
### Features & Enhancements
|
|
155
195
|
- **Intelligent First-Time Onboarding:** Introduced a dynamic AI onboarding flow. When a user installs Nyxora for the first time, the `reasoning.ts` engine automatically detects the absence of identity files and enforces an Onboarding Mode. The AI will warmly welcome the user and refuse to execute any commands until it collects 4 essential variables: User's Name, AI's Name, User's Hobbies/Job, and AI's Persona.
|
|
156
196
|
- **Persistent Tracker State (Cost & Logs):** Engineered a persistent state caching mechanism for the core `tracker.ts` gateway metric system. Real-time cost, token counts, and terminal Gateway Logs are now asynchronously serialized to disk (`tracker.json`). This ensures runtime state is securely preserved across daemon reboots (`nyxora restart`). Additionally, hooked into the `nyxora stop` lifecycle event to physically purge the cache file, ensuring clean state wipes when the daemon is intentionally shut down.
|
|
@@ -168,7 +208,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
168
208
|
- **Search Chat & Session Filter:** Deployed a new "Search Chat" navigation menu inside the Dashboard. Users can now instantly search and filter their entire historical chat session list in real-time by title, jumping straight back into specific conversations with a single click.
|
|
169
209
|
- **Dynamic Theme Integration (Light, Dark, & Auto Mode):** Added full Light Mode, Dark Mode, and Auto (System Default) theme options to the dashboard, complete with dynamic color palettes and improved contrast for terminal logs.
|
|
170
210
|
|
|
171
|
-
## [26.6.21]
|
|
211
|
+
## [26.6.21-alpha]
|
|
172
212
|
### Security Fixes
|
|
173
213
|
- **Disabled Skill Execution Blocker:** Patched a critical vulnerability where the AI agent (e.g. Gemini) could hallucinate and illegally execute Web3 skills that were explicitly toggled off by the user. The `reasoning.ts` engine now actively intercepts and blocks unauthorized skill calls before execution.
|
|
174
214
|
- **On-Chain Parameter Safeguards:** Implemented strict `undefined` parameter validation across all 10 On-Chain skills (Transfer, Swap, Bridge, Mint NFT, Custom Tx, DeFi Yield/Supply, etc.). This prevents the Node.js process from crashing with `TypeError` when the AI provides incomplete or hallucinated JSON tool payloads.
|
|
@@ -181,7 +221,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
181
221
|
- **Interactive CLI Chat (`nyxora chat`):** Introduced a new terminal-based interactive chat interface. Users who prefer the command line can now converse directly with the Nyxora background daemon using `@clack/prompts` without needing to open the web dashboard. Features graceful background-safe exits.
|
|
182
222
|
- **Dynamic Dashboard Status Metrics:** Obliterated hardcoded mock values from the Dashboard's Overview page. The Gateway API (`/api/stats`) has been redesigned to actively calculate the total number of loaded Web3 and OS skills in real-time. Additionally, the Memory Storage directory indicator is now dynamically injected based on the user's OS architecture (e.g., `~/.nyxora/data/memory.db`).
|
|
183
223
|
|
|
184
|
-
## [26.6.20]
|
|
224
|
+
## [26.6.20-alpha]
|
|
185
225
|
### Features & Enhancements
|
|
186
226
|
- **Unified Portfolio Scanner Redesign:** Completely overhauled the `Portfolio.tsx` Dashboard UI to provide a denser, more data-rich aesthetic. Token balances across all chains are now aggregated, flattened, and sorted globally by total USD value, replacing the old tabbed per-chain layout.
|
|
187
227
|
- **Dynamic 24h Percentage Change:** Upgraded the core backend (`server.ts`) to actively fetch and cache 24-hour percentage price changes (`h24`) via the DexScreener API. The frontend now dynamically calculates and displays a live, weighted average portfolio change instead of a hardcoded placeholder.
|
|
@@ -193,23 +233,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
193
233
|
- **Full-Width Fluid Dashboard Containers:** Stripped legacy `max-width` hard-limiters (1200px) from the root `overview.css` and all primary sidebar panels (`Overview`, `Portfolio`, `Web3 Skills`, `OS Skills`, `Settings`, `RPC`, `DeFi`). The dashboard now natively spans the full horizontal resolution of any monitor edge-to-edge.
|
|
194
234
|
- **Flexbox Overlap Patch:** Patched a responsive layout bug in the Portfolio header where long network names (e.g., "Base Sepolia (Testnet)") would physically overlap and bleed into the "Portfolio Scanner" title. Added proper `flexWrap: 'wrap'` and flexible gap spacing to guarantee clean degradation on smaller viewports.
|
|
195
235
|
|
|
196
|
-
## [26.6.19]
|
|
236
|
+
## [26.6.19-alpha]
|
|
197
237
|
### Bug Fixes
|
|
198
238
|
- **Dashboard Skill Toggle Sync:** Fixed a bug where disabling skills in the `setup` wizard (CLI) did not reflect on the web Dashboard UI. The wizard stored skill names in `camelCase`, but the core AI engine checked for `snake_case` definitions, bypassing the blacklist. A dictionary mapping was added to `setup.ts` to translate names correctly before saving to `disabled_skills.json`.
|
|
199
239
|
- **Third-Party LLM Provider Unblocking:** Removed a legacy, hardcoded restriction block in `reasoning.ts` that artificially rejected LLM providers other than OpenAI, Gemini, Ollama, and OpenRouter. Users can now seamlessly connect Groq, xAI (Grok), Mistral, and DeepSeek via the setup wizard, utilizing their native OpenAI SDK compatibility.
|
|
200
240
|
- **Google Workspace OAuth Callback Routing:** Fixed a critical bug in the core `server.ts` global authentication middleware where Express.js path mounting behavior implicitly stripped the `/api` prefix from `req.path`. This caused the Google OAuth callback whitelist exception to fail, resulting in an `Unauthorized: Invalid or missing token` error during dashboard login. The middleware now correctly utilizes `req.originalUrl` for accurate bypass verification.
|
|
201
241
|
|
|
202
242
|
|
|
203
|
-
## [26.6.18]
|
|
243
|
+
## [26.6.18-alpha]
|
|
204
244
|
### Bug Fixes & Build Pipeline
|
|
205
245
|
- **NPM Publish Recompilation Fix:** Fixed a critical bug in the NPM `prepare` hook where `npm publish` would skip compiling the core backend TypeScript files. This caused versions `v26.6.16` and `v26.6.17` to inadvertently ship with stale, uncompiled JavaScript `dist/` artifacts. The root `tsc` build step is now explicitly injected into the pre-publish hook to ensure the CLI uses the latest codebase.
|
|
206
246
|
|
|
207
|
-
## [26.6.17]
|
|
247
|
+
## [26.6.17-alpha]
|
|
208
248
|
### Bug Fixes
|
|
209
249
|
- **CLI Setup API Key Overwrite Bug:** Fixed a race condition during `nyxora setup` where newly entered LLM API keys were successfully written to the config file but instantly overwritten by a stale in-memory config save sequence.
|
|
210
250
|
- **Removed Zombie `installSkill` CLI Option:** Removed the legacy `installSkill` selection option from the CLI setup wizard to correctly align with the new fully-native, sandbox-free architecture (introduced in v26.6.15).
|
|
211
251
|
|
|
212
|
-
## [26.6.16]
|
|
252
|
+
## [26.6.16-alpha]
|
|
213
253
|
### Bug Fixes & Stability
|
|
214
254
|
- **Global `nyxora start` `ENOENT` Crash Fix:** Resolved a critical bug where launching the daemon on a completely fresh install (or after deleting `~/.nyxora`) would instantly crash due to missing nested log and auth directories. The CLI now gracefully auto-creates all deeply nested required structures before attempting to access them.
|
|
215
255
|
- **Node.js ESM Compilation Crash (`launcher.ts`):** Stripped out legacy `import.meta.url` syntax in favor of bulletproof CommonJS `__filename` globals. This permanently eliminates the fatal `exports is not defined` parsing crash on newer Node.js versions running compiled production builds.
|
|
@@ -217,7 +257,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
217
257
|
- **NPM Monorepo Resolution Fix:** Stripped the hardcoded `.ts` extension from `safeLogger` imports to prevent `MODULE_NOT_FOUND` errors on compiled production artifacts.
|
|
218
258
|
- **`mcp-server` Publishing:** Wired the `mcp-server` into the root compilation step and included its `dist/` artifacts in the `files` array, ensuring the Universal Bridge is fully operational out-of-the-box for NPM installations.
|
|
219
259
|
|
|
220
|
-
## [26.6.15]
|
|
260
|
+
## [26.6.15-alpha]
|
|
221
261
|
### Security & Architecture
|
|
222
262
|
- **Policy Engine Hard-coded Firewall**: Extracted security constraints (`whitelist_only`, `max_usd_per_tx`, `require_approval`) from `config.yaml` and implemented a fully decoupled backend `policy.yaml` evaluation engine running on a secure local port (3001). This solidifies the Zero-Trust Architecture by guaranteeing rules are enforced prior to cryptographic signing.
|
|
223
263
|
- **Unified NLP Semantic Rules**: Migrated `security_policy.md` directly into the `policy.yaml` state (`custom_llm_rules`). AI native skills (`updateSecurityPolicy`) now dynamically append human-language constraints to the centralized policy module, providing a single source of truth for both hard-coded and semantic safeguards.
|
|
@@ -231,7 +271,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
231
271
|
- **Rapid Graceful Shutdown**: Refactored the core gateway server shutdown sequence to aggressively call `server.closeAllConnections()`. This eliminates the 10-second hang caused by persistent UI polling / SSE connections when stopping the daemon via `CTRL+C`.
|
|
232
272
|
- **Market Analysis Cascade Architecture**: Rewired the AI `analyzeMarket` capability in `reasoning.ts` to correctly route through the advanced `analyzeMarketEngine`. This strictly enforces the 3-Tier Cascading Fallback logic (CoinMarketCap CoinGecko DexScreener), maximizing market data resilience against API rate-limits.
|
|
233
273
|
|
|
234
|
-
## [26.6.14]
|
|
274
|
+
## [26.6.14-alpha]
|
|
235
275
|
### Security & Privacy
|
|
236
276
|
- **Isolated Private RPC Vault**: Extracted `web3.rpc_urls` from the main `config.yaml` and moved them into a highly isolated `~/.nyxora/config/rpc_key.yaml` file. This guarantees zero risk of leaking Premium Node Endpoints (Alchemy, Infura) when sharing config files or prompts.
|
|
237
277
|
- **Auto-Migration Engine**: Implemented a background migration routine (`parser.ts`) that automatically detects legacy RPC setups and seamlessly extracts, transfers, and wipes them from `config.yaml` during the next daemon boot without data loss.
|
|
@@ -242,7 +282,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
242
282
|
- **DeFi Configuration Refactor**: Overhauled the "DeFi Configuration" interface layout to utilize a clean, elegant horizontal list design, achieving absolute visual consistency with the new RPC module.
|
|
243
283
|
- **Clean Daemon Boot (NPM Suppression)**: Refactored `launcher.ts` and `package.json` to directly invoke local binaries (`./node_modules/.bin/ts-node`), completely bypassing `npx`. This definitively eliminates the annoying `npm warn allow-scripts` console spam during the multi-service boot sequence.
|
|
244
284
|
|
|
245
|
-
## [26.6.13]
|
|
285
|
+
## [26.6.13-alpha]
|
|
246
286
|
### Bug Fixes & UX Hardening
|
|
247
287
|
- **Telegram Reasoning Leak**: Implemented a strict Regex pre-processor within the Telegram `formatToTelegramHTML` pipeline to silently intercept and annihilate raw `<think>` and `<thought>` Chain of Thought XML tags. This guarantees a clean, distraction-free user experience when integrating reasoning models (like DeepSeek R1) via the Telegram Bot interface.
|
|
248
288
|
- **Zero-LLM Fast Return (Instant UI Popups)**: Re-enabled the `fastReturnTools` bypass architecture for all transactional Web3 skills (transfer, swap, bridge, etc.). This optimization skips the redundant secondary LLM summarization phase, cutting transaction generation latency by 3-10 seconds and delivering the UI Approve/Reject popup instantly upon tool completion.
|
|
@@ -255,7 +295,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
255
295
|
- **Universal OP Stack Native Bridge**: Implemented a dedicated `nativeOpBridge.ts` module hardcoded with strictly validated (EIP-55 fully lowercased) `L1StandardBridgeProxy` addresses for both Base Sepolia and OP Sepolia. Nyxora can now encode and simulate native OP Stack portal deposits without relying on external APIs.
|
|
256
296
|
- **Testnet Meta-Aggregator Hierarchy**: Overhauled the logic inside `aggregatorTestnet.ts`. The router now intelligently prioritizes the `nativeOpBridge` for all OP Stack chains, gracefully degrading to `fetchRelayTestnet` for Base and `fetchArbitrumBridgeTestnet` for Arbitrum exclusively.
|
|
257
297
|
|
|
258
|
-
## [26.6.12]
|
|
298
|
+
## [26.6.12-alpha]
|
|
259
299
|
### Security & Web3 Routing
|
|
260
300
|
- **Relay API Mainnet Fallback**: Fixed a critical routing bug for native ETH. The aggregator now precisely translates the native token identifier (`0xeeee...`) into the Zero Address (`0x0000...`) exclusively when communicating with Relay's cross-chain API. This completely neutralizes "Invalid input currency" rejections on mainnet bridges.
|
|
261
301
|
|
|
@@ -272,15 +312,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
272
312
|
- **Clean Agent Reasoning UI**: Restructured the frontend message rendering (`App.tsx`) to completely isolate and strip out raw `<think>` blocks from the AI's internal Chain of Thought. The user interface is now 100% focused on final outputs, keeping the conversation view clean.
|
|
273
313
|
- **Strict Think Block Escaping**: Hardened the system prompt in `reasoning.ts` with a new Anti-Hallucination rule. The AI is now strictly forbidden from injecting conversational text or final answers inside the `<think>` block, completely neutralizing the bug where the UI appeared to be "stuck" due to missing output.
|
|
274
314
|
|
|
275
|
-
## [26.6.11-2]
|
|
315
|
+
## [26.6.11-2-alpha]
|
|
276
316
|
### Hotfixes
|
|
277
317
|
- **Monorepo Dependency Resolver**: Fixed an NPM workspace bug by elevating internal package dependencies (`playwright`, `twitter-api-v2`, `@notionhq/client`) directly to the root `package.json`, completely resolving `Error: Cannot find module` crashes during daemon boot.
|
|
278
318
|
|
|
279
|
-
## [26.6.11-1]
|
|
319
|
+
## [26.6.11-1-alpha]
|
|
280
320
|
### Hotfixes
|
|
281
321
|
- **Global Installation Path Fix**: Included the compiled `dist/` directory into the NPM tarball, preventing `ts-node` fallback crashes during `nyxora start`.
|
|
282
322
|
|
|
283
|
-
## [26.6.11]
|
|
323
|
+
## [26.6.11-alpha]
|
|
284
324
|
### Security
|
|
285
325
|
- **Foundry Registry Migration**: Successfully migrated the `NyxoraAgentRegistry` Arbitrum Smart Contract from Hardhat to Foundry, stripping out hundreds of vulnerable NPM dependencies and drastically reducing the attack surface.
|
|
286
326
|
|
|
@@ -304,7 +344,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
304
344
|
- **DeFi Keys (BYOK) Security**: Added a unified `defiConfigManager.ts` securely saving API Keys in `~/.nyxora/defi_keys.yaml` to prevent leaks. Integrated a Dashboard UI panel with `IS_SET` masking so sensitive keys never return to the browser frontend. Removed all insecure `process.env` dependencies.
|
|
305
345
|
- **Unified Chain Registry**: Consolidated all supported Mainnet and Testnet network IDs into a single `chains.ts` registry, completely eliminating hardcoded chain bugs across the Dashboard UI and CLI logic.
|
|
306
346
|
|
|
307
|
-
## [26.6.10] - 2026-06-09
|
|
347
|
+
## [26.6.10-alpha] - 2026-06-09
|
|
308
348
|
|
|
309
349
|
### The DeFi Optimization Update
|
|
310
350
|
- **DeFi Lending Engine**: Integrated native Aave V3 support across all EVM chains. The AI can now autonomously fetch dynamic `Pool` addresses via `PoolAddressesProvider` and securely draft `supply` payloads to earn yield on idle assets.
|
|
@@ -323,7 +363,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
323
363
|
- **Persistent Background Reflection**: Eliminated static interval timers. The Reflection Engine is now seamlessly triggered via 3 infallible hooks: a 3-minute Idle Timer, an N-Message threshold (every 5 messages), and a `SIGTERM` Graceful Shutdown hook, ensuring resilient memory retention across daemon lifecycles.
|
|
324
364
|
- **Real-Time Memory Log Dashboard**: Exposed a robust `/api/memory` CRUD endpoint and integrated a sleek "Memory Log" panel directly into the Web Dashboard Overview tab. Users can now audit, review confidence scores, and forcefully delete false observations in real-time with zero state desynchronization.
|
|
325
365
|
|
|
326
|
-
## [26.6.9]
|
|
366
|
+
## [26.6.9-alpha]
|
|
327
367
|
### Security & UX Hardening
|
|
328
368
|
- **Zero-Trust Auto-Lock (Passwordless)**: Implemented a robust idle timeout mechanism in the React Dashboard with an elegant glassmorphism blur overlay. The dashboard securely locks after periods of inactivity, requiring the user to authorize unlock directly via the CLI (`nyxora unlock`) to prevent unauthorized local access.
|
|
329
369
|
- **Approval Replay Protection (Nonce Guard)**: Hardened the `transactionManager` to cryptographically sign all pending transaction payloads with a randomized 16-byte Nonce. The `/api/transactions/:id/approve` endpoint now strictly enforces Nonce matching and immediately marks it as `used_` upon first validation, completely eliminating double-spending and Replay Attack vectors.
|
|
@@ -335,7 +375,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
335
375
|
- **Robust Path Resolution**: Eliminated hardcoded `process.cwd()` dependencies across the Gateway, Dashboard, and Plugin Manager. The CLI now utilizes robust absolute `__dirname` and `getAppDir()` traversal, guaranteeing the Dashboard UI and External Skills load flawlessly regardless of where the global CLI command is executed from.
|
|
336
376
|
|
|
337
377
|
|
|
338
|
-
## [26.6.8]
|
|
378
|
+
## [26.6.8-alpha]
|
|
339
379
|
### Enterprise Features & Web3 Enhancements
|
|
340
380
|
- **Zero-Downtime Directory Migration**: Restructured the root `~/.nyxora` local data directory into a strict `config/`, `data/`, `auth/`, and `run/` subdirectory architecture. Implemented a Lazy Auto-Migration Engine (`getPath()`) that seamlessly relocates legacy files to their new secure zones instantly upon access, ensuring zero-downtime and zero-data-loss upgrades for existing users.
|
|
341
381
|
### Security & UX Updates
|
|
@@ -348,7 +388,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
348
388
|
- **Docker Multi-Stage Build**: Radically refactored `Dockerfile` to a Multi-Stage architecture. The production image now exclusively installs runtime dependencies (`--omit=dev`) and leaves behind heavy build tools (`python3`, `make`, `g++`), dramatically shrinking the final container image size.
|
|
349
389
|
- **Docker Security Patch**: Hardened `.dockerignore` to explicitly block local keystores (`keystore.json`), persistent memory (`memory.db`), and local credentials from accidentally leaking into Docker image layers during local builds.
|
|
350
390
|
|
|
351
|
-
## [26.6.7]
|
|
391
|
+
## [26.6.7-alpha]
|
|
352
392
|
### Enterprise Features & Web3 Enhancements
|
|
353
393
|
- **Enterprise Portfolio Scanner**: Integrated a fully decentralized, real-time Dashboard UI (Nord Theme) to scan all native and ERC-20 token balances across 8 EVM chains natively, without relying on centralized third-party APIs.
|
|
354
394
|
- **Real-Time USD Valuation**: Integrated DexScreener API into the Portfolio Scanner backend to actively compute and display USD portfolio values in real-time. Features an adaptive 2-minute memory cache system to ensure complete immunity against API rate-limits and eliminate LLM token consumption.
|
|
@@ -370,7 +410,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
370
410
|
- **NPM Monorepo Build Fix**: Fixed the `packages/core` workspace `package.json` to correctly include the `"build": "tsc"` script and aligned its internal versioning (`v26.6.7`). This resolves the NPM workspace lifecycle crash during global build triggers.
|
|
371
411
|
- **NPM Optimization**: Added official keywords (`web3`, `ai`, `agent`, `crypto`, `mcp`, `automation`, `defi`, `zero-trust`) to the root `package.json` to significantly improve Nyxora's discoverability and SEO on the NPM Registry.
|
|
372
412
|
|
|
373
|
-
## [26.6.6]
|
|
413
|
+
## [26.6.6-alpha]
|
|
374
414
|
### Enterprise Stability Upgrades
|
|
375
415
|
- **Strict LLM Output Validation**: Added robust try-catch parsing for LLM tool arguments in `reasoning.ts`. If the AI outputs malformed JSON, the error is fed back into the reasoning loop, allowing the model to autonomously self-correct without crashing the agent pipeline.
|
|
376
416
|
- **Transaction Simulation (Dry-Run)**: Integrated `publicClient.estimateGas` in the Signer Vault before broadcasting transactions. This ensures all Web3 transactions are simulated at the node level, preventing users from wasting gas fees on reverted transactions (e.g., due to insufficient slippage or balance).
|
|
@@ -411,11 +451,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
411
451
|
### Core AI Engine
|
|
412
452
|
- **Strict Language Matching**: Optimized CRITICAL RULE 2 in the System Prompt. The AI now completely ignores historical chat language context and strictly matches the language of the user's latest prompt.
|
|
413
453
|
|
|
414
|
-
## [26.6.5] - 2026-06-04 (Hotfix Patch)
|
|
454
|
+
## [26.6.5-alpha] - 2026-06-04 (Hotfix Patch)
|
|
415
455
|
### Fixed
|
|
416
456
|
- **NPM Monorepo Resolution:** Synced `@inquirer/search` and `duck-duck-scrape` to root `package.json` to prevent `MODULE_NOT_FOUND` and `ERR_CONNECTION_REFUSED` on global installations.
|
|
417
457
|
|
|
418
|
-
## [26.6.4]
|
|
458
|
+
## [26.6.4-alpha]
|
|
419
459
|
|
|
420
460
|
### AI Engine Optimizations
|
|
421
461
|
- **Semantic Keyword Router (Zero-Latency)**: Restructured the `reasoning.ts` pipeline to dynamically group tools into specific clusters (`WEB3`, `SYSTEM`, `GOOGLE`). The engine now intercepts the user's prompt using highly optimized Regex keyword-matching. This eliminates "Context Bloat" by only injecting relevant tools into the LLM payload, dramatically increasing LLM responsiveness and minimizing API token consumption.
|
|
@@ -435,7 +475,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
435
475
|
|
|
436
476
|
### UI & Developer Experience
|
|
437
477
|
- **CLI Memory Purge**: Introduced a new developer utility command: `nyxora clear`. It instantly and atomically resets the AI's short-term/long-term memory SQLite database. Includes a mandatory `--force` flag safeguard to prevent accidental data destruction.
|
|
438
|
-
## [1.7.3]
|
|
478
|
+
## [1.7.3-alpha]
|
|
439
479
|
|
|
440
480
|
### Web3 Routing & Integrations
|
|
441
481
|
- **Multi-Router Selection (DeFi)**: Added a dynamic Router dropdown to the Dashboard UI, allowing users to forcefully route transactions through specific protocols natively. Supported routers include `1inch`, `CowSwap (MEV-Protected)`, `Li.Fi`, `Relay`, `Uniswap V2`, `Uniswap V3`, and `PancakeSwap`. This integration heavily relies on deep aggregator proxying (bypassing the need for complex V2/V3 ABI calldata overhead) to ensure 100% smooth, anti-fail execution without requiring additional API keys.
|
|
@@ -443,7 +483,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
443
483
|
### Security & Polish
|
|
444
484
|
- **Dashboard:** Redacted the sensitive Nyxora Auth Token from appearing in the Gateway Logs component on the frontend to prevent visual leakage during screen sharing or screenshots.
|
|
445
485
|
|
|
446
|
-
## [1.7.2]
|
|
486
|
+
## [1.7.2-alpha]
|
|
447
487
|
|
|
448
488
|
### UI/UX Enhancements
|
|
449
489
|
- **Google Workspace Logout**: Users can now easily disconnect their Google Workspace accounts directly from the Dashboard (OS Skills tab). This triggers a secure token purge from both the OS Keyring and local storage, ensuring privacy and seamless account switching.
|
|
@@ -456,7 +496,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
456
496
|
- **Legal Infrastructure**: Added standard `Privacy Policy` (`privacy.md`) and `Terms of Service` (`terms.md`) to the VitePress documentation to prepare for official Google OAuth App Verification.
|
|
457
497
|
- **Enterprise Roadmap Evolution**: Updated the documentation roadmap to reflect our "Nyxora Next Update" vision, outlining future plans for a Rust-Native Signer, Idempotent Policy Engine, Multi-VM Architecture, and Google App Verification.
|
|
458
498
|
|
|
459
|
-
## [1.7.1]
|
|
499
|
+
## [1.7.1-alpha]
|
|
460
500
|
|
|
461
501
|
### CLI Enhancements
|
|
462
502
|
- **Global Version Checker**: Implemented native version checking for the global CLI manager. Users can now run `nyxora -v`, `nyxora --version`, or `nyxora version` to instantly check their installed daemon version without starting the application.
|
|
@@ -471,7 +511,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
471
511
|
- **Dual-Engine Web Search (L3 Failover)**: Completely removed the fragile `duck-duck-scrape` dependency. The `search_web` skill is now powered by a robust L3 Auto-Failover architecture. Users can configure enterprise-grade search providers (Tavily or Brave). If the primary provider hits a rate limit (429) or invalid key (401/403), Nyxora seamlessly falls back to the secondary provider, and ultimately to a Decentralized SearXNG Mesh as a final safety net, guaranteeing 100% uptime.
|
|
472
512
|
|
|
473
513
|
|
|
474
|
-
## [1.7.0]
|
|
514
|
+
## [1.7.0-alpha]
|
|
475
515
|
|
|
476
516
|
### Bug Fixes & Optimizations
|
|
477
517
|
- **Time Sync Hallucination**: Fixed a critical issue where the AI hallucinates the current date and time. Nyxora now dynamically injects the host OS's exact `new Date().toLocaleString()` into the system prompt upon every execution.
|
|
@@ -483,7 +523,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
483
523
|
- **Dynamic Tx Formatter (Tap-to-Copy)**: The post-transaction approval message is now bilingual (auto-detecting English/Indonesian from chat history). Transaction Hashes and wallet addresses are wrapped in `<code>` tags for seamless tap-to-copy UX on mobile devices.
|
|
484
524
|
- **CLI Setup Typography**: Updated outdated CLI prompts that falsely referenced legacy `AES-256-GCM` encryption. The CLI now correctly informs the user that Private Keys are securely locked inside the OS Native Keyring Vault.
|
|
485
525
|
|
|
486
|
-
## [1.6.7]
|
|
526
|
+
## [1.6.7-alpha]
|
|
487
527
|
|
|
488
528
|
### UI/UX
|
|
489
529
|
- **New Nyxora Brand Logo**: Replaced the standard dashboard `Bot` icon with a native, 100% transparent SVG component of the Nyxora Cosmic Star.
|
|
@@ -507,7 +547,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
507
547
|
- **Security Upgrade (OS Keyring)**: Completely migrated OAuth token storage to the OS-Native Keyring Vault. Google Refresh Tokens are now securely locked and encrypted by the host OS, preventing plaintext credential theft.
|
|
508
548
|
- **Performance Optimization**: Scrapped the heavy `googleapis` dependency in favor of lightweight Native `fetch`, resulting in zero NPM install warnings, smaller footprint, and faster execution.
|
|
509
549
|
- **Bugfix**: Resolved TypeScript compilation errors (TS2349) related to the `pdf-parse` ESM dependency.
|
|
510
|
-
## [1.6.6]
|
|
550
|
+
## [1.6.6-alpha]
|
|
511
551
|
|
|
512
552
|
### Hotfix: Global Monorepo Dependencies
|
|
513
553
|
|
|
@@ -517,7 +557,7 @@ This release patches a critical bug where global installations via `npm install
|
|
|
517
557
|
- **Dependency Hoisting Fix**: Explicitly bundled essential runtime modules (isolated-vm, telegraf, @modelcontextprotocol/sdk) into the root package.json to support monolithic publishing.
|
|
518
558
|
- **Zero-Crash Boot**: Resolves the MODULE_NOT_FOUND fatal error for isolated-vm when starting the daemon after a clean global install.
|
|
519
559
|
- **Dashboard Stability**: Ensures the background API server connects flawlessly to the React Dashboard without encountering Connection Refused.
|
|
520
|
-
## [1.6.5]
|
|
560
|
+
## [1.6.5-alpha]
|
|
521
561
|
|
|
522
562
|
### The Universal Bridge (MCP Integration)
|
|
523
563
|
|
|
@@ -527,7 +567,7 @@ Nyxora now natively supports the Model Context Protocol (MCP). This massive upgr
|
|
|
527
567
|
- **StdioServerTransport**: Deep integration allowing Claude Desktop to securely spawn Nyxora as a child process.
|
|
528
568
|
- **Universal Bridge**: Exposes Nyxora's core crypto actions (swap, transfer, market analysis) as standard MCP Tools.
|
|
529
569
|
- **Enterprise Security**: All external MCP commands are strictly routed through Nyxora's battle-tested Policy Engine, ensuring no unauthorized transactions occur.
|
|
530
|
-
## [1.6.4]
|
|
570
|
+
## [1.6.4-alpha]
|
|
531
571
|
|
|
532
572
|
### Added
|
|
533
573
|
- **Node.js Native Database Engine**: Migrated the core `logger.ts` memory subsystem to use the built-in `node:sqlite` engine (Node 22+), maintaining ultra-fast 100% synchronous operations while dramatically reducing dependency bloat.
|
|
@@ -536,7 +576,7 @@ Nyxora now natively supports the Model Context Protocol (MCP). This massive upgr
|
|
|
536
576
|
### Removed
|
|
537
577
|
- `better-sqlite3` and `keytar` dependencies entirely removed from the monorepo architecture.
|
|
538
578
|
|
|
539
|
-
## [1.6.3]
|
|
579
|
+
## [1.6.3-alpha]
|
|
540
580
|
|
|
541
581
|
### Added
|
|
542
582
|
- Implemented **Zero-Click Multi-Session** for instantaneous chat creation and switching.
|
|
@@ -550,7 +590,7 @@ Nyxora now natively supports the Model Context Protocol (MCP). This massive upgr
|
|
|
550
590
|
### Fixed
|
|
551
591
|
- Resolved deeply-nested monorepo CI/CD deployment failures by isolating `package-lock.json` and mitigating peer-dependency conflicts.
|
|
552
592
|
|
|
553
|
-
## [1.4.5]
|
|
593
|
+
## [1.4.5-alpha]
|
|
554
594
|
|
|
555
595
|
### Fixed
|
|
556
596
|
- Re-rendered Architecture Workflow diagram as a solid-background PNG to fix dark mode visibility issues.
|
|
@@ -558,22 +598,22 @@ Nyxora now natively supports the Model Context Protocol (MCP). This massive upgr
|
|
|
558
598
|
- Added `repository` field in `package.json` for proper GitHub link resolution on NPMJS.
|
|
559
599
|
- Updated `README.md` to use the absolute raw GitHub image URL for universal rendering compatibility.
|
|
560
600
|
|
|
561
|
-
## [1.4.4]
|
|
601
|
+
## [1.4.4-alpha]
|
|
562
602
|
|
|
563
603
|
### Fixed
|
|
564
604
|
- Fixed Architecture Workflow diagram rendering issue on NPM by replacing the `mermaid` code block with a static SVG image.
|
|
565
605
|
|
|
566
|
-
## [1.4.3]
|
|
606
|
+
## [1.4.3-alpha]
|
|
567
607
|
|
|
568
608
|
### Changed
|
|
569
609
|
- Completely rewrote `README.md` (English) to follow the structured, security-first Web3-Ops template.
|
|
570
610
|
|
|
571
|
-
## [1.4.2]
|
|
611
|
+
## [1.4.2-alpha]
|
|
572
612
|
|
|
573
613
|
### Changed
|
|
574
614
|
- Updated `README.md` to highlight Web3-Ops capabilities (System Automation, NLP Security Policies, and Dynamic Plugins).
|
|
575
615
|
|
|
576
|
-
## [1.4.0]
|
|
616
|
+
## [1.4.0-alpha]
|
|
577
617
|
|
|
578
618
|
### Added
|
|
579
619
|
- **System Automation Capabilities**: Allow Nyxora to execute shell commands, read/write local files, and browse the web autonomously.
|
package/README.md
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
**Your Personal Web3 Assistant.**
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
[](#)
|
|
6
6
|
[](https://base.org/)
|
|
7
7
|
[](#)
|
|
8
8
|
[](https://opensource.org/licenses/MIT)
|
|
9
9
|
[](#️-advanced-security-threat-model)
|
|
10
10
|
[](#️-advanced-security-threat-model)
|
|
11
11
|
[](#️-advanced-security-threat-model)
|
|
12
|
+
[](https://makeapullrequest.com)
|
|
12
13
|
|
|
13
14
|
Nyxora is a **secure, non-custodial runtime infrastructure for autonomous onchain agents** built with a robust Monorepo architecture (Node.js & React). Designed for autonomous workflows with a premium Utility-Centric dark-themed UI and strict client-side key isolation.
|
|
14
15
|
|
|
@@ -94,12 +95,13 @@ It operates under a **Zero-Trust, Defense-in-Depth Cryptographically Bound Human
|
|
|
94
95
|
* **System Automation & Full OS Access**: Instruct the agent to read/write local files, run terminal commands, and browse the web natively.
|
|
95
96
|
* **Automated Excel Reporting**: Instruct the agent to compile its Web3 portfolio or transaction history findings and autonomously generate beautiful `.xlsx` spreadsheet reports saved directly to your local machine.
|
|
96
97
|
* **Unstoppable Synergy**: Combine both engines with a single prompt. Example: *"Read the latest presale token email from my Gmail, automatically set a Take Profit limit order on Uniswap, and log the execution result to my Google Sheets."*
|
|
98
|
+
* **Autonomous Skill Synthesizing (`skillExtractor.ts`)**: Instruct the AI to learn a new workflow, and it will autonomously write the Node.js execution logic and schema, saving it locally as a custom skill following the **`agentskills.io`** standard!
|
|
97
99
|
|
|
98
100
|
### 🧠 The Masterpiece Memory Architecture
|
|
99
101
|
* **4-Layer Air-Gapped Vault**: Nyxora features a god-tier memory system that completely isolates conversational habits from the OS Keyring. The AI can dynamically learn your behaviors without ever having physical read-paths to your private keys.
|
|
100
102
|
* **Hard-Coded Anti-Injection Shield**: We enforce a Zero-Trust memory paradigm. Before any user habit is saved to the local SQLite database, it must pass a strict RegExp-based validation layer that autonomously annihilates Private Keys, BIP-39 Seed Phrases, and Prompt Injection attempts.
|
|
103
|
+
* **Dialectic User Modeling (Honcho Daemon)**: Nyxora continuously runs an asynchronous background daemon that quietly audits your conversational history. It extracts your behavioral traits, trading style, and risk tolerance, saving them securely to `episodic.db` and injecting them dynamically into the AI's reasoning engine.
|
|
101
104
|
* **Smart Suggestion Engine**: Nyxora actively queries its Layer-2 Episodic Database to seamlessly autocomplete your repetitive Web3 routines. If you always swap on Arbitrum using USDC, the AI will proactively suggest it, slashing human-in-the-loop latency by up to 90%.
|
|
102
|
-
* **Persistent Background Reflection**: Empowered by background idle timers and message-count thresholds, Nyxora quietly transcribes your habits into a permanent profile while you step away from the keyboard, ensuring it never forgets your identity even after daemon reboots.
|
|
103
105
|
|
|
104
106
|
### AI & UI Customization
|
|
105
107
|
* **Zero-Trust Auto-Lock (Passwordless)**: A sleek glassmorphism blur overlay automatically locks the dashboard during inactivity. Unlocking requires physical local execution via the CLI (`nyxora unlock`), preventing unauthorized local access.
|
|
@@ -213,6 +215,16 @@ By downloading, installing, or using the Nyxora AI Agent, you agree to our assum
|
|
|
213
215
|
|
|
214
216
|
---
|
|
215
217
|
|
|
218
|
+
## 🤝 Contributing
|
|
219
|
+
|
|
220
|
+
We welcome community contributions! Whether you want to fix a bug, improve documentation, or build a whole new Web3 Plugin, we'd love to have your help.
|
|
221
|
+
|
|
222
|
+
Nyxora features an extensible **Plugin Architecture** that makes it incredibly easy to add new capabilities (like new DEXs, Oracles, or Chains) without modifying the core reasoning engine.
|
|
223
|
+
|
|
224
|
+
> **📖 [Read the Contribution Guidelines](CONTRIBUTING.md)** to get started!
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
216
228
|
## 📖 Official Documentation
|
|
217
229
|
|
|
218
230
|
For complete technical deep-dives into our Cryptographic Architecture, please visit our official VitePress Documentation Site!
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.honchoDaemon = exports.HonchoDaemon = void 0;
|
|
7
|
+
const parser_1 = require("../config/parser");
|
|
8
|
+
const llmUtils_1 = require("../utils/llmUtils");
|
|
9
|
+
const episodic_1 = require("../memory/episodic");
|
|
10
|
+
const reasoning_1 = require("./reasoning");
|
|
11
|
+
const picocolors_1 = __importDefault(require("picocolors"));
|
|
12
|
+
class HonchoDaemon {
|
|
13
|
+
isRunning = false;
|
|
14
|
+
intervalId = null;
|
|
15
|
+
INTERVAL_MS = 60 * 60 * 1000; // Run every hour
|
|
16
|
+
start() {
|
|
17
|
+
if (this.isRunning)
|
|
18
|
+
return;
|
|
19
|
+
this.isRunning = true;
|
|
20
|
+
// Initial run after 5 minutes
|
|
21
|
+
setTimeout(() => this.runAnalysis(), 5 * 60 * 1000);
|
|
22
|
+
// Scheduled runs
|
|
23
|
+
this.intervalId = setInterval(() => {
|
|
24
|
+
this.runAnalysis();
|
|
25
|
+
}, this.INTERVAL_MS);
|
|
26
|
+
console.log(picocolors_1.default.magenta('[Honcho] Dialectic User Modeling daemon started.'));
|
|
27
|
+
}
|
|
28
|
+
stop() {
|
|
29
|
+
if (this.intervalId) {
|
|
30
|
+
clearInterval(this.intervalId);
|
|
31
|
+
}
|
|
32
|
+
this.isRunning = false;
|
|
33
|
+
console.log(picocolors_1.default.magenta('[Honcho] Daemon stopped.'));
|
|
34
|
+
}
|
|
35
|
+
async runAnalysis() {
|
|
36
|
+
console.log(picocolors_1.default.magenta('[Honcho] Running dialectic user modeling...'));
|
|
37
|
+
const sessions = reasoning_1.logger.getSessions();
|
|
38
|
+
if (sessions.length === 0)
|
|
39
|
+
return;
|
|
40
|
+
const allHistory = reasoning_1.logger.getHistory(undefined, 100); // Get recent 100 messages
|
|
41
|
+
if (allHistory.length < 5)
|
|
42
|
+
return; // Not enough context
|
|
43
|
+
const config = (0, parser_1.loadConfig)();
|
|
44
|
+
const prompt = `You are Honcho, Nyxora's background Persona Auditor.
|
|
45
|
+
Your task is to analyze the user's recent chat history and extract long-term persona traits, preferences, or behavioral rules.
|
|
46
|
+
Focus ONLY on facts about the user. (e.g. "User prefers high-risk trades", "User is a developer", "User wants concise answers", "User hates memecoins").
|
|
47
|
+
|
|
48
|
+
Output your findings as a strict JSON array of strings. If nothing new is found, return [].
|
|
49
|
+
Example: ["User avoids Ethereum mainnet due to gas", "User prefers dark mode"]
|
|
50
|
+
|
|
51
|
+
Chat History:
|
|
52
|
+
${allHistory.map((m) => `[${m.role}] ${m.content}`).join('\n')}
|
|
53
|
+
`;
|
|
54
|
+
try {
|
|
55
|
+
const response = await (0, llmUtils_1.executeWithRetry)(async (client) => {
|
|
56
|
+
return await client.chat({
|
|
57
|
+
model: config.llm.model,
|
|
58
|
+
messages: [{ role: 'system', content: prompt }],
|
|
59
|
+
temperature: 0.1
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
let content = response.message.content || '[]';
|
|
63
|
+
// Clean markdown if any
|
|
64
|
+
content = content.replace(/\`\`\`json/g, '').replace(/\`\`\`/g, '').trim();
|
|
65
|
+
let traits = [];
|
|
66
|
+
try {
|
|
67
|
+
const parsed = JSON.parse(content);
|
|
68
|
+
if (Array.isArray(parsed)) {
|
|
69
|
+
traits = parsed;
|
|
70
|
+
}
|
|
71
|
+
else if (parsed.traits && Array.isArray(parsed.traits)) {
|
|
72
|
+
traits = parsed.traits;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
catch (e) {
|
|
76
|
+
console.error(picocolors_1.default.red('[Honcho] Failed to parse JSON traits'), content);
|
|
77
|
+
}
|
|
78
|
+
if (traits.length > 0) {
|
|
79
|
+
traits.forEach(trait => {
|
|
80
|
+
episodic_1.episodicDB.updatePersonaTrait(trait, 0.8, 'honcho');
|
|
81
|
+
console.log(picocolors_1.default.magenta(`[Honcho] Discovered new trait: ${trait}`));
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch (e) {
|
|
86
|
+
console.error(picocolors_1.default.red(`[Honcho] Analysis failed: ${e.message}`));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.HonchoDaemon = HonchoDaemon;
|
|
91
|
+
exports.honchoDaemon = new HonchoDaemon();
|