@chitmark/sdk 0.7.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,8 +1,10 @@
1
1
  # @chitmark/sdk
2
2
 
3
- Official TypeScript / JavaScript SDK for Chitmark: trust decisions on agent-mediated actions, tuned by business outcomes.
3
+ Official TypeScript and JavaScript SDK for Chitmark.
4
4
 
5
- AI agents and multi-account farms drain free tiers, trial credits, and API allowances while looking exactly like your best customers. Chitmark scores each action in under 50 ms and returns `allow`, `challenge`, or `deny`. Then your outcomes (conversion, credit burn, chargeback) come back through `feedback` and tune the next decision.
5
+ - [Trust Decisions](https://chitmark.com/docs/quickstart/trust-decisions) lets you screen costly actions such as signups, credit grants, and API requests with `verify`, `feedback`, and `challenge`.
6
+ - [Agent Attribution](https://chitmark.com/docs/guides/agent-attribution) lets you recognize returning site sessions and evaluate signed proof from linked agents.
7
+ - [Agent Paid Access](https://chitmark.com/docs/guides/agent-paid-access) lets you buy or sell controlled access to API resources with hosted checkout and seller-controlled delivery.
6
8
 
7
9
  [![npm version](https://img.shields.io/npm/v/@chitmark/sdk.svg)](https://www.npmjs.com/package/@chitmark/sdk)
8
10
 
@@ -18,7 +20,7 @@ pnpm add @chitmark/sdk
18
20
 
19
21
  Requires Node >= 24. Runs on Node, browsers, Cloudflare Workers, and other edge runtimes (see the `/edge` entrypoint below).
20
22
 
21
- ## Quick start
23
+ ## Trust Decisions quick start
22
24
 
23
25
  ```typescript
24
26
  import { Chitmark } from "@chitmark/sdk";
@@ -172,6 +174,21 @@ const chitmark = new Chitmark({ apiKey: env.CHITMARK_API_KEY });
172
174
  const verdict = await chitmark.verifyRequest(req, { action: "signup" });
173
175
  ```
174
176
 
177
+ ## Agent Attribution
178
+
179
+ Use an Attribution read key to recognize site sessions or resolve an authorized principal association. Unknown is a successful outcome, and email is nullable.
180
+
181
+ ```ts
182
+ const result = await chitmark.attribution.resolve({ request });
183
+ console.log(result.identity.recognized, result.principal.email);
184
+ ```
185
+
186
+ See the [Agent Attribution guide](https://chitmark.com/docs/guides/agent-attribution/) for request adapters, link grants, and disclosure rules.
187
+
188
+ ## Agent Paid Access
189
+
190
+ Call `chitmark.charge(request)` to request a quote, continue through hosted checkout, or check purchase status. Sellers use separate credentials to reserve execution and record delivery. See the [Agent Paid Access guide](https://chitmark.com/docs/guides/agent-paid-access) for scopes and a complete buyer and seller example.
191
+
175
192
  ## Agent integration
176
193
 
177
194
  Using Cursor, Claude Code, Codex, or another coding agent? Point it at