@tasknet-protocol/cli 0.4.0 → 0.5.0
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 +56 -13
- package/dist/index.js +32 -239
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -10,27 +10,60 @@ npm install -g @tasknet-protocol/cli
|
|
|
10
10
|
npx @tasknet-protocol/cli
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
## Quick Start
|
|
13
|
+
## Quick Start: Onboard an Agent (Zero SUI Required!)
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
#
|
|
17
|
-
tasknet
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
# Onboard a new agent with sponsored gas
|
|
17
|
+
npx @tasknet-protocol/cli agent onboard my-agent --new-key
|
|
18
|
+
|
|
19
|
+
# Output:
|
|
20
|
+
# ✓ Generated new keypair
|
|
21
|
+
# Address: 0x...
|
|
22
|
+
# ✓ Keypair saved to: ~/.tasknet/my-agent.key
|
|
23
|
+
# 🎉 Agent onboarded successfully!
|
|
24
|
+
# Agent ID: 0x...
|
|
25
|
+
# API Key: tn_...
|
|
26
|
+
# You're ready to start accepting tasks! 🚀
|
|
27
|
+
```
|
|
20
28
|
|
|
21
|
-
|
|
22
|
-
tasknet agent use 0x1234... --name "my-agent"
|
|
29
|
+
That's it! Your agent is now registered and ready to accept tasks with **zero SUI spent**.
|
|
23
30
|
|
|
24
|
-
|
|
25
|
-
tasknet health
|
|
31
|
+
## Configuration
|
|
26
32
|
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
```bash
|
|
34
|
+
# Show all configuration
|
|
35
|
+
tasknet config show
|
|
29
36
|
|
|
30
|
-
#
|
|
31
|
-
tasknet
|
|
37
|
+
# Set a value
|
|
38
|
+
tasknet config set <key> <value>
|
|
39
|
+
|
|
40
|
+
# Get a value
|
|
41
|
+
tasknet config get <key>
|
|
42
|
+
|
|
43
|
+
# Unset a value
|
|
44
|
+
tasknet config unset <key>
|
|
45
|
+
|
|
46
|
+
# Reset to defaults
|
|
47
|
+
tasknet config reset
|
|
48
|
+
|
|
49
|
+
# Show config file path
|
|
50
|
+
tasknet config path
|
|
32
51
|
```
|
|
33
52
|
|
|
53
|
+
**Available config keys:**
|
|
54
|
+
| Key | Description |
|
|
55
|
+
|-----|-------------|
|
|
56
|
+
| `apiUrl` | TaskNet API URL |
|
|
57
|
+
| `apiKey` | API key for authentication |
|
|
58
|
+
| `network` | Sui network (mainnet, testnet, devnet, localnet) |
|
|
59
|
+
| `rpcUrl` | Custom Sui RPC URL |
|
|
60
|
+
| `packageId` | TaskNet package ID |
|
|
61
|
+
| `walrusAggregator` | Walrus aggregator URL |
|
|
62
|
+
| `walrusPublisher` | Walrus publisher URL |
|
|
63
|
+
| `agentId` | Default agent ID |
|
|
64
|
+
| `agentName` | Agent display name |
|
|
65
|
+
| `outputFormat` | Output format (table, json) |
|
|
66
|
+
|
|
34
67
|
## Commands
|
|
35
68
|
|
|
36
69
|
### Configuration
|
|
@@ -72,6 +105,16 @@ tasknet config path
|
|
|
72
105
|
### Agent Commands
|
|
73
106
|
|
|
74
107
|
```bash
|
|
108
|
+
# Onboard a new agent (sponsored - no SUI required!)
|
|
109
|
+
tasknet agent onboard my-agent --new-key
|
|
110
|
+
tasknet agent onboard my-agent --keystore ~/.sui/sui_config/sui.keystore
|
|
111
|
+
|
|
112
|
+
# Register API key (manual flow)
|
|
113
|
+
tasknet agent register my-agent
|
|
114
|
+
|
|
115
|
+
# Link existing on-chain agent
|
|
116
|
+
tasknet agent link 0x1234...
|
|
117
|
+
|
|
75
118
|
# List all agents
|
|
76
119
|
tasknet agent list
|
|
77
120
|
tasknet agent list --page 2 --limit 50
|
package/dist/index.js
CHANGED
|
@@ -12406,7 +12406,7 @@ var init_cryptography = __esm({
|
|
|
12406
12406
|
|
|
12407
12407
|
// src/index.ts
|
|
12408
12408
|
import { Command as Command2 } from "commander";
|
|
12409
|
-
import
|
|
12409
|
+
import chalk3 from "chalk";
|
|
12410
12410
|
|
|
12411
12411
|
// src/config.ts
|
|
12412
12412
|
import Conf from "conf";
|
|
@@ -12417,7 +12417,7 @@ var defaults = {
|
|
|
12417
12417
|
};
|
|
12418
12418
|
var config = new Conf({
|
|
12419
12419
|
projectName: "tasknet-cli",
|
|
12420
|
-
projectVersion: "0.
|
|
12420
|
+
projectVersion: "0.5.0",
|
|
12421
12421
|
defaults,
|
|
12422
12422
|
schema: {
|
|
12423
12423
|
apiUrl: { type: "string" },
|
|
@@ -13457,7 +13457,7 @@ ${colors.primary("Recent Events")}
|
|
|
13457
13457
|
${colors.primary("Watching for tasks...")} (Ctrl+C to stop)
|
|
13458
13458
|
`);
|
|
13459
13459
|
const interval = parseInt(options.interval) * 1e3;
|
|
13460
|
-
|
|
13460
|
+
const seenTasks = /* @__PURE__ */ new Set();
|
|
13461
13461
|
const poll = async () => {
|
|
13462
13462
|
try {
|
|
13463
13463
|
const client = getClient();
|
|
@@ -13552,220 +13552,14 @@ ${colors.primary("Statistics")}
|
|
|
13552
13552
|
});
|
|
13553
13553
|
}
|
|
13554
13554
|
|
|
13555
|
-
// src/commands/
|
|
13555
|
+
// src/commands/badge.ts
|
|
13556
13556
|
import chalk2 from "chalk";
|
|
13557
13557
|
import ora2 from "ora";
|
|
13558
|
-
import { CLAIM_LABELS } from "@tasknet-protocol/shared";
|
|
13559
|
-
function registerClaimCommands(program2) {
|
|
13560
|
-
const claim = program2.command("claim").description("Manage identity claims and verification");
|
|
13561
|
-
claim.command("generate").description("Generate a verification code for identity claims").option(
|
|
13562
|
-
"-t, --type <type>",
|
|
13563
|
-
"Claim type: x, github, moltbook, wallet",
|
|
13564
|
-
"wallet"
|
|
13565
|
-
).action(async (options) => {
|
|
13566
|
-
const spin = ora2("Generating claim...").start();
|
|
13567
|
-
try {
|
|
13568
|
-
const client = getClient();
|
|
13569
|
-
const typeMap = {
|
|
13570
|
-
x: 1,
|
|
13571
|
-
twitter: 1,
|
|
13572
|
-
moltbook: 2,
|
|
13573
|
-
github: 3,
|
|
13574
|
-
wallet: 4
|
|
13575
|
-
};
|
|
13576
|
-
const claimType = typeMap[options.type.toLowerCase()] ?? 0;
|
|
13577
|
-
const result = await client.api.generateClaim(claimType);
|
|
13578
|
-
spin.succeed("Claim generated successfully");
|
|
13579
|
-
output(result, () => {
|
|
13580
|
-
let out = `
|
|
13581
|
-
${colors.primary("Claim Details")}
|
|
13582
|
-
|
|
13583
|
-
`;
|
|
13584
|
-
out += `${colors.muted("ID:")} ${result.claim.id}
|
|
13585
|
-
`;
|
|
13586
|
-
out += `${colors.muted("Type:")} ${getClaimTypeLabel(result.claim.claim_type)}
|
|
13587
|
-
`;
|
|
13588
|
-
out += `${colors.muted("Status:")} ${chalk2.yellow(result.claim.status)}
|
|
13589
|
-
`;
|
|
13590
|
-
out += `${colors.muted("Created:")} ${result.claim.created_at}
|
|
13591
|
-
`;
|
|
13592
|
-
out += `
|
|
13593
|
-
${colors.primary("Verification Code")}
|
|
13594
|
-
`;
|
|
13595
|
-
out += `${chalk2.cyan(result.claim.verification_code)}
|
|
13596
|
-
`;
|
|
13597
|
-
out += `
|
|
13598
|
-
${colors.primary("Instructions")}
|
|
13599
|
-
`;
|
|
13600
|
-
out += `${result.instructions}
|
|
13601
|
-
`;
|
|
13602
|
-
return out;
|
|
13603
|
-
});
|
|
13604
|
-
} catch (error2) {
|
|
13605
|
-
spin.fail(chalk2.red("Failed to generate claim"));
|
|
13606
|
-
const err = error2;
|
|
13607
|
-
console.error(chalk2.red(err.message));
|
|
13608
|
-
process.exit(1);
|
|
13609
|
-
}
|
|
13610
|
-
});
|
|
13611
|
-
claim.command("verify <claimId>").description("Verify a claim with proof").option("-u, --url <url>", "Proof URL (for X, GitHub, Moltbook)").option("-s, --signature <sig>", "Wallet signature (for wallet claims)").action(async (claimId, options) => {
|
|
13612
|
-
const spin = ora2("Verifying claim...").start();
|
|
13613
|
-
try {
|
|
13614
|
-
const client = getClient();
|
|
13615
|
-
const result = await client.api.verifyClaim({
|
|
13616
|
-
claimId,
|
|
13617
|
-
proofUrl: options.url,
|
|
13618
|
-
signature: options.signature
|
|
13619
|
-
});
|
|
13620
|
-
spin.succeed("Claim verified successfully");
|
|
13621
|
-
output(result, () => {
|
|
13622
|
-
let out = `
|
|
13623
|
-
${colors.primary("Verified Claim")}
|
|
13624
|
-
|
|
13625
|
-
`;
|
|
13626
|
-
out += `${colors.muted("ID:")} ${result.claim.id}
|
|
13627
|
-
`;
|
|
13628
|
-
out += `${colors.muted("Type:")} ${result.claim.claim_type_label}
|
|
13629
|
-
`;
|
|
13630
|
-
out += `${colors.muted("Status:")} ${chalk2.green(result.claim.status)}
|
|
13631
|
-
`;
|
|
13632
|
-
out += `${colors.muted("Claimed By:")} ${result.claim.claimed_by ?? "N/A"}
|
|
13633
|
-
`;
|
|
13634
|
-
out += `${colors.muted("Verified At:")} ${result.claim.verified_at ?? "N/A"}
|
|
13635
|
-
`;
|
|
13636
|
-
return out;
|
|
13637
|
-
});
|
|
13638
|
-
} catch (error2) {
|
|
13639
|
-
spin.fail(chalk2.red("Failed to verify claim"));
|
|
13640
|
-
const err = error2;
|
|
13641
|
-
console.error(chalk2.red(err.message));
|
|
13642
|
-
process.exit(1);
|
|
13643
|
-
}
|
|
13644
|
-
});
|
|
13645
|
-
claim.command("get <claimId>").description("Get details of a specific claim").action(async (claimId) => {
|
|
13646
|
-
const spin = ora2("Fetching claim...").start();
|
|
13647
|
-
try {
|
|
13648
|
-
const client = getClient();
|
|
13649
|
-
const claimData = await client.api.getClaim(claimId);
|
|
13650
|
-
spin.succeed("Claim fetched");
|
|
13651
|
-
output(claimData, () => {
|
|
13652
|
-
let out = `
|
|
13653
|
-
${colors.primary("Claim Details")}
|
|
13654
|
-
|
|
13655
|
-
`;
|
|
13656
|
-
out += `${colors.muted("ID:")} ${claimData.id}
|
|
13657
|
-
`;
|
|
13658
|
-
out += `${colors.muted("Agent ID:")} ${formatAddress(claimData.agent_id)}
|
|
13659
|
-
`;
|
|
13660
|
-
out += `${colors.muted("Type:")} ${claimData.claim_type_label}
|
|
13661
|
-
`;
|
|
13662
|
-
out += `${colors.muted("Status:")} ${getStatusColor2(claimData.status)}
|
|
13663
|
-
`;
|
|
13664
|
-
out += `${colors.muted("Verification Code:")} ${claimData.verification_code.slice(0, 30)}...
|
|
13665
|
-
`;
|
|
13666
|
-
out += `${colors.muted("Claimed By:")} ${claimData.claimed_by ?? "N/A"}
|
|
13667
|
-
`;
|
|
13668
|
-
out += `${colors.muted("Created At:")} ${claimData.created_at}
|
|
13669
|
-
`;
|
|
13670
|
-
out += `${colors.muted("Verified At:")} ${claimData.verified_at ?? "N/A"}
|
|
13671
|
-
`;
|
|
13672
|
-
out += `
|
|
13673
|
-
${colors.primary("Agent")}
|
|
13674
|
-
`;
|
|
13675
|
-
out += `${colors.muted("ID:")} ${claimData.agent.id}
|
|
13676
|
-
`;
|
|
13677
|
-
out += `${colors.muted("Owner:")} ${formatAddress(claimData.agent.owner)}
|
|
13678
|
-
`;
|
|
13679
|
-
return out;
|
|
13680
|
-
});
|
|
13681
|
-
} catch (error2) {
|
|
13682
|
-
spin.fail(chalk2.red("Failed to fetch claim"));
|
|
13683
|
-
const err = error2;
|
|
13684
|
-
console.error(chalk2.red(err.message));
|
|
13685
|
-
process.exit(1);
|
|
13686
|
-
}
|
|
13687
|
-
});
|
|
13688
|
-
claim.command("revoke <claimId>").description("Revoke a verified claim").action(async (claimId) => {
|
|
13689
|
-
const spin = ora2("Revoking claim...").start();
|
|
13690
|
-
try {
|
|
13691
|
-
const client = getClient();
|
|
13692
|
-
await client.api.revokeClaim(claimId);
|
|
13693
|
-
spin.succeed("Claim revoked successfully");
|
|
13694
|
-
} catch (error2) {
|
|
13695
|
-
spin.fail(chalk2.red("Failed to revoke claim"));
|
|
13696
|
-
const err = error2;
|
|
13697
|
-
console.error(chalk2.red(err.message));
|
|
13698
|
-
process.exit(1);
|
|
13699
|
-
}
|
|
13700
|
-
});
|
|
13701
|
-
claim.command("list").description("List claims for the current agent").action(async () => {
|
|
13702
|
-
const spin = ora2("Fetching claims...").start();
|
|
13703
|
-
try {
|
|
13704
|
-
const client = getClient();
|
|
13705
|
-
const agentId = client.getAgentId();
|
|
13706
|
-
if (!agentId) {
|
|
13707
|
-
spin.fail("No active agent set. Use 'tasknet config set agentId <id>'");
|
|
13708
|
-
process.exit(1);
|
|
13709
|
-
}
|
|
13710
|
-
const agent = await client.api.getAgent(agentId);
|
|
13711
|
-
spin.succeed(`Found ${agent.claims.length} claims`);
|
|
13712
|
-
output(agent.claims, () => {
|
|
13713
|
-
if (agent.claims.length === 0) {
|
|
13714
|
-
return `
|
|
13715
|
-
${chalk2.yellow("No claims found.")}
|
|
13716
|
-
Generate a claim with: tasknet claim generate -t wallet
|
|
13717
|
-
`;
|
|
13718
|
-
}
|
|
13719
|
-
let out = `
|
|
13720
|
-
${colors.primary("Claims")}
|
|
13721
|
-
|
|
13722
|
-
`;
|
|
13723
|
-
out += `${colors.muted("ID".padEnd(20))} ${colors.muted("Type".padEnd(15))} ${colors.muted("Claimed By".padEnd(22))} ${colors.muted("Verified At")}
|
|
13724
|
-
`;
|
|
13725
|
-
out += `${colors.muted("-".repeat(20))} ${colors.muted("-".repeat(15))} ${colors.muted("-".repeat(22))} ${colors.muted("-".repeat(20))}
|
|
13726
|
-
`;
|
|
13727
|
-
for (const c of agent.claims) {
|
|
13728
|
-
const id = c.id.slice(0, 18) + "..";
|
|
13729
|
-
const type = getClaimTypeLabel(c.claim_type).padEnd(15);
|
|
13730
|
-
const claimedBy = (c.claimed_by?.slice(0, 20) ?? "N/A").padEnd(22);
|
|
13731
|
-
const verifiedAt = c.verified_at ?? chalk2.yellow("Pending");
|
|
13732
|
-
out += `${id} ${type} ${claimedBy} ${verifiedAt}
|
|
13733
|
-
`;
|
|
13734
|
-
}
|
|
13735
|
-
return out;
|
|
13736
|
-
});
|
|
13737
|
-
} catch (error2) {
|
|
13738
|
-
spin.fail(chalk2.red("Failed to fetch claims"));
|
|
13739
|
-
const err = error2;
|
|
13740
|
-
console.error(chalk2.red(err.message));
|
|
13741
|
-
process.exit(1);
|
|
13742
|
-
}
|
|
13743
|
-
});
|
|
13744
|
-
}
|
|
13745
|
-
function getClaimTypeLabel(type) {
|
|
13746
|
-
return CLAIM_LABELS[type] ?? `Type ${type}`;
|
|
13747
|
-
}
|
|
13748
|
-
function getStatusColor2(status) {
|
|
13749
|
-
switch (status) {
|
|
13750
|
-
case "verified":
|
|
13751
|
-
return chalk2.green(status);
|
|
13752
|
-
case "pending":
|
|
13753
|
-
return chalk2.yellow(status);
|
|
13754
|
-
case "revoked":
|
|
13755
|
-
return chalk2.red(status);
|
|
13756
|
-
default:
|
|
13757
|
-
return status;
|
|
13758
|
-
}
|
|
13759
|
-
}
|
|
13760
|
-
|
|
13761
|
-
// src/commands/badge.ts
|
|
13762
|
-
import chalk3 from "chalk";
|
|
13763
|
-
import ora3 from "ora";
|
|
13764
13558
|
import { BADGE_TIER } from "@tasknet-protocol/shared";
|
|
13765
13559
|
function registerBadgeCommands(program2) {
|
|
13766
13560
|
const badge = program2.command("badge").description("View agent reputation badges");
|
|
13767
13561
|
badge.command("list [agentId]").description("List badges for an agent (defaults to current agent)").action(async (agentId) => {
|
|
13768
|
-
const spin =
|
|
13562
|
+
const spin = ora2("Fetching badges...").start();
|
|
13769
13563
|
try {
|
|
13770
13564
|
const client = getClient();
|
|
13771
13565
|
const targetId = agentId ?? client.getAgentId();
|
|
@@ -13778,7 +13572,7 @@ function registerBadgeCommands(program2) {
|
|
|
13778
13572
|
output(agent.badges, () => {
|
|
13779
13573
|
if (agent.badges.length === 0) {
|
|
13780
13574
|
return `
|
|
13781
|
-
${
|
|
13575
|
+
${chalk2.yellow("No badges earned yet.")}
|
|
13782
13576
|
Complete tasks and verify your identity to earn badges!
|
|
13783
13577
|
`;
|
|
13784
13578
|
}
|
|
@@ -13807,17 +13601,17 @@ ${colors.primary(`Badges for ${targetId.slice(0, 16)}...`)}
|
|
|
13807
13601
|
out += `
|
|
13808
13602
|
${colors.primary("Summary")}
|
|
13809
13603
|
`;
|
|
13810
|
-
out += ` ${
|
|
13811
|
-
out += `${
|
|
13812
|
-
out += `${
|
|
13813
|
-
out += `${
|
|
13604
|
+
out += ` ${chalk2.hex("#CD7F32")("\u25CF")} Bronze: ${tierCounts.bronze} `;
|
|
13605
|
+
out += `${chalk2.gray("\u25CF")} Silver: ${tierCounts.silver} `;
|
|
13606
|
+
out += `${chalk2.yellow("\u25CF")} Gold: ${tierCounts.gold} `;
|
|
13607
|
+
out += `${chalk2.magenta("\u25CF")} Platinum: ${tierCounts.platinum}
|
|
13814
13608
|
`;
|
|
13815
13609
|
return out;
|
|
13816
13610
|
});
|
|
13817
13611
|
} catch (error2) {
|
|
13818
|
-
spin.fail(
|
|
13612
|
+
spin.fail(chalk2.red("Failed to fetch badges"));
|
|
13819
13613
|
const err = error2;
|
|
13820
|
-
console.error(
|
|
13614
|
+
console.error(chalk2.red(err.message));
|
|
13821
13615
|
process.exit(1);
|
|
13822
13616
|
}
|
|
13823
13617
|
});
|
|
@@ -13877,28 +13671,28 @@ ${colors.primary("Available Badges")}
|
|
|
13877
13671
|
}
|
|
13878
13672
|
];
|
|
13879
13673
|
for (const b of badges) {
|
|
13880
|
-
out += ` ${b.icon} ${
|
|
13674
|
+
out += ` ${b.icon} ${chalk2.bold(formatBadgeType(b.type))}
|
|
13881
13675
|
`;
|
|
13882
|
-
out += ` ${
|
|
13676
|
+
out += ` ${chalk2.gray(b.description)}
|
|
13883
13677
|
`;
|
|
13884
|
-
out += ` ${
|
|
13678
|
+
out += ` ${chalk2.cyan("How to earn:")} ${b.howToEarn}
|
|
13885
13679
|
|
|
13886
13680
|
`;
|
|
13887
13681
|
}
|
|
13888
13682
|
out += `${colors.primary("Tiers")}
|
|
13889
13683
|
`;
|
|
13890
|
-
out += ` ${
|
|
13684
|
+
out += ` ${chalk2.hex("#CD7F32")("\u25CF")} Bronze - Entry level
|
|
13891
13685
|
`;
|
|
13892
|
-
out += ` ${
|
|
13686
|
+
out += ` ${chalk2.gray("\u25CF")} Silver - Intermediate
|
|
13893
13687
|
`;
|
|
13894
|
-
out += ` ${
|
|
13688
|
+
out += ` ${chalk2.yellow("\u25CF")} Gold - Advanced
|
|
13895
13689
|
`;
|
|
13896
|
-
out += ` ${
|
|
13690
|
+
out += ` ${chalk2.magenta("\u25CF")} Platinum - Expert
|
|
13897
13691
|
`;
|
|
13898
13692
|
console.log(out);
|
|
13899
13693
|
});
|
|
13900
13694
|
badge.command("showcase [agentId]").description("Display badges in a showcase format").action(async (agentId) => {
|
|
13901
|
-
const spin =
|
|
13695
|
+
const spin = ora2("Loading showcase...").start();
|
|
13902
13696
|
try {
|
|
13903
13697
|
const client = getClient();
|
|
13904
13698
|
const targetId = agentId ?? client.getAgentId();
|
|
@@ -13909,7 +13703,7 @@ ${colors.primary("Available Badges")}
|
|
|
13909
13703
|
const agent = await client.api.getAgent(targetId);
|
|
13910
13704
|
spin.stop();
|
|
13911
13705
|
if (agent.badges.length === 0) {
|
|
13912
|
-
console.log(
|
|
13706
|
+
console.log(chalk2.yellow("\nNo badges to showcase yet."));
|
|
13913
13707
|
return;
|
|
13914
13708
|
}
|
|
13915
13709
|
const byTier = {};
|
|
@@ -13918,7 +13712,7 @@ ${colors.primary("Available Badges")}
|
|
|
13918
13712
|
byTier[b.tier].push(b);
|
|
13919
13713
|
}
|
|
13920
13714
|
let out = `
|
|
13921
|
-
${
|
|
13715
|
+
${chalk2.bold.underline("\u{1F3C6} Badge Showcase")}
|
|
13922
13716
|
|
|
13923
13717
|
`;
|
|
13924
13718
|
for (const tier of [3, 2, 1, 0]) {
|
|
@@ -13926,7 +13720,7 @@ ${chalk3.bold.underline("\u{1F3C6} Badge Showcase")}
|
|
|
13926
13720
|
if (!tierBadges || tierBadges.length === 0) continue;
|
|
13927
13721
|
const tierName = getTierName(tier);
|
|
13928
13722
|
const tierColor = getTierColor(tier);
|
|
13929
|
-
out += tierColor(
|
|
13723
|
+
out += tierColor(chalk2.bold(`\u2501\u2501\u2501 ${tierName.toUpperCase()} \u2501\u2501\u2501`)) + "\n\n";
|
|
13930
13724
|
for (const b of tierBadges) {
|
|
13931
13725
|
out += ` ${getBadgeIcon(b.badge_type)} ${formatBadgeType(b.badge_type)}
|
|
13932
13726
|
`;
|
|
@@ -13946,9 +13740,9 @@ ${chalk3.bold.underline("\u{1F3C6} Badge Showcase")}
|
|
|
13946
13740
|
}
|
|
13947
13741
|
console.log(out);
|
|
13948
13742
|
} catch (error2) {
|
|
13949
|
-
spin.fail(
|
|
13743
|
+
spin.fail(chalk2.red("Failed to load showcase"));
|
|
13950
13744
|
const err = error2;
|
|
13951
|
-
console.error(
|
|
13745
|
+
console.error(chalk2.red(err.message));
|
|
13952
13746
|
process.exit(1);
|
|
13953
13747
|
}
|
|
13954
13748
|
});
|
|
@@ -13983,21 +13777,21 @@ function getTierDisplay(tier) {
|
|
|
13983
13777
|
function getTierColor(tier) {
|
|
13984
13778
|
switch (tier) {
|
|
13985
13779
|
case BADGE_TIER.BRONZE:
|
|
13986
|
-
return
|
|
13780
|
+
return chalk2.hex("#CD7F32");
|
|
13987
13781
|
case BADGE_TIER.SILVER:
|
|
13988
|
-
return
|
|
13782
|
+
return chalk2.gray;
|
|
13989
13783
|
case BADGE_TIER.GOLD:
|
|
13990
|
-
return
|
|
13784
|
+
return chalk2.yellow;
|
|
13991
13785
|
case 3:
|
|
13992
|
-
return
|
|
13786
|
+
return chalk2.magenta;
|
|
13993
13787
|
default:
|
|
13994
|
-
return
|
|
13788
|
+
return chalk2.white;
|
|
13995
13789
|
}
|
|
13996
13790
|
}
|
|
13997
13791
|
|
|
13998
13792
|
// src/index.ts
|
|
13999
13793
|
var program = new Command2();
|
|
14000
|
-
var banner =
|
|
13794
|
+
var banner = chalk3.cyan(`
|
|
14001
13795
|
\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557
|
|
14002
13796
|
\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2551 \u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D
|
|
14003
13797
|
\u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551
|
|
@@ -14005,7 +13799,7 @@ var banner = chalk4.cyan(`
|
|
|
14005
13799
|
\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551
|
|
14006
13800
|
\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D
|
|
14007
13801
|
`);
|
|
14008
|
-
program.name("tasknet").description("CLI for TaskNet Protocol - Agent-to-Agent Skills Marketplace").version("0.
|
|
13802
|
+
program.name("tasknet").description("CLI for TaskNet Protocol - Agent-to-Agent Skills Marketplace").version("0.5.0").addHelpText("beforeAll", banner).option("--json", "Output as JSON").hook("preAction", (thisCommand) => {
|
|
14009
13803
|
const opts = thisCommand.opts();
|
|
14010
13804
|
if (opts.json) {
|
|
14011
13805
|
const config2 = getConfig();
|
|
@@ -14016,7 +13810,6 @@ registerConfigCommands(program);
|
|
|
14016
13810
|
registerAgentCommands(program);
|
|
14017
13811
|
registerSkillCommands(program);
|
|
14018
13812
|
registerTaskCommands(program);
|
|
14019
|
-
registerClaimCommands(program);
|
|
14020
13813
|
registerBadgeCommands(program);
|
|
14021
13814
|
registerHealthCommand(program);
|
|
14022
13815
|
program.parse();
|