@justhandledlabs/agent-client 0.2.0 → 0.3.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/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# JustHandled Agent Client
|
|
2
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
|
|
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 twenty deterministic preflights and evidence products. Nineteen individual checks cost $0.05 USDC; the consolidated six-check Agent Run Evidence Pack costs $0.25. Every paid call returns a versioned evidence receipt.
|
|
4
4
|
|
|
5
5
|
The client fails closed before signing. It accepts only the pinned JustHandled gateway, Base mainnet, canonical Base USDC, the exact per-product price, and the published merchant receiver. Customer inputs are not persisted by the gateway.
|
|
6
6
|
|
|
@@ -14,6 +14,8 @@ npx --package @justhandledlabs/agent-client justhandled-agent preview agent-run-
|
|
|
14
14
|
|
|
15
15
|
Preview performs an unpaid request and validates the returned x402 terms. It does not sign or spend.
|
|
16
16
|
|
|
17
|
+
The catalog includes API-response contract drift, webhook contract and replay, and policy-change evidence products. Packaged example inputs are available in `examples/`.
|
|
18
|
+
|
|
17
19
|
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).
|
|
18
20
|
|
|
19
21
|
## Execute one paid utility
|
|
@@ -50,6 +52,8 @@ npx.cmd --package @justhandledlabs/agent-client justhandled-agent call filename-
|
|
|
50
52
|
|
|
51
53
|
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.
|
|
52
54
|
|
|
55
|
+
The package declares the official MCP Registry identity `io.github.justhandledlabs/agent-gateway`. Registry identity is discovery metadata only: installing or listing the server does not spend funds, and paid execution still requires a dedicated wallet plus the client's exact-term checks.
|
|
56
|
+
|
|
53
57
|
## Security model
|
|
54
58
|
|
|
55
59
|
- Price, chain, asset, receiver, and gateway origin are pinned in code.
|
package/dist/mcp.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
5
5
|
import { getCatalog, runPaidUtility } from "./client.js";
|
|
6
|
-
const server = new Server({ name: "justhandled-agent-gateway", version: "0.
|
|
6
|
+
const server = new Server({ name: "justhandled-agent-gateway", version: "0.3.0" }, { capabilities: { tools: {} } });
|
|
7
7
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
8
8
|
const catalog = await getCatalog();
|
|
9
9
|
return {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contracts": [{
|
|
3
|
+
"id": "get-account",
|
|
4
|
+
"expected_status": 200,
|
|
5
|
+
"expected_content_type": "application/json",
|
|
6
|
+
"required_fields": ["data.id", "data.status"],
|
|
7
|
+
"forbidden_fields": ["data.secret"],
|
|
8
|
+
"field_types": { "data.id": "string", "data.status": "string" },
|
|
9
|
+
"stable_values": { "data.status": "active" }
|
|
10
|
+
}],
|
|
11
|
+
"responses": [{
|
|
12
|
+
"id": "run-1",
|
|
13
|
+
"contract_id": "get-account",
|
|
14
|
+
"status": 200,
|
|
15
|
+
"content_type": "application/json",
|
|
16
|
+
"body": { "data": { "id": "acct-1", "status": "active" } }
|
|
17
|
+
}]
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"policies": [{
|
|
3
|
+
"id": "refund-policy",
|
|
4
|
+
"baseline": {
|
|
5
|
+
"version": "1.0",
|
|
6
|
+
"effective_date": "2026-01-01",
|
|
7
|
+
"clauses": [{ "id": "window", "text": "Refunds are available within 30 days.", "applies_to": ["all customers"], "requirements": ["receipt"] }]
|
|
8
|
+
},
|
|
9
|
+
"current": {
|
|
10
|
+
"version": "1.0",
|
|
11
|
+
"effective_date": "2026-01-01",
|
|
12
|
+
"clauses": [{ "id": "window", "text": "Refunds are available within 30 days.", "applies_to": ["all customers"], "requirements": ["receipt"] }]
|
|
13
|
+
}
|
|
14
|
+
}]
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"observed_at": "2026-08-01T15:00:00.000Z",
|
|
3
|
+
"contracts": [{
|
|
4
|
+
"event": "invoice.paid",
|
|
5
|
+
"allowed_versions": ["2026-01"],
|
|
6
|
+
"required_fields": ["invoice.id", "invoice.amount"],
|
|
7
|
+
"signature_required": true,
|
|
8
|
+
"idempotency_required": true,
|
|
9
|
+
"max_age_seconds": 300
|
|
10
|
+
}],
|
|
11
|
+
"deliveries": [{
|
|
12
|
+
"id": "delivery-1",
|
|
13
|
+
"event": "invoice.paid",
|
|
14
|
+
"version": "2026-01",
|
|
15
|
+
"payload": { "invoice": { "id": "inv-1", "amount": 2500 } },
|
|
16
|
+
"signature_present": true,
|
|
17
|
+
"idempotency_key": "evt-1",
|
|
18
|
+
"event_created_at": "2026-08-01T14:58:00.000Z"
|
|
19
|
+
}]
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justhandledlabs/agent-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Guarded CLI and MCP client for JustHandled's x402 utility gateway",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"mcpName": "
|
|
7
|
+
"mcpName": "io.github.justhandledlabs/agent-gateway",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+https://github.com/justhandledlabs/justhandled-agent-client.git"
|
|
@@ -16,10 +16,14 @@
|
|
|
16
16
|
"keywords": [
|
|
17
17
|
"ai-agents",
|
|
18
18
|
"mcp",
|
|
19
|
+
"mcp-server",
|
|
19
20
|
"x402",
|
|
20
21
|
"base",
|
|
21
22
|
"usdc",
|
|
22
|
-
"preflight"
|
|
23
|
+
"preflight",
|
|
24
|
+
"agent-evaluation",
|
|
25
|
+
"agent-observability",
|
|
26
|
+
"evidence"
|
|
23
27
|
],
|
|
24
28
|
"files": [
|
|
25
29
|
"dist",
|
package/server.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
-
"name": "
|
|
3
|
+
"name": "io.github.justhandledlabs/agent-gateway",
|
|
4
4
|
"title": "JustHandled Agent Utility Gateway",
|
|
5
|
-
"description": "
|
|
6
|
-
"version": "0.
|
|
5
|
+
"description": "Twenty deterministic preflights and evidence products with guarded per-product USDC x402 execution.",
|
|
6
|
+
"version": "0.3.0",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "https://github.com/justhandledlabs/justhandled-agent-client",
|
|
9
9
|
"source": "github"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "@justhandledlabs/agent-client",
|
|
15
|
-
"version": "0.
|
|
15
|
+
"version": "0.3.0",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|