cashclaw 1.3.0 → 1.4.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/CHANGELOG.md +17 -0
- package/README.md +26 -3
- package/package.json +1 -1
- package/src/cli/commands/hyrve.js +100 -0
- package/src/cli/index.js +4 -0
- package/src/integrations/mpp-bridge.js +67 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to CashClaw will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.4.0] - 2026-03-19
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Machine Payments Protocol (MPP) bridge (`src/integrations/mpp-bridge.js`)
|
|
9
|
+
- Stripe + Tempo stablecoin payments (USDC)
|
|
10
|
+
- 1.5% transaction fees (vs 2.9%+$0.30 for cards)
|
|
11
|
+
- createChallenge, verifyCredential, getStatus functions
|
|
12
|
+
- `cashclaw hyrve` subcommand suite
|
|
13
|
+
- `hyrve status` -- connection status + MPP availability
|
|
14
|
+
- `hyrve jobs` -- list available marketplace jobs
|
|
15
|
+
- `hyrve wallet` -- wallet balance check
|
|
16
|
+
- `hyrve dashboard` -- open app.hyrveai.com in browser
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- Updated README with MPP section and hyrve commands
|
|
20
|
+
- Stats: 111 stars, 34 forks, 3,000+ registered users
|
|
21
|
+
|
|
5
22
|
## [1.3.0] - 2026-03-19
|
|
6
23
|
|
|
7
24
|
### Added
|
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.
|
|
17
|
+
<img src="https://img.shields.io/badge/version-1.4.0-blue" alt="v1.4.0" />
|
|
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>
|
|
@@ -113,7 +113,7 @@ cashclaw audit --url "https://your-client.com" --tier standard
|
|
|
113
113
|
|
|
114
114
|
## HYRVE AI Integration
|
|
115
115
|
|
|
116
|
-
CashClaw v1.
|
|
116
|
+
CashClaw v1.4.0 connects directly to the **live HYRVE AI marketplace** via authenticated API.
|
|
117
117
|
|
|
118
118
|
| Component | URL |
|
|
119
119
|
|-----------|-----|
|
|
@@ -185,6 +185,26 @@ When connected to HYRVE AI, your agent automatically:
|
|
|
185
185
|
|
|
186
186
|
No cold outreach needed. Clients come to you.
|
|
187
187
|
|
|
188
|
+
### Machine Payments Protocol (MPP)
|
|
189
|
+
|
|
190
|
+
CashClaw v1.4.0 supports Stripe's new [Machine Payments Protocol](https://mpp.dev) -- enabling agents to pay each other autonomously using USDC stablecoins.
|
|
191
|
+
|
|
192
|
+
- **1.5% fees** (vs 2.9%+$0.30 for cards)
|
|
193
|
+
- HTTP 402 Payment Required flow
|
|
194
|
+
- Agent-to-agent micropayments
|
|
195
|
+
- Stripe Dashboard compatible
|
|
196
|
+
|
|
197
|
+
Reference: [stripe-samples/machine-payments](https://github.com/stripe-samples/machine-payments)
|
|
198
|
+
|
|
199
|
+
### HYRVE Marketplace Commands
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
cashclaw hyrve status # Check connection to HYRVE AI
|
|
203
|
+
cashclaw hyrve jobs # List available marketplace jobs
|
|
204
|
+
cashclaw hyrve wallet # Check wallet balance
|
|
205
|
+
cashclaw hyrve dashboard # Open HYRVE dashboard in browser
|
|
206
|
+
```
|
|
207
|
+
|
|
188
208
|
## Mission Audit Trail
|
|
189
209
|
|
|
190
210
|
Every mission is logged end-to-end. No invoice goes out without proof.
|
|
@@ -354,8 +374,11 @@ cashclaw/
|
|
|
354
374
|
bin/ # CLI entry point
|
|
355
375
|
src/ # Core engine source
|
|
356
376
|
integrations/
|
|
357
|
-
hyrve-bridge.js # HYRVE AI marketplace bridge (v1.
|
|
377
|
+
hyrve-bridge.js # HYRVE AI marketplace bridge (v1.4.0)
|
|
378
|
+
mpp-bridge.js # Machine Payments Protocol bridge (v1.4.0)
|
|
358
379
|
cli/
|
|
380
|
+
commands/
|
|
381
|
+
hyrve.js # HYRVE AI subcommands (v1.4.0)
|
|
359
382
|
utils/
|
|
360
383
|
config.js # Configuration management
|
|
361
384
|
skills/
|
package/package.json
CHANGED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { Command } from 'commander';
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
import ora from 'ora';
|
|
6
|
+
import { loadConfig } from '../utils/config.js';
|
|
7
|
+
import { listAvailableJobs, listOrders } from '../../integrations/hyrve-bridge.js';
|
|
8
|
+
import MppBridge from '../../integrations/mpp-bridge.js';
|
|
9
|
+
|
|
10
|
+
export function createHyrveCommand() {
|
|
11
|
+
const hyrve = new Command('hyrve')
|
|
12
|
+
.description('HYRVE AI Marketplace commands');
|
|
13
|
+
|
|
14
|
+
hyrve
|
|
15
|
+
.command('status')
|
|
16
|
+
.description('Check HYRVE connection status')
|
|
17
|
+
.action(async () => {
|
|
18
|
+
const config = await loadConfig();
|
|
19
|
+
const spinner = ora('Checking HYRVE connection...').start();
|
|
20
|
+
try {
|
|
21
|
+
const mpp = new MppBridge(config);
|
|
22
|
+
|
|
23
|
+
const [apiStatus, mppStatus] = await Promise.all([
|
|
24
|
+
fetch(`${config?.hyrve?.api_url || 'https://api.hyrveai.com/v1'}/health`)
|
|
25
|
+
.then(r => r.json()).catch(() => ({ status: 'error' })),
|
|
26
|
+
mpp.getStatus(),
|
|
27
|
+
]);
|
|
28
|
+
|
|
29
|
+
spinner.stop();
|
|
30
|
+
console.log('');
|
|
31
|
+
console.log(chalk.bold(' HYRVE AI Connection Status'));
|
|
32
|
+
console.log(chalk.dim(' ─────────────────────────'));
|
|
33
|
+
console.log(` API: ${apiStatus.status === 'ok' ? chalk.green('● Connected') : chalk.red('● Disconnected')}`);
|
|
34
|
+
console.log(` API URL: ${chalk.dim(config?.hyrve?.api_url || 'https://api.hyrveai.com/v1')}`);
|
|
35
|
+
console.log(` Agent ID: ${config?.hyrve?.agent_id ? chalk.cyan(config.hyrve.agent_id) : chalk.yellow('Not registered')}`);
|
|
36
|
+
console.log(` API Key: ${config?.hyrve?.api_key ? chalk.green('● Set') : chalk.yellow('● Not set')}`);
|
|
37
|
+
console.log(` MPP: ${mppStatus.connected ? chalk.green('● Available (USDC, 1.5% fee)') : chalk.yellow('● Pending')}`);
|
|
38
|
+
console.log(` Dashboard: ${chalk.dim('https://app.hyrveai.com')}`);
|
|
39
|
+
console.log('');
|
|
40
|
+
} catch (err) {
|
|
41
|
+
spinner.fail('Connection check failed: ' + err.message);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
hyrve
|
|
46
|
+
.command('jobs')
|
|
47
|
+
.description('List available jobs on HYRVE marketplace')
|
|
48
|
+
.action(async () => {
|
|
49
|
+
const spinner = ora('Fetching available jobs...').start();
|
|
50
|
+
try {
|
|
51
|
+
const result = await listAvailableJobs();
|
|
52
|
+
spinner.stop();
|
|
53
|
+
|
|
54
|
+
if (!result.jobs || result.jobs.length === 0) {
|
|
55
|
+
console.log(chalk.yellow('\n No matching jobs found.\n'));
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
console.log(chalk.bold(`\n Available Jobs (${result.jobs.length})\n`));
|
|
60
|
+
for (const job of result.jobs) {
|
|
61
|
+
console.log(` ${chalk.cyan(job.title)}`);
|
|
62
|
+
console.log(` ${chalk.dim(job.description?.substring(0, 80))}...`);
|
|
63
|
+
console.log(` Budget: ${chalk.green('$' + job.budget_usd)} | Category: ${job.category} | ID: ${chalk.dim(job.id)}`);
|
|
64
|
+
console.log('');
|
|
65
|
+
}
|
|
66
|
+
} catch (err) {
|
|
67
|
+
spinner.fail('Failed: ' + err.message);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
hyrve
|
|
72
|
+
.command('wallet')
|
|
73
|
+
.description('Check HYRVE wallet balance')
|
|
74
|
+
.action(async () => {
|
|
75
|
+
const spinner = ora('Fetching wallet...').start();
|
|
76
|
+
try {
|
|
77
|
+
const result = await listOrders({ status: 'completed', limit: 5 });
|
|
78
|
+
spinner.stop();
|
|
79
|
+
console.log(chalk.bold('\n HYRVE Wallet'));
|
|
80
|
+
console.log(chalk.dim(' ──────────────'));
|
|
81
|
+
console.log(` Open dashboard for details: ${chalk.cyan('https://app.hyrveai.com/wallet')}`);
|
|
82
|
+
console.log('');
|
|
83
|
+
} catch (err) {
|
|
84
|
+
spinner.fail('Failed: ' + err.message);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
hyrve
|
|
89
|
+
.command('dashboard')
|
|
90
|
+
.description('Open HYRVE AI dashboard in browser')
|
|
91
|
+
.action(async () => {
|
|
92
|
+
const url = 'https://app.hyrveai.com';
|
|
93
|
+
console.log(chalk.cyan(`\n Opening ${url}...\n`));
|
|
94
|
+
const { exec } = await import('child_process');
|
|
95
|
+
const cmd = process.platform === 'win32' ? `start ${url}` : process.platform === 'darwin' ? `open ${url}` : `xdg-open ${url}`;
|
|
96
|
+
exec(cmd);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
return hyrve;
|
|
100
|
+
}
|
package/src/cli/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { runAudit } from './commands/audit.js';
|
|
|
9
9
|
import { listMissions, createMission, startMission, completeMission, cancelMission, getMission, getMissionTrail, exportMissionProof } from '../engine/mission-runner.js';
|
|
10
10
|
import { getTotal, getMonthly, getWeekly, getToday, getHistory, getByService } from '../engine/earnings-tracker.js';
|
|
11
11
|
import { listInstalledSkills, listAvailableSkills, installSkills } from '../integrations/openclaw-bridge.js';
|
|
12
|
+
import { createHyrveCommand } from './commands/hyrve.js';
|
|
12
13
|
import Table from 'cli-table3';
|
|
13
14
|
import fs from 'fs-extra';
|
|
14
15
|
import path from 'path';
|
|
@@ -564,6 +565,9 @@ program
|
|
|
564
565
|
}
|
|
565
566
|
});
|
|
566
567
|
|
|
568
|
+
// ─── cashclaw hyrve ───────────────────────────────────────────────────
|
|
569
|
+
program.addCommand(createHyrveCommand());
|
|
570
|
+
|
|
567
571
|
// ─── Default action (no command) ───────────────────────────────────────
|
|
568
572
|
program.action(() => {
|
|
569
573
|
showBanner();
|
|
@@ -0,0 +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;
|