@bernierllc/anthropic-client 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +39 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -242,12 +242,46 @@ if (!result.success) {
242
242
  }
243
243
  ```
244
244
 
245
- ## Integration
245
+ ## Integration Status
246
246
 
247
- - **Logger**: Integrated with @bernierllc/logger for structured logging
248
- - **Retry Policy**: Uses @bernierllc/retry-policy for exponential backoff
249
- - **Docs-Suite**: Ready - Full TypeDoc documentation available
250
- - **NeverHub**: Optional - Can emit AI usage events when integrated
247
+ - **Logger**: Integrated - Uses @bernierllc/logger for structured logging of API calls, errors, and usage tracking
248
+ - **Docs-Suite**: Ready - Full TypeDoc documentation with API reference and usage examples
249
+ - **NeverHub**: 🔄 Optional - Supports graceful degradation. When NeverHub is available via @bernierllc/neverhub-adapter, the client can:
250
+ - Emit `ai.request.started` and `ai.request.completed` events
251
+ - Publish token usage and cost metrics
252
+ - Subscribe to configuration updates
253
+ - Register as an AI capability provider for service discovery
254
+ - All core functionality works without NeverHub present
255
+
256
+ ### NeverHub Integration Example
257
+
258
+ ```typescript
259
+ import { AnthropicClient } from '@bernierllc/anthropic-client';
260
+ import { NeverHubAdapter } from '@bernierllc/neverhub-adapter';
261
+
262
+ const client = new AnthropicClient({
263
+ apiKey: process.env.ANTHROPIC_API_KEY!
264
+ });
265
+
266
+ // Auto-detect and integrate with NeverHub if available
267
+ if (await NeverHubAdapter.detect()) {
268
+ const neverhub = new NeverHubAdapter();
269
+ await neverhub.register({
270
+ type: 'ai-provider',
271
+ name: '@bernierllc/anthropic-client',
272
+ version: '1.0.0',
273
+ capabilities: [
274
+ { type: 'ai', name: 'text-completion', version: '1.0.0' },
275
+ { type: 'ai', name: 'streaming', version: '1.0.0' }
276
+ ]
277
+ });
278
+
279
+ // Client emits events automatically when integrated
280
+ }
281
+
282
+ // Works identically with or without NeverHub
283
+ const result = await client.complete('Your prompt here');
284
+ ```
251
285
 
252
286
  ## Development
253
287
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bernierllc/anthropic-client",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Type-safe Anthropic Claude API client with automatic rate limiting, retry logic, streaming support, and cost tracking",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",