@justhandledlabs/agent-client 0.2.0 → 0.2.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/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 seventeen deterministic preflights and evidence packs. Sixteen 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.
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
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.2.0" }, { capabilities: { tools: {} } });
6
+ const server = new Server({ name: "justhandled-agent-gateway", version: "0.2.1" }, { 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@justhandledlabs/agent-client",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Guarded CLI and MCP client for JustHandled's x402 utility gateway",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/server.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "com.justhandledlabs/agent-gateway",
4
4
  "title": "JustHandled Agent Utility Gateway",
5
- "description": "Seventeen deterministic preflights and evidence packs with guarded per-product USDC x402 execution.",
6
- "version": "0.2.0",
5
+ "description": "Twenty deterministic preflights and evidence products with guarded per-product USDC x402 execution.",
6
+ "version": "0.2.1",
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.2.0",
15
+ "version": "0.2.1",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },