@justhandledlabs/agent-client 0.6.0 → 0.8.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-
|
|
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-nine deterministic preflights, maintained-data lookups, and evidence products. Twenty-two products cost $0.05 USDC; seven evidence-heavy products cost $0.25, including Agent Distribution Readiness, Community Rule & Credibility Preflight, Qualified Demand Ledger, and Channel-Fit Evidence Matrix. 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,8 @@ 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
|
|
16
|
+
npx --package @justhandledlabs/agent-client justhandled-agent preview channel-fit-evidence-matrix --file channel-fit-evidence-matrix.sample.json
|
|
15
17
|
```
|
|
16
18
|
|
|
17
19
|
Preview performs an unpaid request and validates the returned x402 terms. It does not sign or spend.
|
|
@@ -59,7 +61,7 @@ The package declares the official MCP Registry identity `io.github.justhandledla
|
|
|
59
61
|
## Security model
|
|
60
62
|
|
|
61
63
|
- Price, chain, asset, receiver, and gateway origin are pinned in code.
|
|
62
|
-
- The
|
|
64
|
+
- The seven $0.25 products' 250,000-base-unit price is pinned separately from 50,000-base-unit checks.
|
|
63
65
|
- Every execution starts with an unpaid 402 preview.
|
|
64
66
|
- A mismatched term aborts before signing.
|
|
65
67
|
- The package never prints the private key.
|
package/dist/config.js
CHANGED
|
@@ -13,6 +13,8 @@ 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",
|
|
17
|
+
"channel-fit-evidence-matrix",
|
|
16
18
|
]);
|
|
17
19
|
export function expectedPriceForUtility(utility) {
|
|
18
20
|
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
|
+
const server = new Server({ name: "justhandled-agent-gateway", version: "0.8.0" }, { capabilities: { tools: {} } });
|
|
7
7
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
8
8
|
const catalog = await getCatalog();
|
|
9
9
|
return {
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"observed_at": "2026-08-01T22:30:00Z",
|
|
3
|
+
"objective": "qualified-demand",
|
|
4
|
+
"constraints": {
|
|
5
|
+
"budget_usd": 50,
|
|
6
|
+
"effort_hours": 12,
|
|
7
|
+
"max_parallel_tests": 2,
|
|
8
|
+
"rules_max_age_days": 30
|
|
9
|
+
},
|
|
10
|
+
"evidence": [
|
|
11
|
+
{
|
|
12
|
+
"id": "rule-agent-directory",
|
|
13
|
+
"type": "platform-rule",
|
|
14
|
+
"captured_at": "2026-08-01T20:00:00Z",
|
|
15
|
+
"source_url": "https://example.com/directory-rules",
|
|
16
|
+
"observed": true
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "rule-marketplace",
|
|
20
|
+
"type": "platform-rule",
|
|
21
|
+
"captured_at": "2026-08-01T20:10:00Z",
|
|
22
|
+
"source_url": "https://example.com/marketplace-rules",
|
|
23
|
+
"observed": true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "proof-live",
|
|
27
|
+
"type": "product-proof",
|
|
28
|
+
"captured_at": "2026-08-01T21:00:00Z",
|
|
29
|
+
"source_url": "https://example.com/product",
|
|
30
|
+
"observed": true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "proof-readiness",
|
|
34
|
+
"type": "distribution-readiness",
|
|
35
|
+
"captured_at": "2026-08-01T21:10:00Z",
|
|
36
|
+
"source_url": "https://example.com/readiness-receipt",
|
|
37
|
+
"observed": true
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"channels": [
|
|
41
|
+
{
|
|
42
|
+
"id": "agent-directory",
|
|
43
|
+
"kind": "agent-directory",
|
|
44
|
+
"audience_match": 5,
|
|
45
|
+
"buyer_intent": 4,
|
|
46
|
+
"format_match": 5,
|
|
47
|
+
"saturation": 3,
|
|
48
|
+
"rule_status": "verified",
|
|
49
|
+
"rule_evidence_id": "rule-agent-directory",
|
|
50
|
+
"product_evidence_ids": ["proof-live", "proof-readiness"],
|
|
51
|
+
"attribution": "verified",
|
|
52
|
+
"attribution_mechanism": "Unique source token preserved through the unpaid challenge and settlement receipt.",
|
|
53
|
+
"existing_access": "account",
|
|
54
|
+
"offer_path_ready": true,
|
|
55
|
+
"estimated_cost_usd": 0,
|
|
56
|
+
"estimated_effort_hours": 2,
|
|
57
|
+
"owner_presence_required": false,
|
|
58
|
+
"owner_available": true,
|
|
59
|
+
"outcome_gate": {
|
|
60
|
+
"metric": "payment-initiation",
|
|
61
|
+
"threshold": 2,
|
|
62
|
+
"window_days": 14,
|
|
63
|
+
"max_cost_usd": 0,
|
|
64
|
+
"max_effort_hours": 4
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "marketplace",
|
|
69
|
+
"kind": "marketplace",
|
|
70
|
+
"audience_match": 4,
|
|
71
|
+
"buyer_intent": 5,
|
|
72
|
+
"format_match": 4,
|
|
73
|
+
"saturation": 4,
|
|
74
|
+
"rule_status": "verified",
|
|
75
|
+
"rule_evidence_id": "rule-marketplace",
|
|
76
|
+
"product_evidence_ids": ["proof-live"],
|
|
77
|
+
"attribution": "direct",
|
|
78
|
+
"attribution_mechanism": "Marketplace listing identifier linked to checkout-opening evidence.",
|
|
79
|
+
"existing_access": "account",
|
|
80
|
+
"offer_path_ready": true,
|
|
81
|
+
"estimated_cost_usd": 0,
|
|
82
|
+
"estimated_effort_hours": 3,
|
|
83
|
+
"owner_presence_required": false,
|
|
84
|
+
"owner_available": true,
|
|
85
|
+
"outcome_gate": {
|
|
86
|
+
"metric": "checkout-open",
|
|
87
|
+
"threshold": 2,
|
|
88
|
+
"window_days": 14,
|
|
89
|
+
"max_cost_usd": 0,
|
|
90
|
+
"max_effort_hours": 5
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
@@ -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
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-
|
|
6
|
-
"version": "0.
|
|
5
|
+
"description": "Twenty-nine guarded pay-per-call preflights and evidence products over USDC x402.",
|
|
6
|
+
"version": "0.8.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.8.0",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|