cornerstone-autonomous-agent 1.0.3 → 1.1.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/README.md CHANGED
@@ -178,6 +178,37 @@ Example `~/.openclaw/openclaw.json` to load this repo’s skills:
178
178
  }
179
179
  ```
180
180
 
181
+ ### Publishing this skill on MoltBook / OpenClaw (ClawHub)
182
+
183
+ [ClawHub](https://clawhub.ai) is the public skill registry for MoltBook and OpenClaw. Publishing lets others install your skill with `clawhub install autonomous-agent`.
184
+
185
+ 1. **Install the ClawHub CLI**
186
+ ```bash
187
+ npm i -g clawhub
188
+ ```
189
+ or `pnpm add -g clawhub`.
190
+
191
+ 2. **Log in** (GitHub account required; must be at least one week old to publish)
192
+ ```bash
193
+ clawhub login
194
+ ```
195
+ This opens a browser to authenticate. For CI or headless: `clawhub login --token <token>`.
196
+
197
+ 3. **Publish the skill** from the repo root:
198
+ ```bash
199
+ clawhub publish ./skills/autonomous-agent --slug autonomous-agent --name "Autonomous Agent (x402)" --version 1.0.0 --changelog "Initial release" --tags latest
200
+ ```
201
+ - `--slug` must match the folder name (`autonomous-agent`) so installs work as `clawhub install autonomous-agent`.
202
+ - Omit `--version` / `--changelog` to be prompted. For later releases, bump version (e.g. `--version 1.0.1`) and add a `--changelog` line.
203
+
204
+ 4. **Update an existing skill** (after you change `SKILL.md` or metadata): run `publish` again with a new version:
205
+ ```bash
206
+ clawhub publish ./skills/autonomous-agent --slug autonomous-agent --name "Autonomous Agent (x402)" --version 1.0.1 --changelog "Description of changes" --tags latest
207
+ ```
208
+ Alternatively, `clawhub sync --root . --all --bump patch --changelog "Description"` scans the repo and publishes changed skills with a bumped version.
209
+
210
+ After publishing, the skill appears on [clawhub.ai](https://clawhub.ai) and users can run `clawhub install autonomous-agent` (into `./skills` by default).
211
+
181
212
  ## Deployment order
182
213
 
183
214
  1. **x402 facilitator** — Use public (e.g. https://x402-navy.vercel.app/facilitator) for full demo; or run local and set X402_EVM_FACILITATOR_URL to public for open_bank_account.
@@ -190,8 +221,6 @@ Example `~/.openclaw/openclaw.json` to load this repo’s skills:
190
221
  - [Canteen App – Aptos x402](https://canteenapp-aptos-x402.notion.site/) — wallet hydration and crediting
191
222
  - [LangChain.js MCP](https://js.langchain.com/docs/integrations/toolkits/mcp_toolbox)
192
223
  - [Hugging Face Inference – OpenAI-compatible](https://huggingface.co/docs/api-inference/en/index)
193
- - [evm-wallet-skill](https://github.com/surfer77/evm-wallet-skill) — self-sovereign EVM wallet pattern for agents
194
-
195
224
  ## License
196
225
 
197
226
  GPL-2.0-only. Use of this software is also subject to the [Responsible AI License (RAIL)](https://www.licenses.ai/). See [LICENSE.md](LICENSE.md) (GPL-2) and [RAIL](https://www.licenses.ai/).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cornerstone-autonomous-agent",
3
- "version": "1.0.3",
3
+ "version": "1.1.1",
4
4
  "description": "CornerStone Agentic Score: autonomous agent that uses an x402-enabled MCP server to predict tickers, backtest trading strategies, and open bank accounts. Handles 402 Payment Required (pay via Aptos/Ethereum facilitator and retry). LangChain.js ReAct agent with Hugging Face inference (OpenAI-compatible endpoint).",
5
5
  "type": "module",
6
6
  "main": "src/run-agent.js",
@@ -20,8 +20,7 @@ npm install
20
20
 
21
21
  Set `MCP_SERVER_URL` to `https://borrower.replit.app`. Copy `.env.example` to `.env` and set:
22
22
 
23
- - `MCP_SERVER_URL` – MCP server base URL
24
- - `X402_FACILITATOR_URL` – x402 facilitator (verify/settle)
23
+ - `MCP_SERVER_URL` – `https://borrower.replit.app`
25
24
  - `LLM_BASE_URL`, `HUGGINGFACE_API_KEY` or `HF_TOKEN`, `LLM_MODEL` – for inference
26
25
  - `APTOS_WALLET_PATH`, `EVM_WALLET_PATH` (or `EVM_PRIVATE_KEY`) – for payments
27
26
 
@@ -15,7 +15,7 @@ import { fileURLToPath } from 'url';
15
15
 
16
16
  const __dirname = dirname(fileURLToPath(import.meta.url));
17
17
  const PACKAGE_PATH = join(__dirname, '..', 'package.json');
18
- const REPO = 'surfer77/evm-wallet-skill';
18
+ const REPO = 'FinTechTonic/autonomous-agent';
19
19
  const CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000; // 24 hours
20
20
  const STATE_FILE = join(__dirname, '..', '.update-check.json');
21
21
 
@@ -33,7 +33,7 @@ export function getLocalVersion() {
33
33
  */
34
34
  async function fetchLatestVersion() {
35
35
  // Try GitHub API (works for public repos, or private with GH_TOKEN)
36
- const headers = { 'User-Agent': 'evm-wallet-skill' };
36
+ const headers = { 'User-Agent': 'autonomous-agent' };
37
37
 
38
38
  // Check for GitHub token in environment
39
39
  const token = process.env.GH_TOKEN || process.env.GITHUB_TOKEN;
@@ -157,7 +157,7 @@ export async function printUpdateNag() {
157
157
  try {
158
158
  const update = await checkForUpdate();
159
159
  if (update) {
160
- console.error(`\n⚠️ Update available: ${update.currentVersion} → ${update.latestVersion} — run: clawdhub update evm-wallet-skill\n`);
160
+ console.error(`\n⚠️ Update available: ${update.currentVersion} → ${update.latestVersion} — run: clawdhub update autonomous-agent\n`);
161
161
  }
162
162
  } catch {
163
163
  // Silent fail — never block the main command
@@ -183,7 +183,7 @@ if (process.argv[1] && process.argv[1].includes('check-update')) {
183
183
  console.log(`Current version: ${localVersion}`);
184
184
  if (update) {
185
185
  console.log(`⚠️ Update available: ${update.currentVersion} → ${update.latestVersion}`);
186
- console.log(`Run: clawdhub update evm-wallet-skill`);
186
+ console.log(`Run: clawdhub update autonomous-agent`);
187
187
  } else {
188
188
  console.log('✅ Up to date');
189
189
  }
package/SKILL-clawdhub.md DELETED
@@ -1,180 +0,0 @@
1
- ---
2
- name: evm-wallet-skill
3
- description: Self-sovereign EVM wallet for AI agents. Use when the user wants to create a crypto wallet, check balances, send ETH or ERC20 tokens, swap tokens, or interact with smart contracts. Supports Base, Ethereum, Polygon, Arbitrum, and Optimism. Private keys stored locally — no cloud custody, no API keys required.
4
- metadata: {"clawdbot":{"emoji":"💰","homepage":"https://github.com/surfer77/evm-wallet-skill","requires":{"bins":["node","git"]}}}
5
- ---
6
-
7
- # EVM Wallet Skill
8
-
9
- Self-sovereign EVM wallet. Private keys stored locally, no external API dependencies.
10
-
11
- ## Installation
12
-
13
- Detect workspace and skill directory:
14
- ```bash
15
- SKILL_DIR=$(ls -d \
16
- ~/openclaw/skills/evm-wallet \
17
- ~/OpenClaw/skills/evm-wallet \
18
- ~/clawd/skills/evm-wallet \
19
- ~/moltbot/skills/evm-wallet \
20
- ~/molt/skills/evm-wallet \
21
- 2>/dev/null | head -1)
22
- ```
23
-
24
- If code is not installed yet (no `src/` folder), bootstrap it:
25
- ```bash
26
- if [ ! -d "$SKILL_DIR/src" ]; then
27
- git clone https://github.com/surfer77/evm-wallet-skill.git /tmp/evm-wallet-tmp
28
- cp -r /tmp/evm-wallet-tmp/* "$SKILL_DIR/"
29
- cp /tmp/evm-wallet-tmp/.gitignore "$SKILL_DIR/" 2>/dev/null
30
- rm -rf /tmp/evm-wallet-tmp
31
- cd "$SKILL_DIR" && npm install
32
- fi
33
- ```
34
-
35
- **For all commands below**, always `cd "$SKILL_DIR"` first.
36
-
37
- ## First-Time Setup
38
-
39
- Generate a wallet (only needed once):
40
- ```bash
41
- node src/setup.js --json
42
- ```
43
-
44
- Returns: `{ "success": true, "address": "0x..." }`
45
-
46
- The private key is stored at `~/.evm-wallet.json` (chmod 600). **Never share this file.**
47
-
48
- ## Commands
49
-
50
- ### Check Balance
51
-
52
- When user asks about balance, portfolio, or how much they have:
53
-
54
- ```bash
55
- # Single chain
56
- node src/balance.js base --json
57
-
58
- # All chains at once
59
- node src/balance.js --all --json
60
-
61
- # Specific ERC20 token
62
- node src/balance.js base 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 --json
63
- ```
64
-
65
- **Always use `--json`** for parsing. Present results in a human-readable format.
66
-
67
- ### Send Tokens
68
-
69
- When user wants to send, transfer, or pay someone:
70
-
71
- ```bash
72
- # Native ETH
73
- node src/transfer.js <chain> <to_address> <amount> --yes --json
74
-
75
- # ERC20 token
76
- node src/transfer.js <chain> <to_address> <amount> <token_address> --yes --json
77
- ```
78
-
79
- **⚠️ ALWAYS confirm with the user before executing transfers.** Show them:
80
- - Recipient address
81
- - Amount and token
82
- - Chain
83
- - Estimated gas cost
84
-
85
- Only add `--yes` after the user explicitly confirms.
86
-
87
- ### Swap Tokens
88
-
89
- When user wants to swap, trade, buy, or sell tokens:
90
-
91
- ```bash
92
- # Get quote first
93
- node src/swap.js <chain> <from_token> <to_token> <amount> --quote-only --json
94
-
95
- # Execute swap (after user confirms)
96
- node src/swap.js <chain> <from_token> <to_token> <amount> --yes --json
97
- ```
98
-
99
- - Use `eth` for native ETH/POL, or pass a contract address
100
- - Default slippage: 0.5%. Override with `--slippage <percent>`
101
- - Powered by Odos aggregator (best-route across hundreds of DEXs)
102
-
103
- **⚠️ ALWAYS show the quote first and get user confirmation before executing.**
104
-
105
- ### Contract Interactions
106
-
107
- When user wants to call a smart contract function:
108
-
109
- ```bash
110
- # Read (free, no gas)
111
- node src/contract.js <chain> <contract_address> \
112
- "<function_signature>" [args...] --json
113
-
114
- # Write (costs gas — confirm first)
115
- node src/contract.js <chain> <contract_address> \
116
- "<function_signature>" [args...] --yes --json
117
- ```
118
-
119
- Examples:
120
- ```bash
121
- # Check USDC balance
122
- node src/contract.js base \
123
- 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 \
124
- "balanceOf(address)" 0xWALLET --json
125
-
126
- # Approve token spending
127
- node src/contract.js base \
128
- 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 \
129
- "approve(address,uint256)" 0xSPENDER 1000000 --yes --json
130
- ```
131
-
132
- ### Check for Updates
133
-
134
- ```bash
135
- node src/check-update.js --json
136
- ```
137
-
138
- If an update is available, inform the user and offer to run:
139
- ```bash
140
- cd "$SKILL_DIR" && git pull && npm install
141
- ```
142
-
143
- ## Supported Chains
144
-
145
- | Chain | Native Token | Use For |
146
- |-------|-------------|---------|
147
- | base | ETH | Cheapest fees — default for testing |
148
- | ethereum | ETH | Mainnet, highest fees |
149
- | polygon | POL | Low fees |
150
- | arbitrum | ETH | Low fees |
151
- | optimism | ETH | Low fees |
152
-
153
- **Always recommend Base** for first-time users (lowest gas fees).
154
-
155
- ## Common Token Addresses
156
-
157
- ### Base
158
- - **USDC:** `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`
159
- - **WETH:** `0x4200000000000000000000000000000000000006`
160
-
161
- ### Ethereum
162
- - **USDC:** `0xA0b86a33E6441b8a46a59DE4c4C5E8F5a6a7A8d0`
163
- - **WETH:** `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`
164
-
165
- ## Safety Rules
166
-
167
- 1. **Never execute transfers or swaps without user confirmation**
168
- 2. **Never expose the private key** from `~/.evm-wallet.json`
169
- 3. **Always show transaction details** before executing (amount, recipient, gas estimate)
170
- 4. **Recommend Base** for testing and small amounts
171
- 5. **Show explorer links** after successful transactions so users can verify
172
- 6. If a command fails, show the error clearly and suggest fixes
173
-
174
- ## Error Handling
175
-
176
- - **"No wallet found"** → Run `node src/setup.js --json` first
177
- - **"Insufficient balance"** → Show current balance, suggest funding
178
- - **"RPC error"** → Retry once, automatic failover built in
179
- - **"No route found"** (swap) → Token pair may lack liquidity
180
- - **"Gas estimation failed"** → May need more ETH for gas