@kya-brasil/agent-tools 0.4.0 → 0.4.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,7 +1,7 @@
1
1
  # @kya-brasil/agent-tools
2
2
 
3
3
  **Know-your-agent for Brazil, as code.** Verify that an AI agent really acts for a Brazilian company
4
- (credential signed by the company's e-CNPJ, company cleared by [KYB Brasil](https://kyb-br-agents.marcelfons.workers.dev)),
4
+ (credential signed by the company's e-CNPJ, checked against its AC's revocation list, company active at the Receita Federal),
5
5
  check an action against the agent's mandate, or give your own agent a credential.
6
6
 
7
7
  Paid per call with [x402](https://x402.org) (USDC on Base, no signup). Free verification works without a wallet
@@ -11,6 +11,9 @@ Paid per call with [x402](https://x402.org) (USDC on Base, no signup). Free veri
11
11
  npm i @kya-brasil/agent-tools
12
12
  ```
13
13
 
14
+ The same build is mirrored to GitHub Packages as `@celfons/kya-agent-tools` (listed on the repository page;
15
+ installing from there needs a GitHub token). npmjs.com is the channel to install from.
16
+
14
17
  Node 18+ (global `fetch`, WebCrypto). ESM.
15
18
 
16
19
  ## Verifier: you receive an action from someone else's agent
package/dist/index.d.ts CHANGED
@@ -56,7 +56,8 @@ export interface Credential {
56
56
  signed_at: string;
57
57
  };
58
58
  mandate: Mandate;
59
- kyb_snapshot: Record<string, unknown>;
59
+ /** Informative; null when the issuer has no KYB source. */
60
+ kyb_snapshot: Record<string, unknown> | null;
60
61
  status: CredentialStatus;
61
62
  issued_at: string;
62
63
  expires_at: string;
@@ -196,7 +197,7 @@ export interface KyaClient {
196
197
  cnpj: string;
197
198
  mandate: Mandate;
198
199
  }): Promise<Registration>;
199
- /** Free: send both signatures; the credential is issued if the e-CNPJ, the CNPJ and KYB Brasil all clear. */
200
+ /** Free: send both signatures; the credential is issued if the e-CNPJ is valid and not revoked, the CNPJ matches and the company is ATIVA. */
200
201
  prove(credentialId: string, proof: Proof): Promise<{
201
202
  credential: Credential;
202
203
  kyb_warnings: string[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kya-brasil/agent-tools",
3
- "version": "0.4.0",
4
- "description": "KYA Brasil for AI agents: verify that an agent acts for a Brazilian company (e-CNPJ-signed, KYB-checked credential), check an action against its mandate, or give your own agent a credential. Sign in with KYA middleware (Hono, Express, Workers) and request signing. x402 payments (USDC on Base) handled for you. Adapters for Vercel AI SDK, LangChain, OpenAI and Anthropic.",
3
+ "version": "0.4.1",
4
+ "description": "KYA Brasil for AI agents: verify that an agent acts for a Brazilian company (e-CNPJ-signed credential, revocation and company registration checked daily), check an action against its mandate, or give your own agent a credential. Sign in with KYA middleware (Hono, Express, Workers) and request signing. x402 payments (USDC on Base) handled for you. Adapters for Vercel AI SDK, LangChain, OpenAI and Anthropic.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",