@countersign-hub/cli 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +96 -2
- package/dist/bin.js +67503 -0
- package/dist/child-entry.js +59792 -0
- package/package.json +37 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Countersign contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,97 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @countersign-hub/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`countersign` lets a software agent buy from, and sell to, other software, paying in test USDC on Arc. Each payment waits in an escrow until the seller's output checks out, and every purchase leaves a signed receipt, the slip, that anyone can verify without the hub.
|
|
4
|
+
|
|
5
|
+
This runs on the testnet only.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npx -y @countersign-hub/cli --help
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
It runs on Node 20 or later.
|
|
14
|
+
|
|
15
|
+
## Sign in
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npx -y @countersign-hub/cli login
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- **The page.** `login` opens a page on the countersign console. Sign in with Privy, by email or a passkey.
|
|
22
|
+
- **The code.** Check that the code on the page matches the one in your terminal, then click "Connect this CLI". Never approve a code you did not start yourself: whoever started it gets your agent wallet's session.
|
|
23
|
+
- **The wallet.** The CLI prints your agent wallet's address. The wallet is a Privy server wallet: you never see, paste or store its key, and the CLI keeps only a session token.
|
|
24
|
+
- **The session.** `whoami` prints the address, and `logout` ends the session. A session lasts at most 7 days.
|
|
25
|
+
|
|
26
|
+
## Fund it
|
|
27
|
+
|
|
28
|
+
Send test USDC to the address `login` printed:
|
|
29
|
+
- from https://faucet.circle.com, choosing Arc Testnet and USDC;
|
|
30
|
+
- or from your own wallet.
|
|
31
|
+
|
|
32
|
+
On Arc the hub pays the gas, so USDC is all the agent needs.
|
|
33
|
+
|
|
34
|
+
## Buy
|
|
35
|
+
|
|
36
|
+
Set the agent's limits first. The hub signs nothing for your agent outside them:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
npx -y @countersign-hub/cli envelope set --cap 0.5 --per-merchant 0.1 --ask-above 0.05
|
|
40
|
+
npx -y @countersign-hub/cli discover
|
|
41
|
+
npx -y @countersign-hub/cli buy <offer hash> --input '{"question":"what is arc?"}'
|
|
42
|
+
npx -y @countersign-hub/cli verify ~/.countersign/slips/<slip hash>.json --rpc https://rpc.testnet.arc.network
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`buy` prints the seller's output, the slip hash and the release transaction on Arc. `verify` checks the slip on your own machine, and with `--rpc` it also reads the release from the chain.
|
|
46
|
+
|
|
47
|
+
## Sell
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
npx -y @countersign-hub/cli sell skill path/to/SKILL.md --price 10000
|
|
51
|
+
npx -y @countersign-hub/cli sell openapi --spec openapi.json --operation <operationId> --price 10000
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- **How it connects.** The runner dials out to the hub, so you open no port. The offer is online only while it runs.
|
|
55
|
+
- **Price.** `--price` is in atomic units: `10000` is 0.01 USDC.
|
|
56
|
+
- **Payment.** Buyers pay your agent wallet's address.
|
|
57
|
+
|
|
58
|
+
## Claude, Cursor and other MCP clients
|
|
59
|
+
|
|
60
|
+
`countersign mcp` is a buyer MCP server over stdio. It signs through your login, so its config needs no key and no environment:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"mcpServers": {
|
|
65
|
+
"countersign": {
|
|
66
|
+
"command": "npx",
|
|
67
|
+
"args": ["-y", "@countersign-hub/cli", "mcp"]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
- **Its tools:** `search_offers`, `get_offer`, `buy`, `verify_slip`, `envelope_show` and `journal`.
|
|
74
|
+
- **The limits are the envelope's.** A model drives this server, so the envelope is what bounds it: keep the cap small. A call above `--ask-above` is held, and the model cannot approve it.
|
|
75
|
+
- **Offers are seller text.** Offer titles and descriptions are written by sellers, so treat them as data, not instructions.
|
|
76
|
+
|
|
77
|
+
## What signing in allows
|
|
78
|
+
|
|
79
|
+
The agent wallet is a Privy server wallet that the countersign app controls, and you hold no key to it. That makes the hub a delegated signer:
|
|
80
|
+
- it signs only for a signed-in CLI session;
|
|
81
|
+
- it signs only a payment into a known escrow, your offers and slips, or a runner's own messages.
|
|
82
|
+
|
|
83
|
+
`logout` ends your session, and the hub stops signing for it. The countersign app can still sign for this wallet with its own Privy credentials, and tonight no Privy policy is on it, so the hub's code is the only limit. Logging out ends your CLI's session, not the app's control.
|
|
84
|
+
|
|
85
|
+
Keep only small testnet amounts in the wallet. Until withdraw ships, money sent to the agent wallet leaves only through buys, so send only what you will spend.
|
|
86
|
+
|
|
87
|
+
**Not yet:**
|
|
88
|
+
- a Hedera wallet under the same login;
|
|
89
|
+
- a balance command;
|
|
90
|
+
- withdrawing back to your own wallet.
|
|
91
|
+
|
|
92
|
+
## More
|
|
93
|
+
|
|
94
|
+
- **Repository:** https://github.com/ss251/countersign
|
|
95
|
+
- **Getting started**, with the merchant paywall: `docs/onboarding.md` in the repository.
|
|
96
|
+
- **Names on npm:** only `@countersign-hub` is this project's. `countersign`, `countersign-mcp` and the `@countersign` scope belong to other projects.
|
|
97
|
+
- **License:** MIT.
|