agentsoul-cli 1.0.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.
Files changed (2) hide show
  1. package/bin/index.js +97 -0
  2. package/package.json +14 -0
package/bin/index.js ADDED
@@ -0,0 +1,97 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const readline = require('readline');
6
+
7
+ // Terminal ANSI styling
8
+ const BOLD = '\x1b[1m';
9
+ const RESET = '\x1b[0m';
10
+ const LIME = '\x1b[38;2;204;255;0m';
11
+ const GREEN = '\x1b[38;2;95;245;214m';
12
+ const CYAN = '\x1b[36m';
13
+ const DIM = '\x1b[2m';
14
+
15
+ function printBanner() {
16
+ console.log('');
17
+ console.log(`${LIME}${BOLD} ___ __ ____ __`);
18
+ console.log(` / | ____ ____ ____ / /_/ __/___ __ __/ /`);
19
+ console.log(` / /| |/ __ \`/ _ \\/ __ \\/ __/\\ \\/ __ \\/ / / / / `);
20
+ console.log(` / ___ / /_/ / __/ / / / /____\\ \\ /_/ / /_/ / / `);
21
+ console.log(` /_/ |_\\__, /\\___/_/ /_/\\__/___/ /\\____/\\__,_/_/ `);
22
+ console.log(` /____/ /_/ ${RESET}`);
23
+ console.log(`\n ${CYAN}๐Ÿ›ก๏ธ AgentSoul Protocol // Autonomous AI Security Shield${RESET}`);
24
+ console.log(` ${DIM}๐ŸŒ Network: Robinhood Chain (EVM Layer 2 ยท Chain ID 46630)${RESET}`);
25
+ console.log(` ${DIM}โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€${RESET}\n`);
26
+ }
27
+
28
+ function ask(rl, question, defaultValue) {
29
+ return new Promise((resolve) => {
30
+ rl.question(`${LIME}?${RESET} ${BOLD}${question}${RESET} ${DIM}(default: ${defaultValue})${RESET}: `, (ans) => {
31
+ resolve(ans.trim() || defaultValue);
32
+ });
33
+ });
34
+ }
35
+
36
+ function sleep(ms) {
37
+ return new Promise(resolve => setTimeout(resolve, ms));
38
+ }
39
+
40
+ async function run() {
41
+ printBanner();
42
+
43
+ console.log(`${GREEN}ยป Initializing AgentSoul Security Layer in current working directory...${RESET}\n`);
44
+
45
+ let vaultAddress = '0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7';
46
+ let network = 'testnet';
47
+ let dailyLimit = '2.0';
48
+
49
+ if (process.stdin.isTTY) {
50
+ const rl = readline.createInterface({
51
+ input: process.stdin,
52
+ output: process.stdout
53
+ });
54
+
55
+ vaultAddress = await ask(rl, 'Enter your AgentSoul Vault / Owner Address', vaultAddress);
56
+ network = await ask(rl, 'Select Target Network [testnet | mainnet]', network);
57
+ dailyLimit = await ask(rl, 'Set Daily Spending Cap (ETH)', dailyLimit);
58
+
59
+ rl.close();
60
+ }
61
+
62
+ console.log(`\n${DIM}[1/3] Generating agentsoul.config.json...${RESET}`);
63
+ await sleep(350);
64
+
65
+ const configData = {
66
+ vaultAddress: vaultAddress,
67
+ endpoint: "https://agentsoul.tech/api/transfer",
68
+ network: network,
69
+ dailyLimit: dailyLimit,
70
+ guardianWallet: "",
71
+ sharedImmuneRegistry: true,
72
+ telemetry: "active"
73
+ };
74
+
75
+ const targetPath = path.join(process.cwd(), 'agentsoul.config.json');
76
+ fs.writeFileSync(targetPath, JSON.stringify(configData, null, 2), 'utf-8');
77
+ console.log(`${GREEN} โœ“ Config file created:${RESET} ${path.basename(targetPath)}`);
78
+
79
+ console.log(`${DIM}[2/3] Connecting to Shared Immune Memory on Robinhood Chain...${RESET}`);
80
+ await sleep(400);
81
+ console.log(`${GREEN} โœ“ Connected to Robinhood Chain Node (46630)${RESET}`);
82
+
83
+ console.log(`${DIM}[3/3] Enforcing pre-flight transaction screening...${RESET}`);
84
+ await sleep(350);
85
+ console.log(`${GREEN} โœ“ Anti-drain Velocity Guard active${RESET}`);
86
+
87
+ console.log(`\n${LIME}${BOLD}โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${RESET}`);
88
+ console.log(` ${LIME}${BOLD}๐ŸŽ‰ SUCCESS! AI Agent Protected by AgentSoul Protocol.${RESET}`);
89
+ console.log(` ${BOLD}Config:${RESET} agentsoul.config.json`);
90
+ console.log(` ${BOLD}Status:${RESET} ${GREEN}ONLINE & PROTECTED${RESET}`);
91
+ console.log(` ${BOLD}Vault:${RESET} ${vaultAddress}`);
92
+ console.log(` ${BOLD}Limit:${RESET} ${dailyLimit} ETH / day`);
93
+ console.log(` ${DIM}Dashboard: https://agentsoul.tech/dashboard${RESET}`);
94
+ console.log(`${LIME}${BOLD}โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•${RESET}\n`);
95
+ }
96
+
97
+ run();
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "agentsoul-cli",
3
+ "version": "1.0.0",
4
+ "description": "Interactive CLI for AgentSoul Autonomous AI Security Protocol",
5
+ "main": "bin/index.js",
6
+ "bin": {
7
+ "agentsoul-cli": "bin/index.js",
8
+ "agentsoul": "bin/index.js"
9
+ },
10
+ "keywords": ["agentsoul", "security", "ai-agents", "elizaos", "robinhood-chain"],
11
+ "author": "AgentSoul Protocol",
12
+ "license": "MIT",
13
+ "dependencies": {}
14
+ }