shll-skills 2.0.5 → 2.0.7

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 CHANGED
@@ -48,86 +48,102 @@ SHLL uses **two separate wallets** for maximum security:
48
48
 
49
49
  ## CONVERSATION FLOW: New User Onboarding
50
50
 
51
- When a user wants to use SHLL for the first time, follow this decision tree:
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 set up for SHLL? (a RUNNER_PRIVATE_KEY)"*
57
+ Ask: *"Do you already have an operator wallet (RUNNER_PRIVATE_KEY)?"*
56
58
 
57
- **If NO** → Generate one:
59
+ **If NO** → YOU execute this right now:
58
60
  ```bash
59
61
  shll-run generate-wallet
60
62
  ```
61
63
 
62
- Tell the user:
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."*
64
+ Then YOU set the environment variable from the output:
65
+ ```bash
66
+ export RUNNER_PRIVATE_KEY="0x<key from output>"
67
+ ```
67
68
 
68
- **If YES** Set it:
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
+
75
+ **If YES** → YOU set it:
69
76
  ```bash
70
- export RUNNER_PRIVATE_KEY="0x..."
77
+ export RUNNER_PRIVATE_KEY="0x<user's key>"
71
78
  ```
72
79
 
73
- ### Step 2: Check gas balance & token-id
80
+ ### Step 2: Check balance & ask about token-id
74
81
 
82
+ YOU execute:
75
83
  ```bash
76
84
  shll-run balance
77
85
  ```
78
86
 
79
- Ask user: *"Do you already have a SHLL Agent token-id (a number like 4, 5, etc.)?"*
87
+ Show the result, then ask: *"Do you already have a SHLL Agent token-id (a number)?"*
80
88
 
81
- **If user says YES and gives a number** → Go to Step 4.
89
+ - **If YES** → go to Step 4.
90
+ - **If NO / don't know / "next" / "continue"** → go to Step 3.
82
91
 
83
- **If user says NO, or doesn't know, or says "next" / "continue" / any variation** → Go to Step 3 immediately.
92
+ ### Step 3: Create agent YOU do this, not the user
84
93
 
85
- ### Step 3: Create the agent — YOU MUST DO THIS, DO NOT SKIP
94
+ **3a.** YOU query available agent templates:
95
+ ```bash
96
+ shll-run listings
97
+ ```
98
+
99
+ Show the user a clear list:
100
+ *"Here are the available agents:"*
86
101
 
87
- 🚨 **MANDATORY**: If the user doesn't have a token-id, you MUST run `setup-guide` RIGHT NOW. Do not ask them to "go to a website". Do not keep asking for a token-id they don't have. YOU generate the link for them.
102
+ | # | Name | Type | Price/day | Min days |
103
+ |---|------|------|-----------|----------|
104
+ | 1 | LLM Trader Agent | llm_trader | 0.0005 BNB | 1 |
88
105
 
89
- **First ask**: *"How many days do you want to rent the agent? (default: 1 day, you can extend later)"*
90
- - If user says a number → use that number.
91
- - If user says "default" / "ok" / doesn't specify → use 1.
106
+ *"Which one do you want? And how many days? (default: 1 day, can extend later)"*
92
107
 
93
- **Then immediately run**:
108
+ **3b.** Once user picks, YOU execute:
94
109
  ```bash
95
- shll-run setup-guide --listing-id <LISTING_ID> --days <DAYS>
110
+ shll-run setup-guide --listing-id <SELECTED_ID> --days <DAYS>
96
111
  ```
97
112
 
98
- Then tell the user:
113
+ Take the `setupUrl` from the JSON output and tell the user:
99
114
 
100
- *"I've generated your setup link. This page lets you **pay the rental fee** and **authorize the operator wallet** — open it now:*
101
- *👉 `<URL from command output>`*
115
+ *"I've prepared everything. Now open this link to **pay the rental fee and authorize the operator wallet**:*
116
+ *👉 `<setupUrl>`*
102
117
 
103
- *⚠️ Connect your **personal wallet** (MetaMask / hardware wallet) — NOT the operator wallet I generated earlier.*
118
+ *⚠️ Connect your **personal wallet** (MetaMask / hardware wallet) — NOT the operator wallet.*
104
119
 
105
120
  *The page walks you through:*
106
- 1. *Pay — pays the rental fee, mints your Agent NFT*
107
- 2. *Authorize — allows the operator wallet to trade on your behalf*
108
- 3. *Fund — deposits BNB into the trading vault (optional, can skip)*
109
- 4. *Done — shows your **token-id** number*
121
+ 1. *Pay — rental fee, creates your Agent NFT*
122
+ 2. *Authorize — allows me to trade on your behalf*
123
+ 3. *Fund — deposit BNB to the trading vault (optional)*
124
+ 4. *Done — shows your **token-id***
125
+
126
+ *Tell me the token-id when you're done."*
110
127
 
111
- *Paste the token-id here when you're done, and I'll start trading for you."*
128
+ **FORBIDDEN PATTERNS:**
129
+ - Telling the user to run `shll-run` or `node dist/index.js` commands themselves
130
+ - "Please prepare your token-id" (they don't have one yet!)
131
+ - Showing raw CLI commands for the user to copy-paste
132
+ - Asking for token-id repeatedly without running setup-guide first
112
133
 
113
- **FORBIDDEN PATTERNS never do any of these:**
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
134
+ ### Step 4: Verify & ready to trade
118
135
 
119
- **If the user already has a token-id**, verify it:
136
+ YOU execute:
120
137
  ```bash
121
- shll-run portfolio -k <ID>
138
+ shll-run portfolio -k <TOKEN_ID>
122
139
  ```
123
140
 
124
- ### Step 4: Ready to trade!
141
+ Show results and tell user: *"Your agent is ready! What would you like to do?"*
125
142
 
126
- The user is now set up. They can ask you things like:
143
+ Examples:
127
144
  - "Swap 0.1 BNB for USDC"
128
- - "What's in my portfolio?"
145
+ - "What's my portfolio?"
129
146
  - "What's the price of CAKE?"
130
- - "Tighten my spending limit to 0.5 BNB per transaction"
131
147
 
132
148
  ---
133
149
 
@@ -138,7 +154,8 @@ The user is now set up. They can ask you things like:
138
154
  |---------|-------------|
139
155
  | `shll-run generate-wallet` | Create a new operator wallet (address + private key) |
140
156
  | `shll-run balance` | Check operator wallet BNB balance |
141
- | `shll-run setup-guide -l <LISTING> -d <DAYS>` | Output setup instructions + shll.run link for secure onboarding |
157
+ | `shll-run listings` | List all available agent templates (name, type, price) |
158
+ | `shll-run setup-guide [-l <LISTING>] [-d <DAYS>]` | Output setup link for onboarding (defaults: auto listing-id, 1 day) |
142
159
  | ~~`shll-run init`~~ | **DEPRECATED** — insecure single-wallet mode |
143
160
 
144
161
  ### Trading
package/dist/index.js CHANGED
@@ -507,6 +507,7 @@ var DEFAULT_NFA = "0xe98dcdbf370d7b52c9a2b88f79bef514a5375a2b";
507
507
  var DEFAULT_GUARD = "0x25d17ea0e3bcb8ca08a2bfe917e817afc05dbbb3";
508
508
  var DEFAULT_RPC = "https://bsc-dataseed1.binance.org";
509
509
  var DEFAULT_LISTING_MANAGER = "0x322E7b1DaefE32E3D25defEA731C6384425E5A9f";
510
+ var DEFAULT_LISTING_ID = "0x792d9b08749fd9739b7e57217daa08a673042fe9e1e1c35545e99acb72c12186";
510
511
  var PANCAKE_V2_ROUTER = "0x10ED43C718714eb63d5aA57B78B54704E256024E";
511
512
  var WBNB = "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c";
512
513
  var TOKEN_REGISTRY = {
@@ -1466,7 +1467,42 @@ configCmd.action(async (opts) => {
1466
1467
  process.exit(1);
1467
1468
  }
1468
1469
  });
1469
- var setupGuideCmd = new import_commander.Command("setup-guide").description("Output step-by-step instructions for secure dual-wallet agent setup").requiredOption("-l, --listing-id <bytes32>", "Template listing ID (bytes32 hex)").requiredOption("-d, --days <number>", "Number of days to rent").option("-r, --rpc <url>", "BSC RPC URL", DEFAULT_RPC).option("--listing-manager <address>", "ListingManagerV2 address", DEFAULT_LISTING_MANAGER).option("--nfa-address <address>", "AgentNFA contract address", DEFAULT_NFA);
1470
+ var DEFAULT_INDEXER = "https://indexer.shll.run";
1471
+ var listingsCmd = new import_commander.Command("listings").description("List all available agent templates for rent").option("--indexer <url>", "Indexer API URL", DEFAULT_INDEXER).action(async (opts) => {
1472
+ try {
1473
+ const indexerUrl = opts.indexer || DEFAULT_INDEXER;
1474
+ const res = await fetch(`${indexerUrl}/api/listings`);
1475
+ if (!res.ok) {
1476
+ output({ status: "error", message: `Indexer returned ${res.status}` });
1477
+ process.exit(1);
1478
+ }
1479
+ const data = await res.json();
1480
+ const available = data.items.filter((l) => l.active);
1481
+ if (available.length === 0) {
1482
+ output({ status: "success", message: "No active listings found.", listings: [] });
1483
+ return;
1484
+ }
1485
+ const listings = available.map((l) => ({
1486
+ listingId: l.id,
1487
+ name: l.agentName || "Unnamed Agent",
1488
+ type: l.agentType || "unknown",
1489
+ pricePerDayBNB: (Number(l.pricePerDay) / 1e18).toFixed(6),
1490
+ minDays: l.minDays,
1491
+ nfa: l.nfa
1492
+ }));
1493
+ output({
1494
+ status: "success",
1495
+ count: listings.length,
1496
+ listings,
1497
+ hint: "Use the listingId with setup-guide: shll-run setup-guide --listing-id <ID> --days <N>"
1498
+ });
1499
+ } catch (error) {
1500
+ const message = error instanceof Error ? error.message : "Unknown error";
1501
+ output({ status: "error", message });
1502
+ process.exit(1);
1503
+ }
1504
+ });
1505
+ var setupGuideCmd = new import_commander.Command("setup-guide").description("Output step-by-step instructions for secure dual-wallet agent setup").option("-l, --listing-id <bytes32>", "Template listing ID (bytes32 hex)", DEFAULT_LISTING_ID).option("-d, --days <number>", "Number of days to rent", "1").option("-r, --rpc <url>", "BSC RPC URL", DEFAULT_RPC).option("--listing-manager <address>", "ListingManagerV2 address", DEFAULT_LISTING_MANAGER).option("--nfa-address <address>", "AgentNFA contract address", DEFAULT_NFA);
1470
1506
  setupGuideCmd.action(async (opts) => {
1471
1507
  try {
1472
1508
  const pk = process.env.RUNNER_PRIVATE_KEY;
@@ -1626,6 +1662,7 @@ program.addCommand(transferCmd);
1626
1662
  program.addCommand(policiesCmd);
1627
1663
  program.addCommand(configCmd);
1628
1664
  program.addCommand(setupGuideCmd);
1665
+ program.addCommand(listingsCmd);
1629
1666
  program.addCommand(genWalletCmd);
1630
1667
  program.addCommand(balanceCmd);
1631
1668
  program.parse(process.argv);
package/dist/index.mjs CHANGED
@@ -517,6 +517,7 @@ var DEFAULT_NFA = "0xe98dcdbf370d7b52c9a2b88f79bef514a5375a2b";
517
517
  var DEFAULT_GUARD = "0x25d17ea0e3bcb8ca08a2bfe917e817afc05dbbb3";
518
518
  var DEFAULT_RPC = "https://bsc-dataseed1.binance.org";
519
519
  var DEFAULT_LISTING_MANAGER = "0x322E7b1DaefE32E3D25defEA731C6384425E5A9f";
520
+ var DEFAULT_LISTING_ID = "0x792d9b08749fd9739b7e57217daa08a673042fe9e1e1c35545e99acb72c12186";
520
521
  var PANCAKE_V2_ROUTER = "0x10ED43C718714eb63d5aA57B78B54704E256024E";
521
522
  var WBNB = "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c";
522
523
  var TOKEN_REGISTRY = {
@@ -1476,7 +1477,42 @@ configCmd.action(async (opts) => {
1476
1477
  process.exit(1);
1477
1478
  }
1478
1479
  });
1479
- var setupGuideCmd = new Command("setup-guide").description("Output step-by-step instructions for secure dual-wallet agent setup").requiredOption("-l, --listing-id <bytes32>", "Template listing ID (bytes32 hex)").requiredOption("-d, --days <number>", "Number of days to rent").option("-r, --rpc <url>", "BSC RPC URL", DEFAULT_RPC).option("--listing-manager <address>", "ListingManagerV2 address", DEFAULT_LISTING_MANAGER).option("--nfa-address <address>", "AgentNFA contract address", DEFAULT_NFA);
1480
+ var DEFAULT_INDEXER = "https://indexer.shll.run";
1481
+ var listingsCmd = new Command("listings").description("List all available agent templates for rent").option("--indexer <url>", "Indexer API URL", DEFAULT_INDEXER).action(async (opts) => {
1482
+ try {
1483
+ const indexerUrl = opts.indexer || DEFAULT_INDEXER;
1484
+ const res = await fetch(`${indexerUrl}/api/listings`);
1485
+ if (!res.ok) {
1486
+ output({ status: "error", message: `Indexer returned ${res.status}` });
1487
+ process.exit(1);
1488
+ }
1489
+ const data = await res.json();
1490
+ const available = data.items.filter((l) => l.active);
1491
+ if (available.length === 0) {
1492
+ output({ status: "success", message: "No active listings found.", listings: [] });
1493
+ return;
1494
+ }
1495
+ const listings = available.map((l) => ({
1496
+ listingId: l.id,
1497
+ name: l.agentName || "Unnamed Agent",
1498
+ type: l.agentType || "unknown",
1499
+ pricePerDayBNB: (Number(l.pricePerDay) / 1e18).toFixed(6),
1500
+ minDays: l.minDays,
1501
+ nfa: l.nfa
1502
+ }));
1503
+ output({
1504
+ status: "success",
1505
+ count: listings.length,
1506
+ listings,
1507
+ hint: "Use the listingId with setup-guide: shll-run setup-guide --listing-id <ID> --days <N>"
1508
+ });
1509
+ } catch (error) {
1510
+ const message = error instanceof Error ? error.message : "Unknown error";
1511
+ output({ status: "error", message });
1512
+ process.exit(1);
1513
+ }
1514
+ });
1515
+ var setupGuideCmd = new Command("setup-guide").description("Output step-by-step instructions for secure dual-wallet agent setup").option("-l, --listing-id <bytes32>", "Template listing ID (bytes32 hex)", DEFAULT_LISTING_ID).option("-d, --days <number>", "Number of days to rent", "1").option("-r, --rpc <url>", "BSC RPC URL", DEFAULT_RPC).option("--listing-manager <address>", "ListingManagerV2 address", DEFAULT_LISTING_MANAGER).option("--nfa-address <address>", "AgentNFA contract address", DEFAULT_NFA);
1480
1516
  setupGuideCmd.action(async (opts) => {
1481
1517
  try {
1482
1518
  const pk = process.env.RUNNER_PRIVATE_KEY;
@@ -1636,6 +1672,7 @@ program.addCommand(transferCmd);
1636
1672
  program.addCommand(policiesCmd);
1637
1673
  program.addCommand(configCmd);
1638
1674
  program.addCommand(setupGuideCmd);
1675
+ program.addCommand(listingsCmd);
1639
1676
  program.addCommand(genWalletCmd);
1640
1677
  program.addCommand(balanceCmd);
1641
1678
  program.parse(process.argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shll-skills",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "SHLL Agent Runtime Skill for OpenClaw",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -20,6 +20,7 @@ const DEFAULT_NFA = "0xe98dcdbf370d7b52c9a2b88f79bef514a5375a2b";
20
20
  const DEFAULT_GUARD = "0x25d17ea0e3bcb8ca08a2bfe917e817afc05dbbb3";
21
21
  const DEFAULT_RPC = "https://bsc-dataseed1.binance.org";
22
22
  const DEFAULT_LISTING_MANAGER = "0x322E7b1DaefE32E3D25defEA731C6384425E5A9f";
23
+ const DEFAULT_LISTING_ID = "0x792d9b08749fd9739b7e57217daa08a673042fe9e1e1c35545e99acb72c12186";
23
24
  const PANCAKE_V2_ROUTER = "0x10ED43C718714eb63d5aA57B78B54704E256024E";
24
25
  const WBNB = "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c";
25
26
 
@@ -1240,11 +1241,68 @@ configCmd.action(async (opts) => {
1240
1241
  }
1241
1242
  });
1242
1243
 
1244
+ // -- Subcommand: listings (query available agent templates) --------
1245
+ const DEFAULT_INDEXER = "https://indexer.shll.run";
1246
+
1247
+ const listingsCmd = new Command("listings")
1248
+ .description("List all available agent templates for rent")
1249
+ .option("--indexer <url>", "Indexer API URL", DEFAULT_INDEXER)
1250
+ .action(async (opts) => {
1251
+ try {
1252
+ const indexerUrl = opts.indexer || DEFAULT_INDEXER;
1253
+ const res = await fetch(`${indexerUrl}/api/listings`);
1254
+ if (!res.ok) {
1255
+ output({ status: "error", message: `Indexer returned ${res.status}` });
1256
+ process.exit(1);
1257
+ }
1258
+ const data = await res.json() as {
1259
+ items: Array<{
1260
+ id: string;
1261
+ agentName: string;
1262
+ agentType: string;
1263
+ pricePerDay: string;
1264
+ minDays: number;
1265
+ active: boolean;
1266
+ nfa: string;
1267
+ tokenId: string;
1268
+ owner: string;
1269
+ }>;
1270
+ count: number;
1271
+ };
1272
+
1273
+ const available = data.items.filter((l) => l.active);
1274
+ if (available.length === 0) {
1275
+ output({ status: "success", message: "No active listings found.", listings: [] });
1276
+ return;
1277
+ }
1278
+
1279
+ const listings = available.map((l) => ({
1280
+ listingId: l.id,
1281
+ name: l.agentName || "Unnamed Agent",
1282
+ type: l.agentType || "unknown",
1283
+ pricePerDayBNB: (Number(l.pricePerDay) / 1e18).toFixed(6),
1284
+ minDays: l.minDays,
1285
+ nfa: l.nfa,
1286
+ }));
1287
+
1288
+ output({
1289
+ status: "success",
1290
+ count: listings.length,
1291
+ listings,
1292
+ hint: "Use the listingId with setup-guide: shll-run setup-guide --listing-id <ID> --days <N>",
1293
+ });
1294
+ } catch (error: unknown) {
1295
+ const message = error instanceof Error ? error.message : "Unknown error";
1296
+ output({ status: "error", message });
1297
+ process.exit(1);
1298
+ }
1299
+ });
1300
+
1243
1301
  // -- Subcommand: setup-guide (secure dual-wallet onboarding) ------
1244
1302
  const setupGuideCmd = new Command("setup-guide")
1245
1303
  .description("Output step-by-step instructions for secure dual-wallet agent setup")
1246
- .requiredOption("-l, --listing-id <bytes32>", "Template listing ID (bytes32 hex)")
1247
- .requiredOption("-d, --days <number>", "Number of days to rent")
1304
+ .option("-l, --listing-id <bytes32>", "Template listing ID (bytes32 hex)", DEFAULT_LISTING_ID)
1305
+ .option("-d, --days <number>", "Number of days to rent", "1")
1248
1306
  .option("-r, --rpc <url>", "BSC RPC URL", DEFAULT_RPC)
1249
1307
  .option("--listing-manager <address>", "ListingManagerV2 address", DEFAULT_LISTING_MANAGER)
1250
1308
  .option("--nfa-address <address>", "AgentNFA contract address", DEFAULT_NFA);
@@ -1433,6 +1491,7 @@ program.addCommand(transferCmd);
1433
1491
  program.addCommand(policiesCmd);
1434
1492
  program.addCommand(configCmd);
1435
1493
  program.addCommand(setupGuideCmd);
1494
+ program.addCommand(listingsCmd);
1436
1495
  program.addCommand(genWalletCmd);
1437
1496
  program.addCommand(balanceCmd);
1438
1497
  program.parse(process.argv);