@justhandledlabs/agent-client 0.6.0 → 0.7.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://justhandledlabs.com/agent-gateway/). The package exposes twenty-seven deterministic preflights, maintained-data lookups, and evidence products. Twenty-two products cost $0.05 USDC; five evidence-heavy products cost $0.25, including Agent Distribution Readiness and Community Rule & Credibility Preflight. 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://justhandledlabs.com/agent-gateway/). The package exposes twenty-eight deterministic preflights, maintained-data lookups, and evidence products. Twenty-two products cost $0.05 USDC; six evidence-heavy products cost $0.25, including Agent Distribution Readiness, Community Rule & Credibility Preflight, and Qualified Demand Ledger. 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
 
@@ -12,6 +12,7 @@ npx --package @justhandledlabs/agent-client justhandled-agent preview filename-p
12
12
  npx --package @justhandledlabs/agent-client justhandled-agent preview agent-run-evidence-pack --file agent-run-evidence-pack.sample.json
13
13
  npx --package @justhandledlabs/agent-client justhandled-agent preview agent-distribution-readiness-pack --file agent-distribution-readiness-pack.sample.json
14
14
  npx --package @justhandledlabs/agent-client justhandled-agent preview community-rule-credibility-preflight --file community-rule-credibility-preflight.sample.json
15
+ npx --package @justhandledlabs/agent-client justhandled-agent preview qualified-demand-ledger --file qualified-demand-ledger.sample.json
15
16
  ```
16
17
 
17
18
  Preview performs an unpaid request and validates the returned x402 terms. It does not sign or spend.
@@ -59,7 +60,7 @@ The package declares the official MCP Registry identity `io.github.justhandledla
59
60
  ## Security model
60
61
 
61
62
  - Price, chain, asset, receiver, and gateway origin are pinned in code.
62
- - The five $0.25 products' 250,000-base-unit price is pinned separately from 50,000-base-unit checks.
63
+ - The six $0.25 products' 250,000-base-unit price is pinned separately from 50,000-base-unit checks.
63
64
  - Every execution starts with an unpaid 402 preview.
64
65
  - A mismatched term aborts before signing.
65
66
  - The package never prints the private key.
package/dist/config.js CHANGED
@@ -13,6 +13,7 @@ export const QUARTER_DOLLAR_UTILITIES = new Set([
13
13
  "site-discovery-change-packet",
14
14
  "agent-distribution-readiness-pack",
15
15
  "community-rule-credibility-preflight",
16
+ "qualified-demand-ledger",
16
17
  ]);
17
18
  export function expectedPriceForUtility(utility) {
18
19
  return QUARTER_DOLLAR_UTILITIES.has(utility) ? AGENT_RUN_EVIDENCE_PACK_PRICE_USDC : PRICE_USDC;
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.0" }, { capabilities: { tools: {} } });
6
+ const server = new Server({ name: "justhandled-agent-gateway", version: "0.7.0" }, { capabilities: { tools: {} } });
7
7
  server.setRequestHandler(ListToolsRequestSchema, async () => {
8
8
  const catalog = await getCatalog();
9
9
  return {
@@ -0,0 +1,71 @@
1
+ {
2
+ "observed_at": "2026-08-04T18:00:00Z",
3
+ "window": {
4
+ "started_at": "2026-08-01T00:00:00Z",
5
+ "ended_at": "2026-08-04T17:59:59Z"
6
+ },
7
+ "events": [
8
+ {
9
+ "id": "view-1",
10
+ "type": "impression",
11
+ "occurred_at": "2026-08-01T12:00:00Z",
12
+ "source": "directory",
13
+ "evidence_ref": "analytics:impression:1",
14
+ "owner_controlled": false,
15
+ "external_actor": false,
16
+ "attribution": "none"
17
+ },
18
+ {
19
+ "id": "question-1",
20
+ "type": "buyer-question",
21
+ "occurred_at": "2026-08-01T13:00:00Z",
22
+ "source": "support",
23
+ "evidence_ref": "ticket:question:1",
24
+ "owner_controlled": false,
25
+ "external_actor": true,
26
+ "attribution": "direct",
27
+ "actor_token": "actor:7f91c2a8",
28
+ "product_id": "example-product"
29
+ },
30
+ {
31
+ "id": "settlement-1",
32
+ "type": "external-settlement",
33
+ "occurred_at": "2026-08-01T14:00:00Z",
34
+ "source": "payment-processor",
35
+ "evidence_ref": "receipt:settlement:1",
36
+ "owner_controlled": false,
37
+ "external_actor": true,
38
+ "attribution": "verified",
39
+ "actor_token": "actor:7f91c2a8",
40
+ "product_id": "example-product",
41
+ "amount": 19,
42
+ "currency": "USD",
43
+ "transaction_id": "txn_example_1"
44
+ },
45
+ {
46
+ "id": "value-1",
47
+ "type": "measured-review-time-reduction",
48
+ "occurred_at": "2026-08-02T16:00:00Z",
49
+ "source": "timed-review",
50
+ "evidence_ref": "measurement:review:1",
51
+ "owner_controlled": false,
52
+ "external_actor": true,
53
+ "attribution": "verified",
54
+ "measured_value": 12,
55
+ "measurement_unit": "minutes"
56
+ },
57
+ {
58
+ "id": "return-1",
59
+ "type": "recurring-use",
60
+ "occurred_at": "2026-08-03T16:00:00Z",
61
+ "source": "usage-receipt",
62
+ "evidence_ref": "receipt:usage:2",
63
+ "owner_controlled": false,
64
+ "external_actor": true,
65
+ "attribution": "verified",
66
+ "actor_token": "actor:7f91c2a8",
67
+ "product_id": "example-product",
68
+ "parent_event_id": "settlement-1"
69
+ }
70
+ ]
71
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justhandledlabs/agent-client",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
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": "io.github.justhandledlabs/agent-gateway",
4
4
  "title": "JustHandled Agent Utility Gateway",
5
- "description": "Twenty-seven guarded pay-per-call preflights and evidence products over USDC x402.",
6
- "version": "0.6.0",
5
+ "description": "Twenty-eight guarded pay-per-call preflights and evidence products over USDC x402.",
6
+ "version": "0.7.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.6.0",
15
+ "version": "0.7.0",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },