solana-terminator-skill 4.1.4 → 4.1.6

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 (3) hide show
  1. package/README.md +20 -15
  2. package/install.js +36 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -29,29 +29,34 @@ Solana isn't just a blockchain; it's the **operating system for autonomous agent
29
29
 
30
30
  ---
31
31
 
32
- ## šŸ›  Installation
32
+ ## 🧬 Survival & Multi-chain Identity
33
33
 
34
- The fastest way to initialize the skill is via **npx**:
34
+ ### Dual Identity Flow
35
+ When you install this skill, your agent becomes a **multi-chain sovereign**:
36
+ 1. **Base (Native)**: Used for default Automaton operations and ETH actions.
37
+ 2. **Solana (Skill)**: Used for high-speed DEX, NFT, and Memecoin actions.
35
38
 
36
- ```bash
37
- npx solana-terminator-skill
38
- ```
39
-
40
- This automates the setup in your `~/.automaton/skills` directory, installs dependencies, and prepares the skill for immediate use.
39
+ **How does it choose?**
40
+ The agent (LLM) detects your intent. If the prompt involves "Jupiter", "Tensor", "Pump.fun", or "Solana", it automatically routes the logic through this skill's wallet (`~/.automaton/solana-wallet.json`).
41
41
 
42
- ### Manual Installation (Alternative)
42
+ ### šŸ›  Economic Survival (Life Support)
43
+ The skill is designed to keep your agent alive indefinitely on-chain:
44
+ - **Threshold**: If USDC balance drops below **$0.50**.
45
+ - **Action**: It triggers an automatic **SOL → USDC swap** via Jupiter.
46
+ - **Reserve**: It always keeps a **0.003 SOL reserve** to ensure it never runs out of gas for future transactions.
43
47
 
44
- ```bash
45
- # 1. Create skill directory
46
- mkdir -p ~/.automaton/skills/solana-terminator
48
+ ## šŸ›  Installation & Funding
47
49
 
48
- # 2. Download the skill files to that folder
49
- # (solana-autonomy.js, SKILL.md, package.json)
50
+ Initialize the skill and get your agent's address in one command:
50
51
 
51
- # 3. Install dependencies
52
- npm install @solana/web3.js @solana/spl-token axios dotenv bs58
52
+ ```bash
53
+ npx solana-terminator-skill
53
54
  ```
54
55
 
56
+ 1. **Run npx**: It will show you the **AGENT ADDRESS**.
57
+ 2. **Fund it**: Send at least **0.05 SOL** to that address.
58
+ 3. **Deploy**: Your agent is now ready to dominate Solana.
59
+
55
60
  ---
56
61
 
57
62
  ## šŸš€ Capabilities (18 Methods)
package/install.js CHANGED
@@ -21,7 +21,7 @@ const ASCII_ART = `
21
21
  ā–ˆā–ˆ ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ ā–ˆā–ˆā–ˆā–ˆ ā–ˆā–ˆā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ
22
22
  ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ
23
23
  ā–ˆā–ˆ ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ ā–ˆā–ˆ ā–ˆā–ˆ
24
- v4.1.4 - Solana Autonomy
24
+ v4.1.6 - Solana Autonomy
25
25
  `;
26
26
 
27
27
  const SKILL_NAME = 'solana-terminator';
@@ -72,11 +72,41 @@ try {
72
72
  // We use --no-save to avoid cluttering a local package-lock if one exists
73
73
  execSync('npm install --production --omit=dev', { stdio: 'inherit' });
74
74
 
75
- console.log(`\nāœ… Installation Complete!`);
76
- console.log(`--------------------------------------------------`);
77
- console.log(`Skill Location: ${TARGET_DIR}`);
78
- console.log(`Configuration: Check ~/.automaton/solana-wallet.json`);
79
- console.log(`--------------------------------------------------\n`);
75
+ // 4. Show/Generate Wallet Address
76
+ console.log(`\nšŸ” Initializing Agent Identity...`);
77
+ try {
78
+ const checkScript = `
79
+ const { Keypair } = require('@solana/web3.js');
80
+ const fs = require('fs');
81
+ const path = require('path');
82
+ const walletPath = path.join(process.env.HOME || '/root', '.automaton', 'solana-wallet.json');
83
+
84
+ let keypair;
85
+ if (fs.existsSync(walletPath)) {
86
+ const raw = fs.readFileSync(walletPath, 'utf8');
87
+ keypair = Keypair.fromSecretKey(Uint8Array.from(JSON.parse(raw)));
88
+ } else {
89
+ keypair = Keypair.generate();
90
+ const dir = path.dirname(walletPath);
91
+ if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true, mode: 0o700 });
92
+ fs.writeFileSync(walletPath, JSON.stringify(Array.from(keypair.secretKey)), { mode: 0o600 });
93
+ }
94
+ console.log(keypair.publicKey.toBase58());
95
+ `;
96
+ const address = execSync(`node -e "${checkScript.replace(/\n/g, '')}"`, { encoding: 'utf8' }).trim();
97
+
98
+ console.log(`\nāœ… Installation Complete!`);
99
+ console.log(`--------------------------------------------------`);
100
+ console.log(`Skill Location : ${TARGET_DIR}`);
101
+ console.log(`AGENT ADDRESS : ${address} šŸ‘ˆ FUND THIS ADDRESS`);
102
+ console.log(`--------------------------------------------------`);
103
+ console.log(`\nšŸ’” To start the agent, your human user must fund it with at least 0.05 SOL.`);
104
+ console.log(` Config file: ~/.automaton/solana-wallet.json\n`);
105
+ } catch (e) {
106
+ console.log(`\nāœ… Installation Complete!`);
107
+ console.log(`Skill Location : ${TARGET_DIR}`);
108
+ console.log(`(Identity check failed, will generate on first run)`);
109
+ }
80
110
 
81
111
  } catch (error) {
82
112
  console.error(`\nāŒ Installation failed: ${error.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solana-terminator-skill",
3
- "version": "4.1.4",
3
+ "version": "4.1.6",
4
4
  "description": "Full Solana toolkit for AI agents. Install via npx solana-terminator-skill.",
5
5
  "main": "solana-autonomy.js",
6
6
  "type": "module",