shll-skills 2.0.4 → 2.0.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/SKILL.md +46 -42
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
- package/src/index.ts +2 -2
- package/tsup.config.ts +1 -1
package/SKILL.md
CHANGED
|
@@ -48,86 +48,90 @@ SHLL uses **two separate wallets** for maximum security:
|
|
|
48
48
|
|
|
49
49
|
## CONVERSATION FLOW: New User Onboarding
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
🚨 **CORE PRINCIPLE: YOU execute ALL commands. The user NEVER runs CLI commands.**
|
|
52
|
+
The user only needs to: (1) answer simple questions, (2) open a browser link, (3) click buttons on shll.run.
|
|
53
|
+
You do everything else by running `shll-run` commands directly.
|
|
52
54
|
|
|
53
55
|
### Step 1: Generate operator wallet
|
|
54
56
|
|
|
55
|
-
Ask: *"Do you already have an operator wallet
|
|
57
|
+
Ask: *"Do you already have an operator wallet (RUNNER_PRIVATE_KEY)?"*
|
|
56
58
|
|
|
57
|
-
**If NO** →
|
|
59
|
+
**If NO** → YOU execute this right now:
|
|
58
60
|
```bash
|
|
59
61
|
shll-run generate-wallet
|
|
60
62
|
```
|
|
61
63
|
|
|
62
|
-
|
|
63
|
-
- *"I've generated an operator wallet for you."*
|
|
64
|
-
- *"Address: `0xABC...` — send about $1 of BNB here for gas fees."*
|
|
65
|
-
- *"Private key: `0x123...` — save this securely, then set it as RUNNER_PRIVATE_KEY."*
|
|
66
|
-
- *"This is an OPERATOR wallet — it can only trade within safety limits. It CANNOT withdraw your vault funds or touch your agent ownership."*
|
|
67
|
-
|
|
68
|
-
**If YES** → Set it:
|
|
64
|
+
Then YOU set the environment variable from the output:
|
|
69
65
|
```bash
|
|
70
|
-
export RUNNER_PRIVATE_KEY="0x
|
|
66
|
+
export RUNNER_PRIVATE_KEY="0x<key from output>"
|
|
71
67
|
```
|
|
72
68
|
|
|
73
|
-
|
|
69
|
+
Tell user the **address only** (for them to fund gas), and explain:
|
|
70
|
+
- *"I've created and configured an operator wallet: `0xABC...`"*
|
|
71
|
+
- *"Send a small amount of BNB (~0.001 BNB) to this address for gas fees."*
|
|
72
|
+
- *"This wallet can only trade within safety limits — it cannot withdraw your vault."*
|
|
73
|
+
- *"Save the private key I showed above securely."*
|
|
74
74
|
|
|
75
|
+
**If YES** → YOU set it:
|
|
75
76
|
```bash
|
|
76
|
-
|
|
77
|
+
export RUNNER_PRIVATE_KEY="0x<user's key>"
|
|
77
78
|
```
|
|
78
79
|
|
|
79
|
-
|
|
80
|
+
### Step 2: Check balance & ask about token-id
|
|
80
81
|
|
|
81
|
-
|
|
82
|
+
YOU execute:
|
|
83
|
+
```bash
|
|
84
|
+
shll-run balance
|
|
85
|
+
```
|
|
82
86
|
|
|
83
|
-
|
|
87
|
+
Show the result, then ask: *"Do you already have a SHLL Agent token-id (a number)?"*
|
|
84
88
|
|
|
85
|
-
|
|
89
|
+
- **If YES** → go to Step 4.
|
|
90
|
+
- **If NO / don't know / "next" / "continue"** → go to Step 3.
|
|
86
91
|
|
|
87
|
-
|
|
92
|
+
### Step 3: Create agent — YOU do this, not the user
|
|
88
93
|
|
|
89
|
-
|
|
90
|
-
- If user says a number → use that number.
|
|
91
|
-
- If user says "default" / "ok" / doesn't specify → use 1.
|
|
94
|
+
Ask ONE question: *"How many days do you want to rent? (default: 1 day, you can extend later)"*
|
|
92
95
|
|
|
93
|
-
|
|
96
|
+
Then YOU execute immediately (do NOT show the command to the user, just run it):
|
|
94
97
|
```bash
|
|
95
98
|
shll-run setup-guide --listing-id <LISTING_ID> --days <DAYS>
|
|
96
99
|
```
|
|
97
100
|
|
|
98
|
-
|
|
101
|
+
Take the `setupUrl` from the JSON output and tell the user:
|
|
99
102
|
|
|
100
|
-
*"I've
|
|
101
|
-
*👉 `<
|
|
103
|
+
*"I've prepared everything. Now open this link to **pay the rental fee and authorize the operator wallet**:*
|
|
104
|
+
*👉 `<setupUrl>`*
|
|
102
105
|
|
|
103
|
-
*⚠️ Connect your **personal wallet** (MetaMask / hardware wallet) — NOT the operator wallet
|
|
106
|
+
*⚠️ Connect your **personal wallet** (MetaMask / hardware wallet) — NOT the operator wallet.*
|
|
104
107
|
|
|
105
108
|
*The page walks you through:*
|
|
106
|
-
1. *Pay —
|
|
107
|
-
2. *Authorize — allows
|
|
108
|
-
3. *Fund —
|
|
109
|
-
4. *Done — shows your **token-id
|
|
109
|
+
1. *Pay — rental fee, creates your Agent NFT*
|
|
110
|
+
2. *Authorize — allows me to trade on your behalf*
|
|
111
|
+
3. *Fund — deposit BNB to the trading vault (optional)*
|
|
112
|
+
4. *Done — shows your **token-id***
|
|
113
|
+
|
|
114
|
+
*Tell me the token-id when you're done."*
|
|
110
115
|
|
|
111
|
-
|
|
116
|
+
❌ **FORBIDDEN PATTERNS:**
|
|
117
|
+
- Telling the user to run `shll-run` or `node dist/index.js` commands themselves
|
|
118
|
+
- "Please prepare your token-id" (they don't have one yet!)
|
|
119
|
+
- Showing raw CLI commands for the user to copy-paste
|
|
120
|
+
- Asking for token-id repeatedly without running setup-guide first
|
|
112
121
|
|
|
113
|
-
|
|
114
|
-
- "Please prepare your token-id" (user doesn't have one!)
|
|
115
|
-
- "Go to shll.run and find your agent" (too vague!)
|
|
116
|
-
- "I need your token-id to proceed" (you should be CREATING it for them!)
|
|
117
|
-
- Asking for token-id more than once without running setup-guide
|
|
122
|
+
### Step 4: Verify & ready to trade
|
|
118
123
|
|
|
119
|
-
|
|
124
|
+
YOU execute:
|
|
120
125
|
```bash
|
|
121
|
-
shll-run portfolio -k <
|
|
126
|
+
shll-run portfolio -k <TOKEN_ID>
|
|
122
127
|
```
|
|
123
128
|
|
|
124
|
-
|
|
129
|
+
Show results and tell user: *"Your agent is ready! What would you like to do?"*
|
|
125
130
|
|
|
126
|
-
|
|
131
|
+
Examples:
|
|
127
132
|
- "Swap 0.1 BNB for USDC"
|
|
128
|
-
- "What's
|
|
133
|
+
- "What's my portfolio?"
|
|
129
134
|
- "What's the price of CAKE?"
|
|
130
|
-
- "Tighten my spending limit to 0.5 BNB per transaction"
|
|
131
135
|
|
|
132
136
|
---
|
|
133
137
|
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// src/index.ts
|
|
5
5
|
var import_commander = require("commander");
|
|
6
6
|
|
|
7
|
-
//
|
|
7
|
+
// node_modules/shll-policy-sdk/dist/index.js
|
|
8
8
|
var import_viem = require("viem");
|
|
9
9
|
var import_accounts = require("viem/accounts");
|
|
10
10
|
var import_chains = require("viem/chains");
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shll-skills",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "SHLL Agent Runtime Skill for OpenClaw",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"commander": "^12.0.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"
|
|
19
|
+
"shll-policy-sdk": "^1.0.0",
|
|
20
20
|
"tsup": "^8.0.2",
|
|
21
21
|
"typescript": "^5.4.5",
|
|
22
22
|
"@types/node": "^20.12.7"
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
-
import { PolicyClient } from "
|
|
4
|
-
import type { Action } from "
|
|
3
|
+
import { PolicyClient } from "shll-policy-sdk";
|
|
4
|
+
import type { Action } from "shll-policy-sdk";
|
|
5
5
|
import {
|
|
6
6
|
createPublicClient,
|
|
7
7
|
createWalletClient,
|