nyxora 1.6.13 → 1.7.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 +28 -0
- package/README.md +2 -2
- package/bin/nyxora.mjs +8 -0
- package/package.json +1 -2
- package/packages/core/package.json +1 -1
- package/packages/core/src/agent/limitOrderManager.ts +2 -2
- package/packages/core/src/agent/reasoning.ts +36 -14
- package/packages/core/src/config/parser.ts +99 -9
- package/packages/core/src/gateway/cli.ts +28 -2
- package/packages/core/src/gateway/setup.ts +45 -10
- package/packages/core/src/gateway/telegram.ts +53 -12
- package/packages/core/src/system/skills/searchWeb.ts +187 -21
- package/packages/core/src/utils/formatter.ts +12 -5
- package/packages/core/src/web3/config.ts +7 -1
- package/packages/core/src/web3/skills/bridgeToken.ts +4 -3
- package/packages/core/src/web3/skills/checkAddress.ts +2 -2
- package/packages/core/src/web3/skills/checkPortfolio.ts +55 -39
- package/packages/core/src/web3/skills/checkSecurity.ts +3 -2
- package/packages/core/src/web3/skills/customTx.ts +2 -2
- package/packages/core/src/web3/skills/getBalance.ts +3 -3
- package/packages/core/src/web3/skills/marketAnalysis.ts +2 -2
- package/packages/core/src/web3/skills/mintNft.ts +2 -2
- package/packages/core/src/web3/skills/swapToken.ts +4 -3
- package/packages/core/src/web3/skills/transfer.ts +2 -2
- package/packages/core/src/web3/utils/tokens.ts +8 -0
- package/packages/dashboard/dist/assets/{index-24OeXn-k.css → index-BSk4CLkG.css} +1 -1
- package/packages/dashboard/dist/assets/{index-BuYfTEKE.js → index-Dc3Tu0Te.js} +21 -21
- 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/launcher.js +0 -48
- package/packages/core/src/agent/reasoning.d.ts.map +0 -1
- package/packages/core/src/config/parser.d.ts.map +0 -1
- package/packages/core/src/gateway/cli.d.ts.map +0 -1
- package/packages/core/src/memory/logger.d.ts.map +0 -1
- package/packages/core/src/utils/safeLogger.js +0 -59
- package/packages/core/src/web3/config.d.ts.map +0 -1
- package/packages/core/src/web3/skills/getBalance.d.ts.map +0 -1
- package/packages/dashboard/public/favicon.svg +0 -10
- package/packages/dashboard/public/icons.svg +0 -24
- package/packages/dashboard/src/App.css +0 -184
- package/packages/dashboard/src/App.tsx +0 -588
- package/packages/dashboard/src/BalanceWidget.tsx +0 -65
- package/packages/dashboard/src/MarketWidget.tsx +0 -73
- package/packages/dashboard/src/NetworkSelector.tsx +0 -64
- package/packages/dashboard/src/NyxoraLogo.tsx +0 -25
- package/packages/dashboard/src/OsSkills.tsx +0 -352
- package/packages/dashboard/src/Overview.tsx +0 -157
- package/packages/dashboard/src/PendingTransactions.tsx +0 -75
- package/packages/dashboard/src/Settings.tsx +0 -338
- package/packages/dashboard/src/Skills.tsx +0 -200
- package/packages/dashboard/src/SwapWidget.tsx +0 -141
- package/packages/dashboard/src/TransactionWidget.tsx +0 -95
- package/packages/dashboard/src/assets/hero.png +0 -0
- package/packages/dashboard/src/assets/react.svg +0 -1
- package/packages/dashboard/src/assets/vite.svg +0 -1
- package/packages/dashboard/src/components/PillSelect.tsx +0 -65
- package/packages/dashboard/src/index.css +0 -807
- package/packages/dashboard/src/main.tsx +0 -10
- package/packages/dashboard/src/overview.css +0 -304
- package/packages/dashboard/src/utils/api.ts +0 -31
- package/packages/mcp-server/tsconfig.tsbuildinfo +0 -1
- package/test-address.ts +0 -11
- package/test-all-chains.ts +0 -19
- package/test-db.ts +0 -3
- package/test-portfolio.ts +0 -14
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
.overview-container {
|
|
2
|
-
padding: 24px;
|
|
3
|
-
overflow-y: auto;
|
|
4
|
-
height: calc(100vh - 64px);
|
|
5
|
-
color: #fff;
|
|
6
|
-
font-family: 'Inter', sans-serif;
|
|
7
|
-
max-width: 1200px;
|
|
8
|
-
margin: 0 auto;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.overview-container::-webkit-scrollbar {
|
|
12
|
-
width: 6px;
|
|
13
|
-
}
|
|
14
|
-
.overview-container::-webkit-scrollbar-thumb {
|
|
15
|
-
background: rgba(255, 255, 255, 0.1);
|
|
16
|
-
border-radius: 4px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.overview-header h1 {
|
|
20
|
-
font-size: 1.5rem;
|
|
21
|
-
font-weight: 600;
|
|
22
|
-
margin-bottom: 4px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.overview-header p {
|
|
26
|
-
color: var(--text-secondary);
|
|
27
|
-
font-size: 0.9rem;
|
|
28
|
-
margin-bottom: 24px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.panel {
|
|
32
|
-
background: rgba(20, 24, 32, 0.6);
|
|
33
|
-
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
34
|
-
border-radius: 12px;
|
|
35
|
-
padding: 20px;
|
|
36
|
-
margin-bottom: 24px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.panel-header h3 {
|
|
40
|
-
font-size: 1.1rem;
|
|
41
|
-
font-weight: 600;
|
|
42
|
-
margin-bottom: 4px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.panel-header p {
|
|
46
|
-
color: var(--text-secondary);
|
|
47
|
-
font-size: 0.85rem;
|
|
48
|
-
margin-bottom: 16px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.form-group {
|
|
52
|
-
margin-bottom: 16px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.form-row {
|
|
56
|
-
display: flex;
|
|
57
|
-
gap: 16px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.flex-1 {
|
|
61
|
-
flex: 1;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
label {
|
|
65
|
-
display: block;
|
|
66
|
-
font-size: 0.75rem;
|
|
67
|
-
text-transform: uppercase;
|
|
68
|
-
color: var(--text-secondary);
|
|
69
|
-
margin-bottom: 8px;
|
|
70
|
-
letter-spacing: 0.05em;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
input, select {
|
|
74
|
-
width: 100%;
|
|
75
|
-
background: rgba(0, 0, 0, 0.3);
|
|
76
|
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
77
|
-
padding: 10px 12px;
|
|
78
|
-
border-radius: 8px;
|
|
79
|
-
color: white;
|
|
80
|
-
font-size: 0.9rem;
|
|
81
|
-
font-family: monospace;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
input:read-only {
|
|
85
|
-
color: var(--text-secondary);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.input-with-icon {
|
|
89
|
-
position: relative;
|
|
90
|
-
display: flex;
|
|
91
|
-
align-items: center;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.input-with-icon svg {
|
|
95
|
-
position: absolute;
|
|
96
|
-
right: 12px;
|
|
97
|
-
color: var(--text-secondary);
|
|
98
|
-
cursor: pointer;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.form-actions {
|
|
102
|
-
display: flex;
|
|
103
|
-
align-items: center;
|
|
104
|
-
gap: 12px;
|
|
105
|
-
margin-top: 20px;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.btn-primary {
|
|
109
|
-
background: #3b82f6;
|
|
110
|
-
color: white;
|
|
111
|
-
border: none;
|
|
112
|
-
padding: 8px 16px;
|
|
113
|
-
border-radius: 6px;
|
|
114
|
-
font-size: 0.9rem;
|
|
115
|
-
cursor: pointer;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.btn-secondary {
|
|
119
|
-
background: transparent;
|
|
120
|
-
color: white;
|
|
121
|
-
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
122
|
-
padding: 8px 16px;
|
|
123
|
-
border-radius: 6px;
|
|
124
|
-
font-size: 0.9rem;
|
|
125
|
-
cursor: pointer;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.action-hint {
|
|
129
|
-
color: var(--text-secondary);
|
|
130
|
-
font-size: 0.85rem;
|
|
131
|
-
margin-left: 8px;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.snapshot-grid {
|
|
135
|
-
display: grid;
|
|
136
|
-
grid-template-columns: repeat(4, 1fr);
|
|
137
|
-
gap: 20px;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.stat-val {
|
|
141
|
-
font-size: 1.5rem;
|
|
142
|
-
font-weight: 700;
|
|
143
|
-
margin-bottom: 4px;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.text-green {
|
|
147
|
-
color: #22c55e;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.stat-block p {
|
|
151
|
-
color: var(--text-secondary);
|
|
152
|
-
font-size: 0.8rem;
|
|
153
|
-
margin-top: 8px;
|
|
154
|
-
line-height: 1.4;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.metrics-grid {
|
|
158
|
-
display: grid;
|
|
159
|
-
grid-template-columns: repeat(5, 1fr);
|
|
160
|
-
gap: 16px;
|
|
161
|
-
margin-bottom: 32px;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.metric-card {
|
|
165
|
-
background: rgba(20, 24, 32, 0.6);
|
|
166
|
-
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
167
|
-
border-radius: 12px;
|
|
168
|
-
padding: 16px;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.metric-val {
|
|
172
|
-
font-size: 1.5rem;
|
|
173
|
-
font-weight: 700;
|
|
174
|
-
margin-bottom: 4px;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.metric-sub {
|
|
178
|
-
color: var(--text-secondary);
|
|
179
|
-
font-size: 0.75rem;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.section-title {
|
|
183
|
-
font-size: 0.75rem;
|
|
184
|
-
text-transform: uppercase;
|
|
185
|
-
color: var(--text-secondary);
|
|
186
|
-
margin-bottom: 12px;
|
|
187
|
-
letter-spacing: 0.05em;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.session-item {
|
|
191
|
-
display: flex;
|
|
192
|
-
justify-content: space-between;
|
|
193
|
-
padding: 16px 20px;
|
|
194
|
-
margin-bottom: 24px;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.text-secondary {
|
|
198
|
-
color: var(--text-secondary);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.attention-panel {
|
|
202
|
-
background: rgba(234, 179, 8, 0.1);
|
|
203
|
-
border: 1px solid rgba(234, 179, 8, 0.2);
|
|
204
|
-
border-radius: 12px;
|
|
205
|
-
padding: 16px 20px;
|
|
206
|
-
margin-bottom: 24px;
|
|
207
|
-
display: flex;
|
|
208
|
-
flex-direction: column;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.attention-header {
|
|
212
|
-
display: flex;
|
|
213
|
-
align-items: center;
|
|
214
|
-
gap: 8px;
|
|
215
|
-
color: #eab308;
|
|
216
|
-
margin-bottom: 8px;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.attention-header h4 {
|
|
220
|
-
font-size: 1rem;
|
|
221
|
-
font-weight: 600;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.attention-content p {
|
|
225
|
-
font-size: 0.95rem;
|
|
226
|
-
margin-bottom: 4px;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.attention-content span {
|
|
230
|
-
font-size: 0.85rem;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.logs-grid {
|
|
234
|
-
display: grid;
|
|
235
|
-
grid-template-columns: 1fr 1fr;
|
|
236
|
-
gap: 16px;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.log-panel {
|
|
240
|
-
background: rgba(10, 12, 16, 0.8);
|
|
241
|
-
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
242
|
-
border-radius: 12px;
|
|
243
|
-
overflow: hidden;
|
|
244
|
-
display: flex;
|
|
245
|
-
flex-direction: column;
|
|
246
|
-
height: 300px;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.log-header {
|
|
250
|
-
padding: 12px 16px;
|
|
251
|
-
background: rgba(255, 255, 255, 0.05);
|
|
252
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
|
253
|
-
font-size: 0.85rem;
|
|
254
|
-
font-weight: 600;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.badge {
|
|
258
|
-
background: rgba(255, 255, 255, 0.1);
|
|
259
|
-
padding: 2px 6px;
|
|
260
|
-
border-radius: 10px;
|
|
261
|
-
font-size: 0.7rem;
|
|
262
|
-
margin-left: 8px;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.log-content {
|
|
266
|
-
padding: 12px 16px;
|
|
267
|
-
overflow-y: auto;
|
|
268
|
-
display: flex;
|
|
269
|
-
flex-direction: column;
|
|
270
|
-
gap: 4px;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.log-content code, .log-json {
|
|
274
|
-
font-family: 'Consolas', 'Monaco', monospace;
|
|
275
|
-
font-size: 0.75rem;
|
|
276
|
-
color: #a3a3a3;
|
|
277
|
-
line-height: 1.4;
|
|
278
|
-
word-break: break-all;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.log-row {
|
|
282
|
-
display: flex;
|
|
283
|
-
gap: 12px;
|
|
284
|
-
font-family: 'Consolas', 'Monaco', monospace;
|
|
285
|
-
font-size: 0.75rem;
|
|
286
|
-
margin-bottom: 4px;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.log-time {
|
|
290
|
-
color: #fb923c;
|
|
291
|
-
min-width: 60px;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.log-msg {
|
|
295
|
-
color: #d1d5db;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.log-meta {
|
|
299
|
-
color: #6b7280;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.gateway-row {
|
|
303
|
-
margin-bottom: 2px;
|
|
304
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// Intercept token from URL on load
|
|
2
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
3
|
-
const tokenFromUrl = urlParams.get('token');
|
|
4
|
-
|
|
5
|
-
if (tokenFromUrl) {
|
|
6
|
-
localStorage.setItem('nyxora_token', tokenFromUrl);
|
|
7
|
-
// Clean URL
|
|
8
|
-
window.history.replaceState({}, document.title, window.location.pathname);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const getToken = () => localStorage.getItem('nyxora_token') || '';
|
|
12
|
-
|
|
13
|
-
export const API_BASE_URL = import.meta.env.PROD ? '' : 'http://127.0.0.1:3000';
|
|
14
|
-
|
|
15
|
-
export async function apiFetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response> {
|
|
16
|
-
const token = getToken();
|
|
17
|
-
const headers = new Headers(init?.headers);
|
|
18
|
-
if (token) {
|
|
19
|
-
headers.set('x-nyxora-token', token);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// If input is a relative path (starts with /), prepend API_BASE_URL
|
|
23
|
-
const url = typeof input === 'string' && input.startsWith('/')
|
|
24
|
-
? `${API_BASE_URL}${input}`
|
|
25
|
-
: input;
|
|
26
|
-
|
|
27
|
-
return fetch(url, {
|
|
28
|
-
...init,
|
|
29
|
-
headers,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["./src/server.ts"],"version":"6.0.3"}
|
package/test-address.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { getAddress } from './packages/core/src/web3/config';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
async function test() {
|
|
5
|
-
process.env.INTERNAL_AUTH_TOKEN = fs.readFileSync('/home/perasyudha/.nyxora/runtime.token', 'utf8');
|
|
6
|
-
console.time('getAddress');
|
|
7
|
-
const address = await getAddress();
|
|
8
|
-
console.timeEnd('getAddress');
|
|
9
|
-
console.log("Address:", address);
|
|
10
|
-
}
|
|
11
|
-
test();
|
package/test-all-chains.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { checkPortfolio } from './packages/core/src/web3/skills/checkPortfolio';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
async function test() {
|
|
4
|
-
process.env.INTERNAL_AUTH_TOKEN = fs.readFileSync('/home/perasyudha/.nyxora/runtime.token', 'utf8');
|
|
5
|
-
const chains = ["ethereum", "base", "bsc", "arbitrum", "optimism", "sepolia"];
|
|
6
|
-
for (const chain of chains) {
|
|
7
|
-
console.time(chain);
|
|
8
|
-
try {
|
|
9
|
-
await Promise.race([
|
|
10
|
-
checkPortfolio(chain as any),
|
|
11
|
-
new Promise((_, reject) => setTimeout(() => reject(new Error('TIMEOUT')), 5000))
|
|
12
|
-
]);
|
|
13
|
-
console.timeEnd(chain);
|
|
14
|
-
} catch(e: any) {
|
|
15
|
-
console.log(`Failed ${chain}: ${e.message}`);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
test();
|
package/test-db.ts
DELETED
package/test-portfolio.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { checkPortfolio } from './packages/core/src/web3/skills/checkPortfolio';
|
|
2
|
-
|
|
3
|
-
async function test() {
|
|
4
|
-
console.time('Total Portfolio Time');
|
|
5
|
-
console.time('Portfolio Base');
|
|
6
|
-
await checkPortfolio('base', '0xD53E3D76cC11e4A91591deF1fe64616E156A7d7E');
|
|
7
|
-
console.timeEnd('Portfolio Base');
|
|
8
|
-
|
|
9
|
-
console.time('Portfolio BSC');
|
|
10
|
-
await checkPortfolio('bsc', '0xD53E3D76cC11e4A91591deF1fe64616E156A7d7E');
|
|
11
|
-
console.timeEnd('Portfolio BSC');
|
|
12
|
-
console.timeEnd('Total Portfolio Time');
|
|
13
|
-
}
|
|
14
|
-
test();
|
package/tsconfig.tsbuildinfo
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["./launcher.ts","./packages/core/src/agent/limitOrderManager.ts","./packages/core/src/agent/reasoning.ts","./packages/core/src/agent/transactionManager.ts","./packages/core/src/agent/updateProfile.ts","./packages/core/src/config/parser.ts","./packages/core/src/config/paths.ts","./packages/core/src/gateway/cli.ts","./packages/core/src/gateway/server.ts","./packages/core/src/gateway/setup.ts","./packages/core/src/gateway/telegram.ts","./packages/core/src/gateway/test.ts","./packages/core/src/gateway/tracker.ts","./packages/core/src/memory/logger.ts","./packages/core/src/system/pluginManager.ts","./packages/core/src/system/skills/browseWeb.ts","./packages/core/src/system/skills/executeShell.ts","./packages/core/src/system/skills/installSkill.ts","./packages/core/src/system/skills/readFile.ts","./packages/core/src/system/skills/updateSecurityPolicy.ts","./packages/core/src/system/skills/writeFile.ts","./packages/core/src/utils/formatter.ts","./packages/core/src/utils/state.ts","./packages/core/src/web3/config.ts","./packages/core/src/web3/skills/bridgeToken.ts","./packages/core/src/web3/skills/checkAddress.ts","./packages/core/src/web3/skills/checkPortfolio.ts","./packages/core/src/web3/skills/checkSecurity.ts","./packages/core/src/web3/skills/createWallet.ts","./packages/core/src/web3/skills/customTx.ts","./packages/core/src/web3/skills/getBalance.ts","./packages/core/src/web3/skills/getMyAddress.ts","./packages/core/src/web3/skills/getPrice.ts","./packages/core/src/web3/skills/marketAnalysis.ts","./packages/core/src/web3/skills/mintNft.ts","./packages/core/src/web3/skills/swapToken.ts","./packages/core/src/web3/skills/transfer.ts","./packages/core/src/web3/utils/tokens.ts","./packages/policy/src/server.ts","./packages/signer/src/crypto.ts","./packages/signer/src/server.ts"],"version":"6.0.3"}
|