@justhandledlabs/agent-client 0.1.0 → 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.
Files changed (3) hide show
  1. package/README.md +68 -66
  2. package/package.json +68 -68
  3. package/server.json +30 -30
package/README.md CHANGED
@@ -1,66 +1,68 @@
1
- # JustHandled Agent Client
2
-
3
- A guarded CLI, JavaScript client, and local MCP server for the [JustHandled Agent Utility Gateway](https://justhandled-agent-gateway.netlify.app). The package exposes ten deterministic preflights. Each paid call costs exactly $0.05 USDC on Base mainnet and returns a versioned evidence receipt.
4
-
5
- The client fails closed before signing. It accepts only the pinned JustHandled gateway, Base mainnet, the canonical Base USDC contract, a 50,000-base-unit price, and the published merchant receiver. Customer inputs are not persisted by the gateway.
6
-
7
- ## Inspect without a wallet
8
-
9
- ```bash
10
- npx --package @justhandledlabs/agent-client justhandled-agent catalog
11
- npx --package @justhandledlabs/agent-client justhandled-agent preview filename-portability-preflight --json '{"paths":["CON.txt"]}'
12
- ```
13
-
14
- Preview performs an unpaid request and validates the returned x402 terms. It does not sign or spend.
15
-
16
- ## Execute one paid utility
17
-
18
- Use a dedicated low-balance Base wallet. Never provide a primary wallet key.
19
-
20
- ```bash
21
- export JH_EVM_PRIVATE_KEY=0x...
22
- npx --package @justhandledlabs/agent-client justhandled-agent call filename-portability-preflight --json '{"paths":["CON.txt"]}'
23
- ```
24
-
25
- PowerShell:
26
-
27
- ```powershell
28
- $env:JH_EVM_PRIVATE_KEY = "0x..."
29
- npx.cmd --package @justhandledlabs/agent-client justhandled-agent call filename-portability-preflight --json '{"paths":["CON.txt"]}'
30
- ```
31
-
32
- ## MCP configuration
33
-
34
- ```json
35
- {
36
- "mcpServers": {
37
- "justhandled": {
38
- "command": "npx",
39
- "args": ["-y", "@justhandledlabs/agent-client"],
40
- "env": {
41
- "JH_EVM_PRIVATE_KEY": "0xDEDICATED_LOW_BALANCE_WALLET_KEY"
42
- }
43
- }
44
- }
45
- }
46
- ```
47
-
48
- The MCP server exposes a free catalog tool plus one paid tool per gateway utility. Missing wallet configuration produces an error instead of a payment attempt.
49
-
50
- ## Security model
51
-
52
- - Price, chain, asset, receiver, and gateway origin are pinned in code.
53
- - Every execution starts with an unpaid 402 preview.
54
- - A mismatched term aborts before signing.
55
- - The package never prints the private key.
56
- - The gateway does not persist raw inputs or results.
57
- - Treat all crypto transfers as irreversible and fund only a dedicated wallet.
58
-
59
- ## Development
60
-
61
- ```bash
62
- npm install
63
- npm run check
64
- ```
65
-
66
- The gateway implementation is intentionally not included in this client repository.
1
+ # JustHandled Agent Client
2
+
3
+ A guarded CLI, JavaScript client, and local MCP server for the [JustHandled Agent Utility Gateway](https://justhandled-agent-gateway.netlify.app). The package exposes sixteen deterministic preflights, including six agent evidence and evaluation checks. Each paid call costs exactly $0.05 USDC on Base mainnet and returns a versioned evidence receipt.
4
+
5
+ The client fails closed before signing. It accepts only the pinned JustHandled gateway, Base mainnet, the canonical Base USDC contract, a 50,000-base-unit price, and the published merchant receiver. Customer inputs are not persisted by the gateway.
6
+
7
+ ## Inspect without a wallet
8
+
9
+ ```bash
10
+ npx --package @justhandledlabs/agent-client justhandled-agent catalog
11
+ npx --package @justhandledlabs/agent-client justhandled-agent preview filename-portability-preflight --json '{"paths":["CON.txt"]}'
12
+ ```
13
+
14
+ Preview performs an unpaid request and validates the returned x402 terms. It does not sign or spend.
15
+
16
+ Machine-readable products, exact payment terms, and free deterministic fixtures are available from the gateway's [product catalog](https://justhandled-agent-gateway.netlify.app/api/product-catalog), [OpenAPI document](https://justhandled-agent-gateway.netlify.app/openapi.json), and [sandbox index](https://justhandled-agent-gateway.netlify.app/sandbox/index.json).
17
+
18
+ ## Execute one paid utility
19
+
20
+ Use a dedicated low-balance Base wallet. Never provide a primary wallet key.
21
+
22
+ ```bash
23
+ export JH_EVM_PRIVATE_KEY=0x...
24
+ npx --package @justhandledlabs/agent-client justhandled-agent call filename-portability-preflight --json '{"paths":["CON.txt"]}'
25
+ ```
26
+
27
+ PowerShell:
28
+
29
+ ```powershell
30
+ $env:JH_EVM_PRIVATE_KEY = "0x..."
31
+ npx.cmd --package @justhandledlabs/agent-client justhandled-agent call filename-portability-preflight --json '{"paths":["CON.txt"]}'
32
+ ```
33
+
34
+ ## MCP configuration
35
+
36
+ ```json
37
+ {
38
+ "mcpServers": {
39
+ "justhandled": {
40
+ "command": "npx",
41
+ "args": ["-y", "@justhandledlabs/agent-client"],
42
+ "env": {
43
+ "JH_EVM_PRIVATE_KEY": "0xDEDICATED_LOW_BALANCE_WALLET_KEY"
44
+ }
45
+ }
46
+ }
47
+ }
48
+ ```
49
+
50
+ The MCP server exposes a free catalog tool plus one paid tool per gateway utility. Missing wallet configuration produces an error instead of a payment attempt.
51
+
52
+ ## Security model
53
+
54
+ - Price, chain, asset, receiver, and gateway origin are pinned in code.
55
+ - Every execution starts with an unpaid 402 preview.
56
+ - A mismatched term aborts before signing.
57
+ - The package never prints the private key.
58
+ - The gateway does not persist raw inputs or results.
59
+ - Treat all crypto transfers as irreversible and fund only a dedicated wallet.
60
+
61
+ ## Development
62
+
63
+ ```bash
64
+ npm install
65
+ npm run check
66
+ ```
67
+
68
+ The gateway implementation is intentionally not included in this client repository.
package/package.json CHANGED
@@ -1,69 +1,69 @@
1
- {
2
- "name": "@justhandledlabs/agent-client",
3
- "version": "0.1.0",
4
- "description": "Guarded CLI and MCP client for JustHandled's x402 utility gateway",
5
- "type": "module",
6
- "license": "MIT",
7
- "mcpName": "com.justhandledlabs/agent-gateway",
8
- "repository": {
9
- "type": "git",
1
+ {
2
+ "name": "@justhandledlabs/agent-client",
3
+ "version": "0.1.1",
4
+ "description": "Guarded CLI and MCP client for JustHandled's x402 utility gateway",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "mcpName": "com.justhandledlabs/agent-gateway",
8
+ "repository": {
9
+ "type": "git",
10
10
  "url": "git+https://github.com/justhandledlabs/justhandled-agent-client.git"
11
- },
12
- "homepage": "https://justhandled-agent-gateway.netlify.app",
13
- "bugs": {
14
- "url": "https://github.com/justhandledlabs/justhandled-agent-client/issues"
15
- },
16
- "keywords": [
17
- "ai-agents",
18
- "mcp",
19
- "x402",
20
- "base",
21
- "usdc",
22
- "preflight"
23
- ],
24
- "files": [
25
- "dist",
26
- "README.md",
27
- "LICENSE",
28
- "server.json"
29
- ],
30
- "bin": {
31
- "agent-client": "dist/mcp.js",
32
- "justhandled-agent-client": "dist/mcp.js",
33
- "justhandled-agent": "dist/cli.js",
34
- "justhandled-agent-mcp": "dist/mcp.js"
35
- },
36
- "exports": {
37
- ".": {
38
- "types": "./dist/index.d.ts",
39
- "import": "./dist/index.js"
40
- }
41
- },
42
- "scripts": {
43
- "build": "node scripts/clean.mjs && tsc -p tsconfig.json",
44
- "test": "node --import tsx --test tests/*.test.ts",
45
- "smoke:mcp": "npm run build && node scripts/smoke-mcp.mjs",
46
- "check": "npm run build && npm test",
47
- "prepack": "npm run check",
48
- "prepublishOnly": "node scripts/assert-publish-ready.mjs"
49
- },
50
- "dependencies": {
51
- "@modelcontextprotocol/sdk": "latest",
52
- "@x402/core": "latest",
53
- "@x402/evm": "latest",
54
- "@x402/fetch": "^2.20.0",
55
- "viem": "^2.55.10"
56
- },
57
- "devDependencies": {
58
- "@types/node": "latest",
59
- "tsx": "latest",
60
- "typescript": "latest"
61
- },
62
- "engines": {
63
- "node": ">=22"
64
- },
65
- "publishConfig": {
66
- "access": "public",
67
- "provenance": true
68
- }
69
- }
11
+ },
12
+ "homepage": "https://justhandled-agent-gateway.netlify.app",
13
+ "bugs": {
14
+ "url": "https://github.com/justhandledlabs/justhandled-agent-client/issues"
15
+ },
16
+ "keywords": [
17
+ "ai-agents",
18
+ "mcp",
19
+ "x402",
20
+ "base",
21
+ "usdc",
22
+ "preflight"
23
+ ],
24
+ "files": [
25
+ "dist",
26
+ "README.md",
27
+ "LICENSE",
28
+ "server.json"
29
+ ],
30
+ "bin": {
31
+ "agent-client": "dist/mcp.js",
32
+ "justhandled-agent-client": "dist/mcp.js",
33
+ "justhandled-agent": "dist/cli.js",
34
+ "justhandled-agent-mcp": "dist/mcp.js"
35
+ },
36
+ "exports": {
37
+ ".": {
38
+ "types": "./dist/index.d.ts",
39
+ "import": "./dist/index.js"
40
+ }
41
+ },
42
+ "scripts": {
43
+ "build": "node scripts/clean.mjs && tsc -p tsconfig.json",
44
+ "test": "node --import tsx --test tests/*.test.ts",
45
+ "smoke:mcp": "npm run build && node scripts/smoke-mcp.mjs",
46
+ "check": "npm run build && npm test",
47
+ "prepack": "npm run check",
48
+ "prepublishOnly": "node scripts/assert-publish-ready.mjs"
49
+ },
50
+ "dependencies": {
51
+ "@modelcontextprotocol/sdk": "latest",
52
+ "@x402/core": "latest",
53
+ "@x402/evm": "latest",
54
+ "@x402/fetch": "^2.20.0",
55
+ "viem": "^2.55.10"
56
+ },
57
+ "devDependencies": {
58
+ "@types/node": "latest",
59
+ "tsx": "latest",
60
+ "typescript": "latest"
61
+ },
62
+ "engines": {
63
+ "node": ">=22"
64
+ },
65
+ "publishConfig": {
66
+ "access": "public",
67
+ "provenance": true
68
+ }
69
+ }
package/server.json CHANGED
@@ -1,30 +1,30 @@
1
- {
2
- "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
- "name": "com.justhandledlabs/agent-gateway",
4
- "title": "JustHandled Agent Utility Gateway",
5
- "description": "Ten deterministic preflights with guarded $0.05 USDC x402 execution.",
6
- "version": "0.1.0",
7
- "repository": {
8
- "url": "https://github.com/justhandledlabs/justhandled-agent-client",
9
- "source": "github"
10
- },
11
- "packages": [
12
- {
13
- "registryType": "npm",
14
- "identifier": "@justhandledlabs/agent-client",
15
- "version": "0.1.0",
16
- "transport": {
17
- "type": "stdio"
18
- },
19
- "environmentVariables": [
20
- {
21
- "name": "JH_EVM_PRIVATE_KEY",
22
- "description": "Private key for a dedicated Base wallet funded with USDC. Never use a primary wallet.",
23
- "isRequired": true,
24
- "isSecret": true,
25
- "format": "string"
26
- }
27
- ]
28
- }
29
- ]
30
- }
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "com.justhandledlabs/agent-gateway",
4
+ "title": "JustHandled Agent Utility Gateway",
5
+ "description": "Sixteen deterministic preflights with guarded $0.05 USDC x402 execution.",
6
+ "version": "0.1.1",
7
+ "repository": {
8
+ "url": "https://github.com/justhandledlabs/justhandled-agent-client",
9
+ "source": "github"
10
+ },
11
+ "packages": [
12
+ {
13
+ "registryType": "npm",
14
+ "identifier": "@justhandledlabs/agent-client",
15
+ "version": "0.1.1",
16
+ "transport": {
17
+ "type": "stdio"
18
+ },
19
+ "environmentVariables": [
20
+ {
21
+ "name": "JH_EVM_PRIVATE_KEY",
22
+ "description": "Private key for a dedicated Base wallet funded with USDC. Never use a primary wallet.",
23
+ "isRequired": true,
24
+ "isSecret": true,
25
+ "format": "string"
26
+ }
27
+ ]
28
+ }
29
+ ]
30
+ }