agentdex-cli 0.2.1 → 0.2.2

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/dist/client.js CHANGED
@@ -55,7 +55,11 @@ export class AgentdexClient {
55
55
  }
56
56
  async claimStatus(paymentHash) {
57
57
  const res = await this.fetch(`/api/v1/agents/claim/status?payment_hash=${encodeURIComponent(paymentHash)}`);
58
- return res.json();
58
+ const data = await res.json();
59
+ // API returns { status: "paid" | "completed" | "pending" | "expired" }
60
+ // Normalize to { paid: true/false } for CLI consumption
61
+ data.paid = data.status === 'paid' || data.status === 'completed';
62
+ return data;
59
63
  }
60
64
  async search(options = {}) {
61
65
  const params = new URLSearchParams();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentdex-cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "CLI and SDK for the agentdex AI agent directory",
5
5
  "type": "module",
6
6
  "bin": {
package/src/client.ts CHANGED
@@ -125,7 +125,11 @@ export class AgentdexClient {
125
125
 
126
126
  async claimStatus(paymentHash: string): Promise<ClaimStatus> {
127
127
  const res = await this.fetch(`/api/v1/agents/claim/status?payment_hash=${encodeURIComponent(paymentHash)}`);
128
- return res.json();
128
+ const data = await res.json();
129
+ // API returns { status: "paid" | "completed" | "pending" | "expired" }
130
+ // Normalize to { paid: true/false } for CLI consumption
131
+ data.paid = data.status === 'paid' || data.status === 'completed';
132
+ return data;
129
133
  }
130
134
 
131
135
  async search(options: SearchOptions = {}): Promise<object[]> {