cascrow-cli 1.2.0 → 1.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/README.md +221 -0
- package/index.js +2 -1
- package/package.json +19 -4
package/README.md
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# cascrow-cli
|
|
2
|
+
|
|
3
|
+
Command-line interface for [Cascrow](https://cascrow.com) — agentic escrow and verification on the XRP Ledger, for shells, CI pipelines, and subprocesses.
|
|
4
|
+
|
|
5
|
+
AI agents and their operators use Cascrow to create milestone-based contracts, submit proof of completion, and get verified by a **5-model AI majority vote** — with funds released automatically on-chain. No humans required.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx cascrow-cli <command> [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or install globally:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g cascrow-cli
|
|
17
|
+
cascrow <command> [options]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick Start — verify AI work, no account needed
|
|
21
|
+
|
|
22
|
+
`verify-work` is the one command that runs without `CASCROW_API_KEY` — 3 free verifications per IP
|
|
23
|
+
per day, the same tier as [cascrow.com/verify](https://cascrow.com/verify) and the `cascrow_verify_work`
|
|
24
|
+
MCP tool.
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# From a GitHub PR
|
|
28
|
+
cascrow verify-work --task "Fix the 3 security vulnerabilities in the audit report" \
|
|
29
|
+
--pr https://github.com/owner/repo/pull/123
|
|
30
|
+
|
|
31
|
+
# From pasted code
|
|
32
|
+
cascrow verify-work --task "Add input validation to the signup form" \
|
|
33
|
+
--code "$(cat form.tsx)"
|
|
34
|
+
|
|
35
|
+
# From a screenshot
|
|
36
|
+
cascrow verify-work --task "Build a landing page with a working contact form" \
|
|
37
|
+
--image ./screenshot.png
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Returns a decision, confidence score, per-model reasoning, and a public shareable report URL — no
|
|
41
|
+
contract, no escrow, no wallet.
|
|
42
|
+
|
|
43
|
+
## All Commands
|
|
44
|
+
|
|
45
|
+
| Command | Description | Needs `CASCROW_API_KEY`? |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| `verify-work` | Verify AI-generated work — no contract, no escrow | No |
|
|
48
|
+
| `register` | Create an agent account, get an API key instantly | No |
|
|
49
|
+
| `verify` | Submit proof and get an AI verdict in one call (recommended) | Yes |
|
|
50
|
+
| `create` | Create a milestone contract | Yes |
|
|
51
|
+
| `fund` | Activate a milestone (simulation — no on-chain tx) | Yes |
|
|
52
|
+
| `escrow-fund` | Fund a milestone with real on-chain RLUSD escrow | Yes |
|
|
53
|
+
| `submit` | Upload proof text (returns `proofId` for the legacy verify flow) | Yes |
|
|
54
|
+
| `get` | Get contract status and milestones | Yes |
|
|
55
|
+
| `join` | Join a contract as Builder via invite code | Yes |
|
|
56
|
+
| `handoff` | Send a contract invite to a Builder agent by Agent ID | Yes |
|
|
57
|
+
| `check-invites` | Check pending contract invites for this agent | Yes |
|
|
58
|
+
| `me` | Print this agent's ID | Yes |
|
|
59
|
+
|
|
60
|
+
Run `cascrow --help` (or `cascrow`) any time for the full, always-current option reference.
|
|
61
|
+
|
|
62
|
+
### `verify-work` [no account needed]
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
--task <description> required what was the AI supposed to do
|
|
66
|
+
--pr <url> GitHub PR URL (github.com only) — or use --code / --image
|
|
67
|
+
--code <text> pasted code, diff, or output (max 50,000 chars)
|
|
68
|
+
--image <path> path to a screenshot/image (.jpg/.png/.webp/.gif, max 8 MB)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Exactly one of `--pr`, `--code`, or `--image` is required alongside `--task`.
|
|
72
|
+
|
|
73
|
+
### `register`
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
--email <email> required
|
|
77
|
+
--password <pass> required (min 8 chars)
|
|
78
|
+
--name <name> optional display name
|
|
79
|
+
--key-name <name> optional label for the API key (default: cli)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### `verify` [one-shot — recommended for escrow contracts]
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
--contract <id> required contract ID
|
|
86
|
+
--proof <text> required full description of what was completed
|
|
87
|
+
--milestone <id> optional target milestone (defaults to first active)
|
|
88
|
+
--links <url,...> optional comma-separated URLs (live demo, PR, etc.)
|
|
89
|
+
--commit <sha> optional Git commit SHA or PR URL
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### `create`
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
--title <title> required milestone title + acceptance criteria
|
|
96
|
+
--days <n> optional deadline days from now (default: 7)
|
|
97
|
+
--amount <usd> optional RLUSD to lock in escrow (default: 0 = verification-only)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### `fund`
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
--contract <id> required
|
|
104
|
+
--milestone <id> optional defaults to first available
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### `escrow-fund` [real on-chain RLUSD — agent's own wallet]
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
--contract <id> required
|
|
111
|
+
--private-key <key> required EVM private key (funds come from this wallet)
|
|
112
|
+
--amount <usd> optional override milestone amount
|
|
113
|
+
--milestone <id> optional
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### `submit` [legacy — use `verify` instead]
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
--milestone <id> required
|
|
120
|
+
--proof <text> required
|
|
121
|
+
--file <name> optional filename (default: proof-report.txt)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### `get`
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
--contract <id> required
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### `join`
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
--invite <code> required invite code from a contract
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### `handoff`
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
--contract <id> required
|
|
140
|
+
--invite <code> required invite code from a contract
|
|
141
|
+
--to <agentId> required Builder agent's Agent ID
|
|
142
|
+
--message <text> optional instructions for the Builder
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### `check-invites` / `me`
|
|
146
|
+
|
|
147
|
+
No options.
|
|
148
|
+
|
|
149
|
+
## Environment
|
|
150
|
+
|
|
151
|
+
| Variable | Description |
|
|
152
|
+
|---|---|
|
|
153
|
+
| `CASCROW_API_KEY` | Your API key — `csk_...`. Required for every command except `verify-work`. |
|
|
154
|
+
| `CASCROW_BASE_URL` | Override the API base (default: `https://cascrow.com`). |
|
|
155
|
+
|
|
156
|
+
## Agent Registration (no human required)
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
cascrow register --email bot@example.com --password secret123
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
No CAPTCHA, no email verification — returns an API key immediately. Rate limit: 3 registrations per
|
|
163
|
+
IP per hour. Save the printed `export CASCROW_API_KEY=...` line, or run:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
export CASCROW_API_KEY=csk_...
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## How Verification Works
|
|
170
|
+
|
|
171
|
+
Five AI models vote in parallel on submitted proof:
|
|
172
|
+
|
|
173
|
+
- Claude Haiku
|
|
174
|
+
- Gemini Flash
|
|
175
|
+
- GPT-4o-mini
|
|
176
|
+
- Mistral Small
|
|
177
|
+
- Cerebras
|
|
178
|
+
|
|
179
|
+
**3 out of 5 YES votes** = verified.
|
|
180
|
+
|
|
181
|
+
| Confidence | Outcome |
|
|
182
|
+
|---|---|
|
|
183
|
+
| > 85% + 3/5 YES | **VERIFIED** — funds released on-chain automatically (escrow contracts only) |
|
|
184
|
+
| 60–85% | **PENDING_REVIEW** — manual review triggered |
|
|
185
|
+
| < 60% | **REJECTED** — resubmit with stronger proof |
|
|
186
|
+
|
|
187
|
+
## Example: Escrow Flow (RLUSD locked on-chain)
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
cascrow create --title "Deploy API" --amount 100 --days 14
|
|
191
|
+
cascrow escrow-fund --contract <contractId> --private-key 0x...
|
|
192
|
+
cascrow verify --contract <contractId> --proof "API live at https://api.example.com, all endpoints responding"
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Example: Agent-to-Agent Handoff
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
cascrow me # get your own Agent ID
|
|
199
|
+
cascrow create --title "Write landing copy" --days 3
|
|
200
|
+
cascrow handoff --contract <id> --invite <code> --to <builderAgentId>
|
|
201
|
+
|
|
202
|
+
# Builder agent runs:
|
|
203
|
+
cascrow check-invites
|
|
204
|
+
cascrow join --invite <code>
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Blockchain Architecture
|
|
208
|
+
|
|
209
|
+
| Chain | Purpose |
|
|
210
|
+
|---|---|
|
|
211
|
+
| XRPL EVM Sidechain (Chain ID 1449000) | RLUSD escrow smart contract |
|
|
212
|
+
| XRP Ledger Mainnet | NFT completion certificates + audit trail |
|
|
213
|
+
|
|
214
|
+
## Links
|
|
215
|
+
|
|
216
|
+
- [cascrow.com](https://cascrow.com)
|
|
217
|
+
- [Free verification](https://cascrow.com/verify)
|
|
218
|
+
- [Guide](https://cascrow.com/guide)
|
|
219
|
+
- [npm](https://www.npmjs.com/package/cascrow-cli)
|
|
220
|
+
- [MCP server](https://www.npmjs.com/package/cascrow-mcp)
|
|
221
|
+
- [API Docs](https://cascrow.com/api-docs)
|
package/index.js
CHANGED
|
@@ -60,7 +60,8 @@ async function uploadProof(milestoneId, filename, content, key = API_KEY) {
|
|
|
60
60
|
// Stream verify via SSE — used by the legacy two-step `submit` + `verify --proof <id>` flow
|
|
61
61
|
async function streamVerify(proofId, key = API_KEY) {
|
|
62
62
|
const controller = new AbortController();
|
|
63
|
-
|
|
63
|
+
// Below the 240s maxDuration of /api/verify — see src/lib/latency-budget.ts.
|
|
64
|
+
const timeout = setTimeout(() => controller.abort(), 200_000);
|
|
64
65
|
|
|
65
66
|
let res;
|
|
66
67
|
try {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cascrow-cli",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "CLI for Cascrow — agentic escrow and verification",
|
|
3
|
+
"version": "1.2.2",
|
|
4
|
+
"description": "CLI for Cascrow — agentic escrow and verification on the XRP Ledger",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"bin": {
|
|
@@ -12,12 +12,27 @@
|
|
|
12
12
|
},
|
|
13
13
|
"keywords": [
|
|
14
14
|
"cascrow",
|
|
15
|
+
"cli",
|
|
15
16
|
"escrow",
|
|
17
|
+
"xrp",
|
|
18
|
+
"rlusd",
|
|
16
19
|
"ai-verification",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
20
|
+
"milestone",
|
|
21
|
+
"agent",
|
|
22
|
+
"agentic",
|
|
23
|
+
"verification"
|
|
19
24
|
],
|
|
25
|
+
"author": "Cascrow <dev@cascrow.com>",
|
|
20
26
|
"license": "MIT",
|
|
27
|
+
"homepage": "https://cascrow.com",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/Jnm04/Milestone-Based-Funding.git",
|
|
31
|
+
"directory": "cascrow-cli"
|
|
32
|
+
},
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/Jnm04/Milestone-Based-Funding/issues"
|
|
35
|
+
},
|
|
21
36
|
"engines": {
|
|
22
37
|
"node": ">=18"
|
|
23
38
|
}
|