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.
- package/README.md +20 -15
- package/install.js +36 -6
- 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
|
-
##
|
|
32
|
+
## 𧬠Survival & Multi-chain Identity
|
|
33
33
|
|
|
34
|
-
|
|
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
|
-
|
|
37
|
-
|
|
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
|
-
###
|
|
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
|
-
|
|
45
|
-
# 1. Create skill directory
|
|
46
|
-
mkdir -p ~/.automaton/skills/solana-terminator
|
|
48
|
+
## š Installation & Funding
|
|
47
49
|
|
|
48
|
-
|
|
49
|
-
# (solana-autonomy.js, SKILL.md, package.json)
|
|
50
|
+
Initialize the skill and get your agent's address in one command:
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
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.
|
|
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
|
-
|
|
76
|
-
console.log(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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}`);
|