From 332e66576121defd3f366c19dc3a38ab13607cc0 Mon Sep 17 00:00:00 2001 From: vvillait88 Date: Thu, 30 Apr 2026 03:44:15 -0700 Subject: [PATCH 1/2] docs/tests: scrub merchant-specific reference + internal test default - src/types.ts: generalize the merchant-emitted convenience-codes comment (drop the specific named merchant + their wine business-domain detail) - tests/integration.test.ts: integration tests now require both AGENTSCORE_API_KEY and AGENTSCORE_BASE_URL to be set; no default to a private (`*.internal`) endpoint. Tests skip cleanly when either is missing instead of attempting a leaked default. --- src/types.ts | 6 +++--- tests/integration.test.ts | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/types.ts b/src/types.ts index 2ae0db3..1b73f17 100644 --- a/src/types.ts +++ b/src/types.ts @@ -231,9 +231,9 @@ export type DenialCode = | 'wallet_not_trusted' | 'api_error' | 'payment_required' - // Merchant-emitted convenience codes (e.g. martin-estate's onDenied wraps gate denials - // into wine-specific business codes). These are not emitted by the AgentScore API - // itself but appear in 4xx bodies the SDK may surface back to callers. + // Merchant-emitted convenience codes — not emitted by the AgentScore API itself, + // but they may appear in 4xx bodies that pass through the SDK from merchants whose + // gate `onDenied` hook wraps AgentScore denials into business-domain codes. | 'operator_verification_required' | 'compliance_denied' | 'compliance_error' diff --git a/tests/integration.test.ts b/tests/integration.test.ts index 26ce402..47381d4 100644 --- a/tests/integration.test.ts +++ b/tests/integration.test.ts @@ -2,10 +2,11 @@ import { beforeAll, describe, expect, it } from 'vitest'; import { AgentScore } from '../src/index'; const API_KEY = process.env.AGENTSCORE_API_KEY; -const BASE_URL = process.env.AGENTSCORE_BASE_URL || 'http://api.dev.agentscore.internal'; +const BASE_URL = process.env.AGENTSCORE_BASE_URL; const TEST_ADDRESS = '0x339559a2d1cd15059365fc7bd36b3047bba480e0'; -const describeIf = API_KEY ? describe : describe.skip; +// Both must be set for integration tests to run — no default to a private endpoint. +const describeIf = (API_KEY && BASE_URL) ? describe : describe.skip; describeIf('integration: real API', { timeout: 15_000 }, () => { let client: AgentScore; From 23000432dc42a40d6dc9d6d9a577c4b9af2c485a Mon Sep 17 00:00:00 2001 From: vvillait88 Date: Thu, 30 Apr 2026 21:08:14 -0700 Subject: [PATCH 2/2] chore: bump to v2.1.1 Co-Authored-By: Claude Opus 4.7 (1M context) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2f3c95a..5e7d556 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@agent-score/sdk", - "version": "2.1.0", + "version": "2.1.1", "description": "TypeScript client for the AgentScore APIs", "main": "./dist/index.cjs", "module": "./dist/index.js",