dactyclaw 1.4.3 → 1.6.0
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/bin/dactyclaw.js +47 -1
- package/bin_creator.js +17 -0
- package/index.html +127 -4
- package/package.json +2 -2
package/bin/dactyclaw.js
CHANGED
|
@@ -49,6 +49,7 @@ program
|
|
|
49
49
|
const ticker = tickerInput || defaultTicker;
|
|
50
50
|
|
|
51
51
|
const description = await ask('? Agent Description (optional): ');
|
|
52
|
+
const imageUrl = await ask('? Token Image URL (optional): ');
|
|
52
53
|
|
|
53
54
|
// Wallet setup
|
|
54
55
|
const localWallet = ethers.Wallet.createRandom();
|
|
@@ -68,7 +69,9 @@ program
|
|
|
68
69
|
name,
|
|
69
70
|
ticker,
|
|
70
71
|
dnaId,
|
|
72
|
+
dnaId,
|
|
71
73
|
description: description || "An autonomous agent in the Dactyclaw ecosystem",
|
|
74
|
+
imageUrl: imageUrl || "",
|
|
72
75
|
network: "base",
|
|
73
76
|
createdAt: new Date().toISOString(),
|
|
74
77
|
wallet: { address: localWallet.address }
|
|
@@ -127,7 +130,7 @@ program
|
|
|
127
130
|
name,
|
|
128
131
|
symbol: ticker,
|
|
129
132
|
tokenAdmin: account.address,
|
|
130
|
-
image: "
|
|
133
|
+
image: imageUrl || "",
|
|
131
134
|
metadata: { description: description || "Deployed via Dactyclaw Seamless CLI", socialMediaUrls: [], auditUrls: [] },
|
|
132
135
|
context: { interface: "Dactyl", platform: "Dactyl", messageId: dnaId, id: ticker },
|
|
133
136
|
pool: { pairedToken: "WETH", initialMarketCap: "0.2", positions: ROOT_POS_V4.Standard }
|
|
@@ -159,6 +162,49 @@ program
|
|
|
159
162
|
txHash: deployResult.txHash
|
|
160
163
|
};
|
|
161
164
|
fs.writeFileSync(agentJsonPath, JSON.stringify(agentData, null, 2));
|
|
165
|
+
|
|
166
|
+
// [Dactyclaw Database Sync] - Push Directly to Live Agents Monitor
|
|
167
|
+
try {
|
|
168
|
+
const binId = '67c1c5a9ad19ca34f8149eec';
|
|
169
|
+
const apiKey = '$2a$10$aBB0ydwfYD6iKCDgPTjoo.bnBEzpzgTPDr.VjkObebVlsc5azZHpm';
|
|
170
|
+
|
|
171
|
+
// 1. GET current
|
|
172
|
+
const resGet = await fetch(`https://api.jsonbin.io/v3/b/${binId}`, {
|
|
173
|
+
headers: { 'X-Master-Key': apiKey }
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
let currentData = [];
|
|
177
|
+
if (resGet.ok) {
|
|
178
|
+
const parsed = await resGet.json();
|
|
179
|
+
currentData = parsed.record || [];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// Append new agent token payload
|
|
183
|
+
currentData.push({
|
|
184
|
+
symbol: ticker,
|
|
185
|
+
name: name,
|
|
186
|
+
agent: `4claw_anon_thread:${dnaId.substring(0, 4)}`,
|
|
187
|
+
launchedAt: Date.now(),
|
|
188
|
+
clanker_url: `https://clanker.world/clanker/${resultContract.address}`,
|
|
189
|
+
explorer_url: `https://basescan.org/token/${resultContract.address}`,
|
|
190
|
+
address: resultContract.address,
|
|
191
|
+
source: '4claw' // For backwards compatibility logic
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
// 2. PUT updated array
|
|
195
|
+
await fetch(`https://api.jsonbin.io/v3/b/${binId}`, {
|
|
196
|
+
method: 'PUT',
|
|
197
|
+
headers: {
|
|
198
|
+
'Content-Type': 'application/json',
|
|
199
|
+
'X-Master-Key': apiKey
|
|
200
|
+
},
|
|
201
|
+
body: JSON.stringify(currentData)
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
console.log(`📡 Satellite Sync: Agent deployed to Global Dactyclaw Terminal.`);
|
|
205
|
+
} catch (e) {
|
|
206
|
+
// Silently ignore ping errors so as not to ruin user CLI experience
|
|
207
|
+
}
|
|
162
208
|
}
|
|
163
209
|
|
|
164
210
|
console.log(`\nYour Agent ${name} is fully materialized.`);
|
package/bin_creator.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const key = '$2a$10$aBB0ydwfYD6iKCDgPTjoo.bnBEzpzgTPDr.VjkObebVlsc5azZHpm';
|
|
3
|
+
const bodyData = JSON.stringify([{ "dactyclaw_init": true, "timestamp": Date.now() }]);
|
|
4
|
+
|
|
5
|
+
fetch('https://api.jsonbin.io/v3/b', {
|
|
6
|
+
method: 'POST',
|
|
7
|
+
headers: {
|
|
8
|
+
'Content-Type': 'application/json',
|
|
9
|
+
'X-Master-Key': key,
|
|
10
|
+
'X-Bin-Private': 'false',
|
|
11
|
+
'X-Bin-Name': 'Dactyclaw-Agents-Log'
|
|
12
|
+
},
|
|
13
|
+
body: bodyData
|
|
14
|
+
})
|
|
15
|
+
.then(r => r.json())
|
|
16
|
+
.then(data => console.log('BINS_RESULT:', JSON.stringify(data)))
|
|
17
|
+
.catch(err => console.error(err));
|
package/index.html
CHANGED
|
@@ -900,6 +900,7 @@
|
|
|
900
900
|
<nav>
|
|
901
901
|
<button data-tab="home" class="nav-btn active">Home</button>
|
|
902
902
|
<button data-tab="leaderboard" class="nav-btn">Leaderboard</button>
|
|
903
|
+
<button data-tab="agents" class="nav-btn">Agents</button>
|
|
903
904
|
<button data-tab="deploy" class="nav-btn">Deploy</button>
|
|
904
905
|
<button data-tab="docs" class="nav-btn">Documentation</button>
|
|
905
906
|
</nav>
|
|
@@ -1019,6 +1020,43 @@
|
|
|
1019
1020
|
</button>
|
|
1020
1021
|
</div>
|
|
1021
1022
|
|
|
1023
|
+
<!-- ═══ AGENTS ═══ -->
|
|
1024
|
+
<div id="agents" class="content-section">
|
|
1025
|
+
<div class="spawn-label"><span class="live-dot"></span> Ecosystem</div>
|
|
1026
|
+
<h2 class="section-title">Agents & Tokens</h2>
|
|
1027
|
+
<p class="section-description">
|
|
1028
|
+
Live autonomous AI agents and tokens launched natively through DACTYCLAW system.
|
|
1029
|
+
</p>
|
|
1030
|
+
|
|
1031
|
+
<div class="leaderboard-stats">
|
|
1032
|
+
<div class="stat-box">
|
|
1033
|
+
<div class="stat-label">Dactyclaw Agents</div>
|
|
1034
|
+
<div class="stat-value" id="stat-agents">---</div>
|
|
1035
|
+
</div>
|
|
1036
|
+
<div class="stat-box">
|
|
1037
|
+
<div class="stat-label">Source</div>
|
|
1038
|
+
<div class="stat-value">Dactyclaw</div>
|
|
1039
|
+
</div>
|
|
1040
|
+
<div class="stat-box">
|
|
1041
|
+
<div class="stat-label">Network</div>
|
|
1042
|
+
<div class="stat-value">Base</div>
|
|
1043
|
+
</div>
|
|
1044
|
+
</div>
|
|
1045
|
+
|
|
1046
|
+
<div class="top5-section-label">🤖 Active Agents Tracking</div>
|
|
1047
|
+
|
|
1048
|
+
<div id="agents-container" style="margin-top: 2rem;">
|
|
1049
|
+
<div class="loading-indicator">
|
|
1050
|
+
<div>Waiting for API heartbeat...</div>
|
|
1051
|
+
</div>
|
|
1052
|
+
</div>
|
|
1053
|
+
|
|
1054
|
+
<button class="load-more-btn" id="load-more-agents-btn" onclick="loadMoreAgents()"
|
|
1055
|
+
style="display:none;">
|
|
1056
|
+
Load More Agents
|
|
1057
|
+
</button>
|
|
1058
|
+
</div>
|
|
1059
|
+
|
|
1022
1060
|
<!-- ═══ DEPLOY ═══ -->
|
|
1023
1061
|
<div id="deploy" class="content-section">
|
|
1024
1062
|
<div class="spawn-label">Quick Deploy</div>
|
|
@@ -1191,6 +1229,8 @@
|
|
|
1191
1229
|
|
|
1192
1230
|
if (tabName === 'leaderboard' && allTokens.length === 0) {
|
|
1193
1231
|
fetchTokens();
|
|
1232
|
+
} else if (tabName === 'agents' && dactyclawAgents.length === 0) {
|
|
1233
|
+
fetchDactyclawAgents();
|
|
1194
1234
|
}
|
|
1195
1235
|
}
|
|
1196
1236
|
|
|
@@ -1216,10 +1256,10 @@
|
|
|
1216
1256
|
try {
|
|
1217
1257
|
let data, topData;
|
|
1218
1258
|
|
|
1219
|
-
// Fetch both recent tokens and top tokens in parallel
|
|
1259
|
+
// Fetch both recent tokens and top tokens in parallel from local proxy server at :5500
|
|
1220
1260
|
const [recentRes, topRes] = await Promise.all([
|
|
1221
|
-
fetch('/api/tokens'),
|
|
1222
|
-
fetch('/api/top-tokens')
|
|
1261
|
+
fetch('http://127.0.0.1:5500/api/tokens'),
|
|
1262
|
+
fetch('http://127.0.0.1:5500/api/top-tokens')
|
|
1223
1263
|
]);
|
|
1224
1264
|
|
|
1225
1265
|
if (!recentRes.ok || !topRes.ok) throw new Error('proxy unavailable');
|
|
@@ -1239,6 +1279,7 @@
|
|
|
1239
1279
|
const topTokensList = topData.success && topData.tokens ? topData.tokens : allTokens;
|
|
1240
1280
|
renderTop5(topTokensList);
|
|
1241
1281
|
renderTokenTable();
|
|
1282
|
+
renderAgentsTable();
|
|
1242
1283
|
updateTimestamp();
|
|
1243
1284
|
|
|
1244
1285
|
if (!autoRefreshInterval) {
|
|
@@ -1352,6 +1393,88 @@
|
|
|
1352
1393
|
renderTokenTable();
|
|
1353
1394
|
}
|
|
1354
1395
|
|
|
1396
|
+
let dactyclawAgents = [];
|
|
1397
|
+
let displayedAgentsCount = 0;
|
|
1398
|
+
|
|
1399
|
+
async function fetchDactyclawAgents() {
|
|
1400
|
+
const container = document.getElementById('agents-container');
|
|
1401
|
+
const loadMoreBtn = document.getElementById('load-more-agents-btn');
|
|
1402
|
+
if (container) container.innerHTML = '<div style="color:#00d4ff; padding:2rem;">> CONNECTING TO DACTYCLAW SATELLITE...</div>';
|
|
1403
|
+
loadMoreBtn.style.display = 'none';
|
|
1404
|
+
|
|
1405
|
+
try {
|
|
1406
|
+
// Fetch direct from Serverless DB
|
|
1407
|
+
const response = await fetch('https://api.jsonbin.io/v3/b/67c1c5a9ad19ca34f8149eec', {
|
|
1408
|
+
headers: { 'X-Master-Key': '$2a$10$aBB0ydwfYD6iKCDgPTjoo.bnBEzpzgTPDr.VjkObebVlsc5azZHpm' }
|
|
1409
|
+
});
|
|
1410
|
+
|
|
1411
|
+
if (!response.ok) throw new Error('Database unreachable');
|
|
1412
|
+
const data = await response.json();
|
|
1413
|
+
|
|
1414
|
+
// The record array contains our deployed agents, filter out init object
|
|
1415
|
+
dactyclawAgents = (data.record || []).filter(item => !item.dactyclaw_init);
|
|
1416
|
+
dactyclawAgents.reverse(); // Newest first
|
|
1417
|
+
|
|
1418
|
+
renderDactyclawAgents();
|
|
1419
|
+
} catch (err) {
|
|
1420
|
+
console.error(err);
|
|
1421
|
+
if (container) container.innerHTML = `<div style="color:#ff0033; padding:2rem;">> SYSTEM ERROR: FAILED TO ESTABLISH LINK WITH TERMINAL DATABASE.</div>`;
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
function renderDactyclawAgents() {
|
|
1426
|
+
const container = document.getElementById('agents-container');
|
|
1427
|
+
if (!container) return;
|
|
1428
|
+
const loadMoreBtn = document.getElementById('load-more-agents-btn');
|
|
1429
|
+
|
|
1430
|
+
const statAgentsEl = document.getElementById('stat-agents');
|
|
1431
|
+
if (statAgentsEl) statAgentsEl.textContent = dactyclawAgents.length.toLocaleString();
|
|
1432
|
+
|
|
1433
|
+
const end = Math.min(displayedAgentsCount + PER_PAGE, dactyclawAgents.length);
|
|
1434
|
+
const tokensToShow = dactyclawAgents.slice(0, end);
|
|
1435
|
+
displayedAgentsCount = end;
|
|
1436
|
+
|
|
1437
|
+
let html = `<div class="terminal-log-container" style="background:#0a0a0a; border: 1px solid #00d4ff; padding: 1.5rem; font-family: 'Courier Prime', Courier, monospace; overflow-y: auto; max-height: 500px; box-shadow: inset 0 0 10px rgba(0,212,255,0.1);">`;
|
|
1438
|
+
|
|
1439
|
+
if (tokensToShow.length === 0) {
|
|
1440
|
+
html += `<div style="color:#0099bb;">> System: No active agents detected in recent logs.</div>`;
|
|
1441
|
+
} else {
|
|
1442
|
+
html += `<div style="color:#00d4ff; margin-bottom: 1rem;">> TRACKING SUCCESSFUL DACTYCLAW AGENTS...</div>`;
|
|
1443
|
+
tokensToShow.forEach((t, i) => {
|
|
1444
|
+
const d = new Date(t.launchedAt);
|
|
1445
|
+
const timeStr = d.toLocaleTimeString([], { hour12: false }) + '.' + d.getMilliseconds().toString().padStart(3, '0');
|
|
1446
|
+
html += `
|
|
1447
|
+
<div style="margin-bottom: 0.6rem; font-size: 0.8rem; line-height: 1.4;">
|
|
1448
|
+
<span style="color: #0099bb;">[${timeStr}]</span>
|
|
1449
|
+
<span style="color: #00ffaa; font-weight:bold;">SUCCESS</span>:
|
|
1450
|
+
Agent <span style="color: #ffaa00;">${escHtml(t.agent || 'Unknown')}</span> materialized token
|
|
1451
|
+
<span style="color: #00d4ff;">$${escHtml(t.symbol)}</span>
|
|
1452
|
+
<span style="opacity: 0.5;">—</span>
|
|
1453
|
+
<a href="${escHtml(t.clanker_url)}" target="_blank" style="color: #ff00ff; text-decoration: none;">[CLANKER]</a>
|
|
1454
|
+
<a href="${escHtml(t.explorer_url)}" target="_blank" style="color: #aaaaaa; text-decoration: none;">[BASESCAN]</a>
|
|
1455
|
+
</div>`;
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
html += '</div>';
|
|
1460
|
+
container.innerHTML = html;
|
|
1461
|
+
|
|
1462
|
+
if (displayedAgentsCount < dactyclawAgents.length) {
|
|
1463
|
+
loadMoreBtn.style.display = 'block';
|
|
1464
|
+
loadMoreBtn.textContent = `Load More (${displayedAgentsCount} of ${dactyclawAgents.length})`;
|
|
1465
|
+
} else {
|
|
1466
|
+
loadMoreBtn.style.display = 'none';
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
function loadMoreAgents() {
|
|
1471
|
+
renderDactyclawAgents();
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
function loadMoreAgents() {
|
|
1475
|
+
renderAgentsTable();
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1355
1478
|
async function refreshTokens() {
|
|
1356
1479
|
document.getElementById('refresh-btn').textContent = '↻ Refreshing...';
|
|
1357
1480
|
await fetchTokens();
|
|
@@ -1382,7 +1505,7 @@
|
|
|
1382
1505
|
}
|
|
1383
1506
|
|
|
1384
1507
|
/* ── Hash Navigation ── */
|
|
1385
|
-
const validTabs = ['home', 'leaderboard', 'deploy', 'docs'];
|
|
1508
|
+
const validTabs = ['home', 'leaderboard', 'agents', 'deploy', 'docs'];
|
|
1386
1509
|
window.addEventListener('hashchange', () => {
|
|
1387
1510
|
const h = window.location.hash.slice(1);
|
|
1388
1511
|
if (validTabs.includes(h)) switchTab(h);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dactyclaw",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "**Agent Monitor & Deployer for Clawn Ecosystem on Base**",
|
|
5
5
|
"main": "proxy.js",
|
|
6
6
|
"bin": {
|
|
@@ -31,4 +31,4 @@
|
|
|
31
31
|
"viem": "^2.46.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {}
|
|
34
|
-
}
|
|
34
|
+
}
|