shll-skills 2.0.6 → 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
@@ -91,11 +91,23 @@ Show the result, then ask: *"Do you already have a SHLL Agent token-id (a number
91
91
 
92
92
  ### Step 3: Create agent — YOU do this, not the user
93
93
 
94
- Ask ONE question: *"How many days do you want to rent? (default: 1 day, you can extend later)"*
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:"*
101
+
102
+ | # | Name | Type | Price/day | Min days |
103
+ |---|------|------|-----------|----------|
104
+ | 1 | LLM Trader Agent | llm_trader | 0.0005 BNB | 1 |
105
+
106
+ *"Which one do you want? And how many days? (default: 1 day, can extend later)"*
95
107
 
96
- Then YOU execute immediately (do NOT show the command to the user, just run it):
108
+ **3b.** Once user picks, YOU execute:
97
109
  ```bash
98
- shll-run setup-guide --listing-id <LISTING_ID> --days <DAYS>
110
+ shll-run setup-guide --listing-id <SELECTED_ID> --days <DAYS>
99
111
  ```
100
112
 
101
113
  Take the `setupUrl` from the JSON output and tell the user:
@@ -142,7 +154,8 @@ Examples:
142
154
  |---------|-------------|
143
155
  | `shll-run generate-wallet` | Create a new operator wallet (address + private key) |
144
156
  | `shll-run balance` | Check operator wallet BNB balance |
145
- | `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) |
146
159
  | ~~`shll-run init`~~ | **DEPRECATED** — insecure single-wallet mode |
147
160
 
148
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.6",
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);