cashclaw 1.6.0 → 1.6.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/CHANGELOG.md CHANGED
@@ -1,177 +1,204 @@
1
- # Changelog
2
-
3
- All notable changes to CashClaw will be documented in this file.
4
-
5
- ## [1.6.0] - 2026-03-21
6
-
7
- ### Added
8
- - 30+ new bridge functions covering ALL HYRVE API endpoints
9
- - Auth: `register`, `refreshToken`, `updateProfile`, `forgotPassword`, `resetPassword`, `verifyEmail`, `resendVerification`
10
- - Agents: `registerAgentDashboard`, `updateAgent`, `deleteAgent`
11
- - Orders: `createOrder`, `completeOrder`, `reviewOrder`, `counterOffer`, `acceptCounter`
12
- - Payments: `propose`, `checkout`, `verifyPayment`, `getPaymentConfig`
13
- - API Keys: `createApiKey`, `listApiKeys`, `revokeApiKey`
14
- - Admin: `adminGetStats`, `adminListUsers`, `adminBanUser`, `adminUnbanUser`, `adminListOrders`, `adminListAgents`, `adminDelistAgent`, `adminGetDisputes`
15
- - Other: `getPlatformStats`, `uploadFile`
16
- - Job polling daemon (`cashclaw hyrve poll`) with configurable interval
17
- - CLI: `cashclaw hyrve poll` -- start job polling daemon
18
- - CLI: `cashclaw hyrve stats` -- show platform statistics
19
- - CLI: `cashclaw hyrve keys` -- list/create/revoke API keys
20
- - CLI: `cashclaw hyrve counter <orderId> <amount>` -- send counter-offer
21
- - CLI: `cashclaw hyrve complete <orderId>` -- complete/approve order
22
- - CLI: `cashclaw hyrve review <orderId> <rating>` -- leave review (1-5)
23
-
24
- ### Fixed
25
- - Wallet display now uses `/wallet` endpoint with proper balance details
26
- - Bridge functions use consistent auth headers (JWT preferred, API key fallback)
27
-
28
- ### Changed
29
- - Total bridge functions: 20 -> 50+
30
- - Full HYRVE API v1.1.0 coverage
31
- - README updated with full function table and new commands
32
- - Job poller added to scheduler.js
33
-
34
- ## [1.5.0] - 2026-03-20
35
-
36
- ### Added
37
- - Full HYRVE API v1.1.0 compatibility (35+ endpoints)
38
- - JWT authentication support (login + token refresh)
39
- - Auto-accept mode: proposals under configured limit auto-accepted
40
- - Agent Claim: claim self-registered agents to your account
41
- - Proposal management: accept/reject proposals from dashboard + CLI
42
- - Order messaging: send/receive messages per order
43
- - Wallet withdrawals: request payouts via Stripe or USDT
44
- - Job detail view with full description
45
- - Dispute opening support
46
- - CLI: `cashclaw hyrve login` - authenticate with email/password
47
- - CLI: `cashclaw hyrve claim <api-key>` - claim agent
48
- - CLI: `cashclaw hyrve proposals` - list pending proposals
49
- - CLI: `cashclaw hyrve messages <orderId>` - view order messages
50
- - CLI: `cashclaw hyrve withdraw <amount>` - request withdrawal
51
- - CLI: `cashclaw hyrve auto-accept on/off` - toggle autonomous mode
52
- - 11 new bridge functions (20 total)
53
-
54
- ### Fixed
55
- - README badge showing wrong version
56
- - Stats updated to match platform (3,580 users, 252 agents)
57
-
58
- ## [1.4.5] - 2026-03-20
59
-
60
- ### Added
61
- - HYRVE Marketplace panel in CashClaw dashboard (jobs, orders, wallet, profile)
62
- - Job acceptance from dashboard UI (Accept button)
63
- - Work delivery from dashboard UI (Deliver button with URL + notes)
64
- - Wallet panel with available/pending/total earned balances
65
- - CLI: `cashclaw hyrve accept <job-id>` command
66
- - CLI: `cashclaw hyrve deliver <order-id> --url <url>` command
67
- - CLI: `cashclaw hyrve profile` command
68
- - CLI: `cashclaw hyrve orders` command
69
- - `getWallet()` bridge function for wallet data
70
- - Status badges for orders (escrow, delivered, completed, disputed)
71
-
72
- ### Fixed
73
- - Job prices showing $0 (was reading wrong field, now uses `budget_usd`)
74
- - Agent registration using self-register endpoint (no auth required)
75
- - Order amounts parsing (string to float conversion)
76
-
77
- ## [1.4.0] - 2026-03-19
78
-
79
- ### Added
80
- - Machine Payments Protocol (MPP) bridge (`src/integrations/mpp-bridge.js`)
81
- - Stripe + Tempo stablecoin payments (USDC)
82
- - 1.5% transaction fees (vs 2.9%+$0.30 for cards)
83
- - createChallenge, verifyCredential, getStatus functions
84
- - `cashclaw hyrve` subcommand suite
85
- - `hyrve status` -- connection status + MPP availability
86
- - `hyrve jobs` -- list available marketplace jobs
87
- - `hyrve wallet` -- wallet balance check
88
- - `hyrve dashboard` -- open app.hyrveai.com in browser
89
-
90
- ### Changed
91
- - Updated README with MPP section and hyrve commands
92
- - Stats: 111 stars, 34 forks, 3,000+ registered users
93
-
94
- ## [1.3.0] - 2026-03-19
95
-
96
- ### Added
97
- - Live HYRVE AI marketplace integration (api.hyrveai.com)
98
- - API key authentication (X-API-Key header) for agent-platform communication
99
- - New bridge functions: `deliverJob()`, `getAgentProfile()`, `listOrders()`
100
- - Config fields: `hyrve.api_key`, `hyrve.agent_id`, `hyrve.dashboard_url`, `hyrve.enabled`
101
- - Error response parsing for real API error bodies (JSON and plain text)
102
- - Bridge config validation helper (`checkBridgeConfig`)
103
-
104
- ### Changed
105
- - `hyrve-bridge.js` now connects to live production API at api.hyrveai.com/v1
106
- - Improved error handling with real API response parsing (`parseErrorResponse`)
107
- - All bridge functions include X-API-Key header when configured
108
- - Updated README with live marketplace links (app.hyrveai.com, api.hyrveai.com)
109
- - Updated README with HYRVE AI Integration section documenting all bridge functions
110
-
111
- ### Fixed
112
- - Bridge connection timeout handling with better error messages
113
- - Config migration for existing installations (new hyrve fields merge with defaults)
114
-
115
- ## [1.2.1] - 2026-03-16
116
-
117
- ### Fixed
118
- - Minor bug fixes and stability improvements
119
-
120
- ## [1.2.0] - 2026-03-15
121
-
122
- ### Added
123
- - **5 New Skills** -- Email Outreach ($9-$29), Competitor Analyzer ($19-$49), Landing Page ($15-$39), Data Scraper ($9-$25), Reputation Manager ($19-$49). CashClaw now ships with 12 revenue-generating skills.
124
- - 10 new mission templates for the new skills (basic + pro tiers each).
125
- - Environment variable support: `CASHCLAW_STRIPE_SECRET_KEY` as alternative to config file.
126
- - Corrupted mission file warnings (previously silently skipped).
127
- - Shared version helper (`src/utils/version.js`) for consistent version display.
128
-
129
- ### Fixed
130
- - **Cancel status log bug** -- Mission cancel audit trail now correctly shows the previous status instead of always logging "was: cancelled".
131
- - **Short ID collision** -- Multiple missions sharing the same ID prefix now show an ambiguous match warning instead of silently picking the first match.
132
- - **Hardcoded versions** -- All hardcoded version strings throughout the codebase now dynamically read from `package.json`.
133
-
134
- ### Security
135
- - **CORS restriction** -- Dashboard API now restricts CORS to localhost origins. Agents and curl still work (no Origin header = no restriction).
136
- - **Config API protection** -- `POST /api/config` now blocks modification of sensitive keys (`stripe.secret_key`, `stripe.webhook_secret`).
137
- - **Prototype pollution guard** -- Config key traversal (both CLI and API) now rejects `__proto__`, `constructor`, and `prototype` keys.
138
-
139
- ### Changed
140
- - Default config now includes 10 service types (up from 5).
141
- - Init wizard now offers 10 services for selection.
142
- - Dashboard HTML version updated to v1.2.0 with dynamic version from health API.
143
- - HYRVEai User-Agent header now reads version from package.json.
144
- - Test suite expanded with version, security, and new skill tests.
145
-
146
- ## [1.1.0] - 2026-03-14
147
-
148
- ### Added
149
- - **Mission Audit Trail** -- Every mission step is now logged with timestamps. What was requested, what was delivered, and the full output trail. No invoice goes out without proof.
150
- - `cashclaw missions trail <id>` -- View the formatted audit trail for any mission in the terminal.
151
- - `cashclaw missions export <id>` -- Export mission proof as a markdown file for client disputes or record-keeping.
152
- - `GET /api/missions/:id/trail` -- Dashboard API endpoint returning the audit trail as JSON.
153
-
154
- ### Changed
155
- - Mission objects now include an `audit_trail` array tracking all state changes.
156
- - All mission lifecycle functions (create, start, complete, cancel, step update) log trail entries automatically.
157
- - Dashboard health endpoint now reports version `1.1.0`.
158
- - Updated package description to mention audit trails.
159
-
160
- ## [1.0.2] - 2026-03-10
161
-
162
- ### Fixed
163
- - CLI minor fixes and dependency updates.
164
-
165
- ## [1.0.1] - 2026-03-07
166
-
167
- ### Fixed
168
- - Init wizard improvements and error handling.
169
-
170
- ## [1.0.0] - 2026-03-01
171
-
172
- ### Added
173
- - Initial release with 7 built-in skills.
174
- - Stripe payment integration.
175
- - HYRVEai marketplace support.
176
- - Web dashboard on port 3847.
177
- - Mission lifecycle management.
1
+ # Changelog
2
+
3
+ All notable changes to CashClaw will be documented in this file.
4
+
5
+ ## [1.6.2] - 2026-04-05
6
+
7
+ ### Fixed
8
+ - **Critical: `agent_id` null after init** ([#3](https://github.com/ertugrulakben/HYRVE-AI/issues/3)): `registerAgent()` returns `data.agent_id` nested under `data` object, but `init` was reading `hyrveResult.agent_id` (always `null`). Now correctly reads `hyrveResult.data.agent_id`
9
+ - **Login does not populate `agent_id`**: After `cashclaw hyrve login`, the command now auto-fetches the user's agent profile and saves `agent_id` + `registered: true` to config
10
+ - **`claim` returns "already owned" without saving**: When `cashclaw hyrve claim` gets a 400 "already own" response, it now fetches the owned agent and saves its ID to local config instead of failing
11
+ - **`api_key` not saved on init**: Registration API key from self-register is now persisted to config
12
+
13
+ ### Added
14
+ - `getMyAgents()` bridge function to fetch authenticated user's agents via `GET /agents/me`
15
+
16
+ ### Contributors
17
+ - @nikatronic (bug report [#3](https://github.com/ertugrulakben/HYRVE-AI/issues/3))
18
+
19
+ ## [1.6.1] - 2026-03-27
20
+
21
+ ### Fixed
22
+ - **Dashboard wallet crash**: Added `escrow_release`, `escrow_hold`, `withdrawal` transaction types with icons and colors. Unknown types now fallback gracefully
23
+ - **Approve/Delete/Revoke button failures**: Fixed "Body cannot be empty" error by ensuring POST requests always include `{}` body and DELETE requests omit Content-Type when no body
24
+ - **Deliverables rendering**: Structured objects (`{type, content}`) now display content properly instead of raw JSON
25
+ - **Backend API**: Custom JSON content-type parser accepts empty request bodies
26
+
27
+ ### Changed
28
+ - `api.ts` fetch method: smart Content-Type handling based on HTTP method and body presence
29
+ - Transaction type union expanded: `payment | payout | refund | fee | escrow_release | escrow_hold | withdrawal`
30
+
31
+
32
+ ## [1.6.0] - 2026-03-21
33
+
34
+ ### Added
35
+ - 30+ new bridge functions covering ALL HYRVE API endpoints
36
+ - Auth: `register`, `refreshToken`, `updateProfile`, `forgotPassword`, `resetPassword`, `verifyEmail`, `resendVerification`
37
+ - Agents: `registerAgentDashboard`, `updateAgent`, `deleteAgent`
38
+ - Orders: `createOrder`, `completeOrder`, `reviewOrder`, `counterOffer`, `acceptCounter`
39
+ - Payments: `propose`, `checkout`, `verifyPayment`, `getPaymentConfig`
40
+ - API Keys: `createApiKey`, `listApiKeys`, `revokeApiKey`
41
+ - Admin: `adminGetStats`, `adminListUsers`, `adminBanUser`, `adminUnbanUser`, `adminListOrders`, `adminListAgents`, `adminDelistAgent`, `adminGetDisputes`
42
+ - Other: `getPlatformStats`, `uploadFile`
43
+ - Job polling daemon (`cashclaw hyrve poll`) with configurable interval
44
+ - CLI: `cashclaw hyrve poll` -- start job polling daemon
45
+ - CLI: `cashclaw hyrve stats` -- show platform statistics
46
+ - CLI: `cashclaw hyrve keys` -- list/create/revoke API keys
47
+ - CLI: `cashclaw hyrve counter <orderId> <amount>` -- send counter-offer
48
+ - CLI: `cashclaw hyrve complete <orderId>` -- complete/approve order
49
+ - CLI: `cashclaw hyrve review <orderId> <rating>` -- leave review (1-5)
50
+
51
+ ### Fixed
52
+ - Wallet display now uses `/wallet` endpoint with proper balance details
53
+ - Bridge functions use consistent auth headers (JWT preferred, API key fallback)
54
+
55
+ ### Changed
56
+ - Total bridge functions: 20 -> 50+
57
+ - Full HYRVE API v1.1.0 coverage
58
+ - README updated with full function table and new commands
59
+ - Job poller added to scheduler.js
60
+
61
+ ## [1.5.0] - 2026-03-20
62
+
63
+ ### Added
64
+ - Full HYRVE API v1.1.0 compatibility (35+ endpoints)
65
+ - JWT authentication support (login + token refresh)
66
+ - Auto-accept mode: proposals under configured limit auto-accepted
67
+ - Agent Claim: claim self-registered agents to your account
68
+ - Proposal management: accept/reject proposals from dashboard + CLI
69
+ - Order messaging: send/receive messages per order
70
+ - Wallet withdrawals: request payouts via Stripe or USDT
71
+ - Job detail view with full description
72
+ - Dispute opening support
73
+ - CLI: `cashclaw hyrve login` - authenticate with email/password
74
+ - CLI: `cashclaw hyrve claim <api-key>` - claim agent
75
+ - CLI: `cashclaw hyrve proposals` - list pending proposals
76
+ - CLI: `cashclaw hyrve messages <orderId>` - view order messages
77
+ - CLI: `cashclaw hyrve withdraw <amount>` - request withdrawal
78
+ - CLI: `cashclaw hyrve auto-accept on/off` - toggle autonomous mode
79
+ - 11 new bridge functions (20 total)
80
+
81
+ ### Fixed
82
+ - README badge showing wrong version
83
+ - Stats updated to match platform (3,580 users, 252 agents)
84
+
85
+ ## [1.4.5] - 2026-03-20
86
+
87
+ ### Added
88
+ - HYRVE Marketplace panel in CashClaw dashboard (jobs, orders, wallet, profile)
89
+ - Job acceptance from dashboard UI (Accept button)
90
+ - Work delivery from dashboard UI (Deliver button with URL + notes)
91
+ - Wallet panel with available/pending/total earned balances
92
+ - CLI: `cashclaw hyrve accept <job-id>` command
93
+ - CLI: `cashclaw hyrve deliver <order-id> --url <url>` command
94
+ - CLI: `cashclaw hyrve profile` command
95
+ - CLI: `cashclaw hyrve orders` command
96
+ - `getWallet()` bridge function for wallet data
97
+ - Status badges for orders (escrow, delivered, completed, disputed)
98
+
99
+ ### Fixed
100
+ - Job prices showing $0 (was reading wrong field, now uses `budget_usd`)
101
+ - Agent registration using self-register endpoint (no auth required)
102
+ - Order amounts parsing (string to float conversion)
103
+
104
+ ## [1.4.0] - 2026-03-19
105
+
106
+ ### Added
107
+ - Machine Payments Protocol (MPP) bridge (`src/integrations/mpp-bridge.js`)
108
+ - Stripe + Tempo stablecoin payments (USDC)
109
+ - 1.5% transaction fees (vs 2.9%+$0.30 for cards)
110
+ - createChallenge, verifyCredential, getStatus functions
111
+ - `cashclaw hyrve` subcommand suite
112
+ - `hyrve status` -- connection status + MPP availability
113
+ - `hyrve jobs` -- list available marketplace jobs
114
+ - `hyrve wallet` -- wallet balance check
115
+ - `hyrve dashboard` -- open app.hyrveai.com in browser
116
+
117
+ ### Changed
118
+ - Updated README with MPP section and hyrve commands
119
+ - Stats: 111 stars, 34 forks, 3,000+ registered users
120
+
121
+ ## [1.3.0] - 2026-03-19
122
+
123
+ ### Added
124
+ - Live HYRVE AI marketplace integration (api.hyrveai.com)
125
+ - API key authentication (X-API-Key header) for agent-platform communication
126
+ - New bridge functions: `deliverJob()`, `getAgentProfile()`, `listOrders()`
127
+ - Config fields: `hyrve.api_key`, `hyrve.agent_id`, `hyrve.dashboard_url`, `hyrve.enabled`
128
+ - Error response parsing for real API error bodies (JSON and plain text)
129
+ - Bridge config validation helper (`checkBridgeConfig`)
130
+
131
+ ### Changed
132
+ - `hyrve-bridge.js` now connects to live production API at api.hyrveai.com/v1
133
+ - Improved error handling with real API response parsing (`parseErrorResponse`)
134
+ - All bridge functions include X-API-Key header when configured
135
+ - Updated README with live marketplace links (app.hyrveai.com, api.hyrveai.com)
136
+ - Updated README with HYRVE AI Integration section documenting all bridge functions
137
+
138
+ ### Fixed
139
+ - Bridge connection timeout handling with better error messages
140
+ - Config migration for existing installations (new hyrve fields merge with defaults)
141
+
142
+ ## [1.2.1] - 2026-03-16
143
+
144
+ ### Fixed
145
+ - Minor bug fixes and stability improvements
146
+
147
+ ## [1.2.0] - 2026-03-15
148
+
149
+ ### Added
150
+ - **5 New Skills** -- Email Outreach ($9-$29), Competitor Analyzer ($19-$49), Landing Page ($15-$39), Data Scraper ($9-$25), Reputation Manager ($19-$49). CashClaw now ships with 12 revenue-generating skills.
151
+ - 10 new mission templates for the new skills (basic + pro tiers each).
152
+ - Environment variable support: `CASHCLAW_STRIPE_SECRET_KEY` as alternative to config file.
153
+ - Corrupted mission file warnings (previously silently skipped).
154
+ - Shared version helper (`src/utils/version.js`) for consistent version display.
155
+
156
+ ### Fixed
157
+ - **Cancel status log bug** -- Mission cancel audit trail now correctly shows the previous status instead of always logging "was: cancelled".
158
+ - **Short ID collision** -- Multiple missions sharing the same ID prefix now show an ambiguous match warning instead of silently picking the first match.
159
+ - **Hardcoded versions** -- All hardcoded version strings throughout the codebase now dynamically read from `package.json`.
160
+
161
+ ### Security
162
+ - **CORS restriction** -- Dashboard API now restricts CORS to localhost origins. Agents and curl still work (no Origin header = no restriction).
163
+ - **Config API protection** -- `POST /api/config` now blocks modification of sensitive keys (`stripe.secret_key`, `stripe.webhook_secret`).
164
+ - **Prototype pollution guard** -- Config key traversal (both CLI and API) now rejects `__proto__`, `constructor`, and `prototype` keys.
165
+
166
+ ### Changed
167
+ - Default config now includes 10 service types (up from 5).
168
+ - Init wizard now offers 10 services for selection.
169
+ - Dashboard HTML version updated to v1.2.0 with dynamic version from health API.
170
+ - HYRVEai User-Agent header now reads version from package.json.
171
+ - Test suite expanded with version, security, and new skill tests.
172
+
173
+ ## [1.1.0] - 2026-03-14
174
+
175
+ ### Added
176
+ - **Mission Audit Trail** -- Every mission step is now logged with timestamps. What was requested, what was delivered, and the full output trail. No invoice goes out without proof.
177
+ - `cashclaw missions trail <id>` -- View the formatted audit trail for any mission in the terminal.
178
+ - `cashclaw missions export <id>` -- Export mission proof as a markdown file for client disputes or record-keeping.
179
+ - `GET /api/missions/:id/trail` -- Dashboard API endpoint returning the audit trail as JSON.
180
+
181
+ ### Changed
182
+ - Mission objects now include an `audit_trail` array tracking all state changes.
183
+ - All mission lifecycle functions (create, start, complete, cancel, step update) log trail entries automatically.
184
+ - Dashboard health endpoint now reports version `1.1.0`.
185
+ - Updated package description to mention audit trails.
186
+
187
+ ## [1.0.2] - 2026-03-10
188
+
189
+ ### Fixed
190
+ - CLI minor fixes and dependency updates.
191
+
192
+ ## [1.0.1] - 2026-03-07
193
+
194
+ ### Fixed
195
+ - Init wizard improvements and error handling.
196
+
197
+ ## [1.0.0] - 2026-03-01
198
+
199
+ ### Added
200
+ - Initial release with 7 built-in skills.
201
+ - Stripe payment integration.
202
+ - HYRVEai marketplace support.
203
+ - Web dashboard on port 3847.
204
+ - Mission lifecycle management.
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  <p align="center">
16
16
  <a href="https://www.npmjs.com/package/cashclaw"><img src="https://img.shields.io/npm/v/cashclaw?color=crimson&label=npm" alt="npm version" /></a>
17
- <img src="https://img.shields.io/badge/version-1.6.0-blue" alt="v1.6.0" />
17
+ <img src="https://img.shields.io/badge/version-1.6.2-blue" alt="v1.6.2" />
18
18
  <a href="https://github.com/ertugrulakben/cashclaw/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="license" /></a>
19
19
  <a href="https://github.com/ertugrulakben/cashclaw/stargazers"><img src="https://img.shields.io/github/stars/ertugrulakben/cashclaw?style=social" alt="stars" /></a>
20
20
  <a href="https://hyrveai.com"><img src="https://img.shields.io/badge/marketplace-HYRVE%20AI-ff6b35" alt="HYRVE AI" /></a>
@@ -24,11 +24,11 @@
24
24
  ---
25
25
 
26
26
  <p align="center">
27
- <img src="https://img.shields.io/badge/stars-115-yellow?style=flat-square&logo=github" alt="115 stars" />
28
- <img src="https://img.shields.io/badge/forks-38-blue?style=flat-square&logo=github" alt="38 forks" />
27
+ <img src="https://img.shields.io/badge/stars-131-yellow?style=flat-square&logo=github" alt="131 stars" />
28
+ <img src="https://img.shields.io/badge/forks-45-blue?style=flat-square&logo=github" alt="45 forks" />
29
29
  <img src="https://img.shields.io/badge/npm%20downloads-1.5k+-red?style=flat-square&logo=npm" alt="1,500+ downloads" />
30
30
  <img src="https://img.shields.io/badge/skills-12-purple?style=flat-square" alt="12 skills" />
31
- <img src="https://img.shields.io/badge/HYRVE%20users-3,580+-ff6b35?style=flat-square" alt="3,580+ users" />
31
+ <img src="https://img.shields.io/badge/HYRVE%20users-4,280+-ff6b35?style=flat-square" alt="4,280+ users" />
32
32
  <img src="https://img.shields.io/badge/agents-252-brightgreen?style=flat-square" alt="252 agents" />
33
33
  </p>
34
34
 
@@ -124,9 +124,9 @@ cashclaw audit --url "https://your-client.com" --tier standard
124
124
 
125
125
  ## HYRVE AI Integration
126
126
 
127
- CashClaw v1.6.0 connects directly to the **live HYRVE AI marketplace** with **full API coverage (50+ endpoints)**.
127
+ CashClaw v1.6.2 connects directly to the **live HYRVE AI marketplace** with **full API coverage (50+ endpoints)**.
128
128
 
129
- ### What's New in v1.6.0
129
+ ### What's New in v1.6.2
130
130
 
131
131
  - **Full HYRVE API Coverage** -- 50+ bridge functions covering every endpoint (auth, agents, orders, payments, keys, admin)
132
132
  - **Job Polling Daemon** -- `cashclaw hyrve poll` runs a background poller that auto-accepts matching jobs
@@ -211,7 +211,7 @@ No cold outreach needed. Clients come to you.
211
211
 
212
212
  ### Machine Payments Protocol (MPP)
213
213
 
214
- CashClaw v1.5.0 supports Stripe's new [Machine Payments Protocol](https://mpp.dev) -- enabling agents to pay each other autonomously using USDC stablecoins.
214
+ CashClaw v1.6.2 supports Stripe's new [Machine Payments Protocol](https://mpp.dev) -- enabling agents to pay each other autonomously using USDC stablecoins.
215
215
 
216
216
  - **1.5% fees** (vs 2.9%+$0.30 for cards)
217
217
  - HTTP 402 Payment Required flow
@@ -464,11 +464,11 @@ cashclaw/
464
464
  bin/ # CLI entry point
465
465
  src/ # Core engine source
466
466
  integrations/
467
- hyrve-bridge.js # HYRVE AI marketplace bridge (v1.6.0, 50+ functions)
467
+ hyrve-bridge.js # HYRVE AI marketplace bridge (v1.6.2, 50+ functions)
468
468
  mpp-bridge.js # Machine Payments Protocol bridge (v1.5.0)
469
469
  cli/
470
470
  commands/
471
- hyrve.js # HYRVE AI subcommands (v1.6.0)
471
+ hyrve.js # HYRVE AI subcommands (v1.6.2)
472
472
  utils/
473
473
  config.js # Configuration management
474
474
  skills/
@@ -497,11 +497,11 @@ cashclaw/
497
497
 
498
498
  | Metric | Value |
499
499
  |--------|-------|
500
- | GitHub Stars | 115 |
501
- | GitHub Forks | 38 |
500
+ | GitHub Stars | 131 |
501
+ | GitHub Forks | 45 |
502
502
  | npm Downloads | 1,500+ |
503
503
  | Skills | 12 |
504
- | HYRVE Registered Users | 3,580+ |
504
+ | HYRVE Registered Users | 4,280+ |
505
505
  | Active Agents | 252 |
506
506
  | Platform Revenue | $45.75 |
507
507
  | Total Orders | 9 |
package/package.json CHANGED
@@ -1,55 +1,55 @@
1
- {
2
- "name": "cashclaw",
3
- "version": "1.6.0",
4
- "description": "Turn your OpenClaw AI agent into a money-making machine — 12 skills, audit trails, security hardened",
5
- "type": "module",
6
- "bin": {
7
- "cashclaw": "./bin/cashclaw.js"
8
- },
9
- "main": "./src/cli/index.js",
10
- "scripts": {
11
- "start": "node bin/cashclaw.js",
12
- "test": "node --test tests/cli.test.js"
13
- },
14
- "engines": {
15
- "node": ">=20.0.0"
16
- },
17
- "dependencies": {
18
- "commander": "^12.0.0",
19
- "inquirer": "^9.0.0",
20
- "chalk": "^5.0.0",
21
- "ora": "^8.0.0",
22
- "stripe": "^17.0.0",
23
- "express": "^4.21.0",
24
- "open": "^10.0.0",
25
- "uuid": "^10.0.0",
26
- "fs-extra": "^11.0.0",
27
- "dayjs": "^1.11.0",
28
- "boxen": "^8.0.0",
29
- "cli-table3": "^0.6.0"
30
- },
31
- "keywords": [
32
- "openclaw",
33
- "cashclaw",
34
- "ai-agent",
35
- "freelance",
36
- "monetization",
37
- "stripe",
38
- "autonomous",
39
- "hyrve",
40
- "email-outreach",
41
- "competitor-analysis",
42
- "landing-page",
43
- "data-scraping",
44
- "reputation-management",
45
- "cold-email",
46
- "web-scraping"
47
- ],
48
- "author": "Ertugrul Akben <i@ertugrulakben.com>",
49
- "license": "MIT",
50
- "repository": {
51
- "type": "git",
52
- "url": "https://github.com/ertugrulakben/cashclaw"
53
- },
54
- "homepage": "https://cashclawai.com"
55
- }
1
+ {
2
+ "name": "cashclaw",
3
+ "version": "1.6.2",
4
+ "description": "Turn your OpenClaw AI agent into a money-making machine — 12 skills, audit trails, security hardened",
5
+ "type": "module",
6
+ "bin": {
7
+ "cashclaw": "./bin/cashclaw.js"
8
+ },
9
+ "main": "./src/cli/index.js",
10
+ "scripts": {
11
+ "start": "node bin/cashclaw.js",
12
+ "test": "node --test tests/cli.test.js"
13
+ },
14
+ "engines": {
15
+ "node": ">=20.0.0"
16
+ },
17
+ "dependencies": {
18
+ "commander": "^12.0.0",
19
+ "inquirer": "^9.0.0",
20
+ "chalk": "^5.0.0",
21
+ "ora": "^8.0.0",
22
+ "stripe": "^17.0.0",
23
+ "express": "^4.21.0",
24
+ "open": "^10.0.0",
25
+ "uuid": "^10.0.0",
26
+ "fs-extra": "^11.0.0",
27
+ "dayjs": "^1.11.0",
28
+ "boxen": "^8.0.0",
29
+ "cli-table3": "^0.6.0"
30
+ },
31
+ "keywords": [
32
+ "openclaw",
33
+ "cashclaw",
34
+ "ai-agent",
35
+ "freelance",
36
+ "monetization",
37
+ "stripe",
38
+ "autonomous",
39
+ "hyrve",
40
+ "email-outreach",
41
+ "competitor-analysis",
42
+ "landing-page",
43
+ "data-scraping",
44
+ "reputation-management",
45
+ "cold-email",
46
+ "web-scraping"
47
+ ],
48
+ "author": "Ertugrul Akben <i@ertugrulakben.com>",
49
+ "license": "MIT",
50
+ "repository": {
51
+ "type": "git",
52
+ "url": "https://github.com/ertugrulakben/cashclaw"
53
+ },
54
+ "homepage": "https://cashclawai.com"
55
+ }
@@ -5,7 +5,7 @@ import chalk from 'chalk';
5
5
  import ora from 'ora';
6
6
  import { loadConfig } from '../utils/config.js';
7
7
  import { showMiniBanner } from '../utils/banner.js';
8
- import { listAvailableJobs, listOrders, acceptJob, deliverJob, getAgentProfile, getWallet, loginAndGetToken, acceptProposal, rejectProposal, sendMessage, getMessages, requestWithdraw, claimAgent, getPlatformStats, createApiKey, listApiKeys, revokeApiKey, counterOffer, completeOrder, reviewOrder } from '../../integrations/hyrve-bridge.js';
8
+ import { listAvailableJobs, listOrders, acceptJob, deliverJob, getAgentProfile, getWallet, loginAndGetToken, acceptProposal, rejectProposal, sendMessage, getMessages, requestWithdraw, claimAgent, getPlatformStats, createApiKey, listApiKeys, revokeApiKey, counterOffer, completeOrder, reviewOrder, getMyAgents } from '../../integrations/hyrve-bridge.js';
9
9
  import { saveConfig } from '../utils/config.js';
10
10
  import MppBridge from '../../integrations/mpp-bridge.js';
11
11
 
@@ -212,6 +212,28 @@ export function createHyrveCommand() {
212
212
  config.hyrve.refresh_token = result.refresh_token;
213
213
  await saveConfig(config);
214
214
  console.log(chalk.green(' ✔ Logged in! Token saved.'));
215
+
216
+ // Fetch agent profile to populate agent_id if missing
217
+ if (!config.hyrve.agent_id) {
218
+ const spinner = ora(' Fetching agent profile...').start();
219
+ try {
220
+ const agentsResult = await getMyAgents();
221
+ if (agentsResult.success && agentsResult.agents && agentsResult.agents.length > 0) {
222
+ const agent = agentsResult.agents[0];
223
+ config.hyrve.agent_id = agent.id;
224
+ config.hyrve.registered = true;
225
+ if (agent.api_key && !config.hyrve.api_key) {
226
+ config.hyrve.api_key = agent.api_key;
227
+ }
228
+ await saveConfig(config);
229
+ spinner.succeed(` Agent linked: ${agent.name || agent.id}`);
230
+ } else {
231
+ spinner.info(' No agents found on your account. Register one with "cashclaw init".');
232
+ }
233
+ } catch {
234
+ spinner.info(' Could not fetch agent profile. Run "cashclaw hyrve profile" later.');
235
+ }
236
+ }
215
237
  } else {
216
238
  console.log(chalk.red(' ✖ ' + result.message));
217
239
  }
@@ -225,7 +247,20 @@ export function createHyrveCommand() {
225
247
  console.log(chalk.cyan(' Claiming agent...'));
226
248
  const result = await claimAgent(apiKey);
227
249
  if (result.success) {
250
+ const config = await loadConfig();
251
+ config.hyrve = config.hyrve || {};
252
+ if (result.agent) {
253
+ config.hyrve.agent_id = result.agent.id || result.agent.agent_id;
254
+ config.hyrve.registered = true;
255
+ if (!config.hyrve.api_key && apiKey) {
256
+ config.hyrve.api_key = apiKey;
257
+ }
258
+ await saveConfig(config);
259
+ }
228
260
  console.log(chalk.green(' ✔ Agent claimed! ' + (result.message || '')));
261
+ if (config.hyrve.agent_id) {
262
+ console.log(chalk.gray(` Agent ID: ${config.hyrve.agent_id}`));
263
+ }
229
264
  } else {
230
265
  console.log(chalk.red(' ✖ ' + result.message));
231
266
  }
@@ -232,11 +232,14 @@ export async function runInit() {
232
232
  // ─── Try HYRVE Registration ──────────────────────────────────────────
233
233
  const hyrveSpinner = ora('Registering with HYRVEai marketplace...').start();
234
234
  const hyrveResult = await registerAgent(config);
235
- if (hyrveResult.success) {
235
+ if (hyrveResult.success && hyrveResult.data) {
236
236
  config.hyrve.registered = true;
237
- config.hyrve.agent_id = hyrveResult.agent_id;
237
+ config.hyrve.agent_id = hyrveResult.data.agent_id;
238
+ if (hyrveResult.data.api_key) {
239
+ config.hyrve.api_key = hyrveResult.data.api_key;
240
+ }
238
241
  await saveConfig(config);
239
- hyrveSpinner.succeed('Registered with HYRVEai');
242
+ hyrveSpinner.succeed(`Registered with HYRVEai (Agent ID: ${config.hyrve.agent_id})`);
240
243
  } else {
241
244
  hyrveSpinner.info(hyrveResult.message);
242
245
  }
@@ -13,7 +13,7 @@
13
13
  <header class="header">
14
14
  <div class="header-left">
15
15
  <span class="logo">CashClaw</span>
16
- <span class="version" id="appVersion">v1.5.0</span>
16
+ <span class="version" id="appVersion">v1.6.1</span>
17
17
  </div>
18
18
  <div class="header-right">
19
19
  <span class="agent-name" id="agentName">Loading...</span>
@@ -164,7 +164,7 @@
164
164
 
165
165
  <!-- Footer -->
166
166
  <footer class="footer">
167
- <span id="footerVersion">CashClaw v1.5.0</span>
167
+ <span id="footerVersion">CashClaw v1.6.1</span>
168
168
  <span class="footer-sep">|</span>
169
169
  <a href="https://cashclawai.com" target="_blank">cashclawai.com</a>
170
170
  <span class="footer-sep">|</span>
@@ -677,8 +677,32 @@ export async function getWithdrawals() {
677
677
  }
678
678
  }
679
679
 
680
+ /**
681
+ * Get all agents owned by the authenticated user.
682
+ * Used after login to auto-populate agent_id in config.
683
+ * @returns {object} { success, agents, message }
684
+ */
685
+ export async function getMyAgents() {
686
+ const config = await loadConfig();
687
+ const apiUrl = await getApiUrl();
688
+ try {
689
+ const response = await fetch(`${apiUrl}/agents/me`, {
690
+ headers: await getAuthHeaders(config),
691
+ });
692
+ if (!response.ok) {
693
+ const errMsg = await parseErrorResponse(response);
694
+ throw new Error(`Failed to fetch agents (${response.status}): ${errMsg}`);
695
+ }
696
+ const data = await response.json();
697
+ return { success: true, agents: data.agents || data.data || (Array.isArray(data) ? data : []) };
698
+ } catch (err) {
699
+ return { success: false, agents: [], message: `Could not fetch agents: ${err.message}` };
700
+ }
701
+ }
702
+
680
703
  /**
681
704
  * Claim an agent registered via SKILL.md or self-register.
705
+ * If the agent is already owned, fetches and returns it instead of failing.
682
706
  * @param {string} apiKey - The API key to claim
683
707
  * @returns {object} { success, agent, message }
684
708
  */
@@ -693,6 +717,14 @@ export async function claimAgent(apiKey) {
693
717
  });
694
718
  if (!response.ok) {
695
719
  const errMsg = await parseErrorResponse(response);
720
+ // If already owned, try to fetch the agent instead
721
+ if (response.status === 400 && errMsg.toLowerCase().includes('already')) {
722
+ const myAgents = await getMyAgents();
723
+ if (myAgents.success && myAgents.agents.length > 0) {
724
+ const agent = myAgents.agents[0];
725
+ return { success: true, agent, message: 'Agent already claimed. Linked to local config.' };
726
+ }
727
+ }
696
728
  throw new Error(`Claim failed (${response.status}): ${errMsg}`);
697
729
  }
698
730
  const data = await response.json();
@@ -1,67 +1,67 @@
1
- 'use strict';
2
-
3
- import { loadConfig } from '../cli/utils/config.js';
4
-
5
- const MPP_SPEC_URL = 'https://mpp.dev';
6
- const STRIPE_MPP_DOCS = 'https://docs.stripe.com/payments/machine';
7
-
8
- export class MppBridge {
9
- constructor(config = null) {
10
- this.config = config || null;
11
- this.apiUrl = config?.hyrve?.api_url || 'https://api.hyrveai.com/v1';
12
- this.apiKey = config?.hyrve?.api_key || null;
13
- }
14
-
15
- getHeaders() {
16
- const headers = { 'Content-Type': 'application/json', 'User-Agent': 'CashClaw/1.4.0' };
17
- if (this.apiKey) headers['X-API-Key'] = this.apiKey;
18
- return headers;
19
- }
20
-
21
- async createChallenge(agentId, amountUsd, currency = 'usdc') {
22
- const res = await fetch(`${this.apiUrl}/payments/mpp/challenge`, {
23
- method: 'POST',
24
- headers: this.getHeaders(),
25
- body: JSON.stringify({ agent_id: agentId, amount_usd: amountUsd, currency }),
26
- });
27
- if (!res.ok) {
28
- const err = await res.json().catch(() => ({ message: 'MPP challenge failed' }));
29
- throw new Error(err.error?.message || err.message || `HTTP ${res.status}`);
30
- }
31
- return res.json();
32
- }
33
-
34
- async verifyCredential(credential) {
35
- const res = await fetch(`${this.apiUrl}/payments/mpp/verify`, {
36
- method: 'POST',
37
- headers: this.getHeaders(),
38
- body: JSON.stringify({ credential }),
39
- });
40
- if (!res.ok) {
41
- const err = await res.json().catch(() => ({ message: 'MPP verify failed' }));
42
- throw new Error(err.error?.message || err.message || `HTTP ${res.status}`);
43
- }
44
- return res.json();
45
- }
46
-
47
- async getStatus() {
48
- try {
49
- const res = await fetch(`${this.apiUrl}/health`, { headers: this.getHeaders() });
50
- const data = await res.json();
51
- return {
52
- connected: res.ok,
53
- api_status: data.status,
54
- mpp_enabled: true,
55
- mpp_spec: MPP_SPEC_URL,
56
- stripe_docs: STRIPE_MPP_DOCS,
57
- supported_currencies: ['usdc'],
58
- supported_networks: ['tempo', 'base', 'solana'],
59
- fee_rate: '1.5%',
60
- };
61
- } catch (err) {
62
- return { connected: false, error: err.message };
63
- }
64
- }
65
- }
66
-
67
- export default MppBridge;
1
+ 'use strict';
2
+
3
+ import { loadConfig } from '../cli/utils/config.js';
4
+
5
+ const MPP_SPEC_URL = 'https://mpp.dev';
6
+ const STRIPE_MPP_DOCS = 'https://docs.stripe.com/payments/machine';
7
+
8
+ export class MppBridge {
9
+ constructor(config = null) {
10
+ this.config = config || null;
11
+ this.apiUrl = config?.hyrve?.api_url || 'https://api.hyrveai.com/v1';
12
+ this.apiKey = config?.hyrve?.api_key || null;
13
+ }
14
+
15
+ getHeaders() {
16
+ const headers = { 'Content-Type': 'application/json', 'User-Agent': 'CashClaw/1.6.2' };
17
+ if (this.apiKey) headers['X-API-Key'] = this.apiKey;
18
+ return headers;
19
+ }
20
+
21
+ async createChallenge(agentId, amountUsd, currency = 'usdc') {
22
+ const res = await fetch(`${this.apiUrl}/payments/mpp/challenge`, {
23
+ method: 'POST',
24
+ headers: this.getHeaders(),
25
+ body: JSON.stringify({ agent_id: agentId, amount_usd: amountUsd, currency }),
26
+ });
27
+ if (!res.ok) {
28
+ const err = await res.json().catch(() => ({ message: 'MPP challenge failed' }));
29
+ throw new Error(err.error?.message || err.message || `HTTP ${res.status}`);
30
+ }
31
+ return res.json();
32
+ }
33
+
34
+ async verifyCredential(credential) {
35
+ const res = await fetch(`${this.apiUrl}/payments/mpp/verify`, {
36
+ method: 'POST',
37
+ headers: this.getHeaders(),
38
+ body: JSON.stringify({ credential }),
39
+ });
40
+ if (!res.ok) {
41
+ const err = await res.json().catch(() => ({ message: 'MPP verify failed' }));
42
+ throw new Error(err.error?.message || err.message || `HTTP ${res.status}`);
43
+ }
44
+ return res.json();
45
+ }
46
+
47
+ async getStatus() {
48
+ try {
49
+ const res = await fetch(`${this.apiUrl}/health`, { headers: this.getHeaders() });
50
+ const data = await res.json();
51
+ return {
52
+ connected: res.ok,
53
+ api_status: data.status,
54
+ mpp_enabled: true,
55
+ mpp_spec: MPP_SPEC_URL,
56
+ stripe_docs: STRIPE_MPP_DOCS,
57
+ supported_currencies: ['usdc'],
58
+ supported_networks: ['tempo', 'base', 'solana'],
59
+ fee_rate: '1.5%',
60
+ };
61
+ } catch (err) {
62
+ return { connected: false, error: err.message };
63
+ }
64
+ }
65
+ }
66
+
67
+ export default MppBridge;