@boostecom/provider 0.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.
- package/README.md +90 -0
- package/dist/index.cjs +2522 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +848 -0
- package/dist/index.d.ts +848 -0
- package/dist/index.js +2484 -0
- package/dist/index.js.map +1 -0
- package/docs/content/README.md +337 -0
- package/docs/content/agent-teams.mdx +324 -0
- package/docs/content/api.mdx +757 -0
- package/docs/content/best-practices.mdx +624 -0
- package/docs/content/examples.mdx +675 -0
- package/docs/content/guide.mdx +516 -0
- package/docs/content/index.mdx +99 -0
- package/docs/content/installation.mdx +246 -0
- package/docs/content/skills.mdx +548 -0
- package/docs/content/troubleshooting.mdx +588 -0
- package/docs/examples/README.md +499 -0
- package/docs/examples/abort-signal.ts +125 -0
- package/docs/examples/agent-teams.ts +122 -0
- package/docs/examples/basic-usage.ts +73 -0
- package/docs/examples/check-cli.ts +51 -0
- package/docs/examples/conversation-history.ts +69 -0
- package/docs/examples/custom-config.ts +90 -0
- package/docs/examples/generate-object-constraints.ts +209 -0
- package/docs/examples/generate-object.ts +211 -0
- package/docs/examples/hooks-callbacks.ts +63 -0
- package/docs/examples/images.ts +76 -0
- package/docs/examples/integration-test.ts +241 -0
- package/docs/examples/limitations.ts +150 -0
- package/docs/examples/logging-custom-logger.ts +99 -0
- package/docs/examples/logging-default.ts +55 -0
- package/docs/examples/logging-disabled.ts +74 -0
- package/docs/examples/logging-verbose.ts +64 -0
- package/docs/examples/long-running-tasks.ts +179 -0
- package/docs/examples/message-injection.ts +210 -0
- package/docs/examples/mid-stream-injection.ts +126 -0
- package/docs/examples/run-all-examples.sh +48 -0
- package/docs/examples/sdk-tools-callbacks.ts +49 -0
- package/docs/examples/skills-discovery.ts +144 -0
- package/docs/examples/skills-management.ts +140 -0
- package/docs/examples/stream-object.ts +80 -0
- package/docs/examples/streaming.ts +52 -0
- package/docs/examples/structured-output-repro.ts +227 -0
- package/docs/examples/tool-management.ts +215 -0
- package/docs/examples/tool-streaming.ts +132 -0
- package/docs/examples/zod4-compatibility-test.ts +290 -0
- package/docs/src/claude-code-language-model.test.ts +3883 -0
- package/docs/src/claude-code-language-model.ts +2586 -0
- package/docs/src/claude-code-provider.test.ts +97 -0
- package/docs/src/claude-code-provider.ts +179 -0
- package/docs/src/convert-to-claude-code-messages.images.test.ts +104 -0
- package/docs/src/convert-to-claude-code-messages.test.ts +193 -0
- package/docs/src/convert-to-claude-code-messages.ts +419 -0
- package/docs/src/errors.test.ts +213 -0
- package/docs/src/errors.ts +216 -0
- package/docs/src/index.test.ts +49 -0
- package/docs/src/index.ts +98 -0
- package/docs/src/logger.integration.test.ts +164 -0
- package/docs/src/logger.test.ts +184 -0
- package/docs/src/logger.ts +65 -0
- package/docs/src/map-claude-code-finish-reason.test.ts +120 -0
- package/docs/src/map-claude-code-finish-reason.ts +60 -0
- package/docs/src/mcp-helpers.test.ts +71 -0
- package/docs/src/mcp-helpers.ts +123 -0
- package/docs/src/message-injection.test.ts +460 -0
- package/docs/src/types.ts +447 -0
- package/docs/src/validation.test.ts +558 -0
- package/docs/src/validation.ts +360 -0
- package/package.json +124 -0
package/README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://img.shields.io/badge/status-stable-00A79E" alt="stable status">
|
|
3
|
+
<a href="https://www.npmjs.com/package/@boostecom/provider"><img src="https://img.shields.io/npm/v/@boostecom/provider?color=00A79E" alt="npm version" /></a>
|
|
4
|
+
<a href="https://www.npmjs.com/package/@boostecom/provider"><img src="https://img.shields.io/npm/unpacked-size/@boostecom/provider?color=00A79E" alt="install size" /></a>
|
|
5
|
+
<a href="https://www.npmjs.com/package/@boostecom/provider"><img src="https://img.shields.io/npm/dy/@boostecom/provider.svg?color=00A79E" alt="npm downloads" /></a>
|
|
6
|
+
<a href="https://nodejs.org/en/about/releases/"><img src="https://img.shields.io/badge/node-%3E%3D18-00A79E" alt="Node.js ≥ 18" /></a>
|
|
7
|
+
<a href="https://www.npmjs.com/package/@boostecom/provider"><img src="https://img.shields.io/npm/l/@boostecom/provider?color=00A79E" alt="License: MIT" /></a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
# @BoostEcom/Provider
|
|
11
|
+
|
|
12
|
+
> Vercel AI SDK Provider pour Claude Code — propulse par `@anthropic-ai/claude-agent-sdk`
|
|
13
|
+
|
|
14
|
+
**@boostecom/provider** permet d'utiliser Claude via le [Vercel AI SDK](https://sdk.vercel.ai/docs) a travers le `@anthropic-ai/claude-agent-sdk` et le CLI Claude Code. Fonctionne avec votre abonnement Claude Pro ou Max — aucune cle API necessaire.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# 1. Installer et authentifier le CLI
|
|
20
|
+
npm install -g @anthropic-ai/claude-code
|
|
21
|
+
claude login
|
|
22
|
+
|
|
23
|
+
# 2. Ajouter le provider
|
|
24
|
+
npm install @boostecom/provider ai zod
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Demarrage rapide
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
import { streamText } from 'ai';
|
|
31
|
+
import { claudeCode } from '@boostecom/provider';
|
|
32
|
+
|
|
33
|
+
const result = streamText({
|
|
34
|
+
model: claudeCode('haiku'),
|
|
35
|
+
prompt: 'Bonjour, Claude !',
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const text = await result.text;
|
|
39
|
+
console.log(text);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Modeles
|
|
43
|
+
|
|
44
|
+
- **`opus`** — Claude Opus (le plus performant)
|
|
45
|
+
- **`sonnet`** — Claude Sonnet (equilibre)
|
|
46
|
+
- **`haiku`** — Claude Haiku (le plus rapide)
|
|
47
|
+
|
|
48
|
+
Les identifiants complets sont aussi acceptes (ex: `claude-opus-4-5`, `claude-sonnet-4-5-20250514`).
|
|
49
|
+
|
|
50
|
+
## Documentation
|
|
51
|
+
|
|
52
|
+
La documentation complete est disponible dans le dossier `docs/` :
|
|
53
|
+
|
|
54
|
+
- **[Documentation MDX](docs/content/)** — Pages de documentation (installation, guide, API, exemples, skills, depannage, bonnes pratiques, agent teams)
|
|
55
|
+
- **[Exemples](docs/examples/)** — Scripts d'exemples et patterns
|
|
56
|
+
- **[Source](docs/src/)** — Code source du provider et tests
|
|
57
|
+
|
|
58
|
+
### Interface web
|
|
59
|
+
|
|
60
|
+
Ce projet inclut une interface web Next.js pour consulter la documentation :
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pnpm install
|
|
64
|
+
pnpm dev
|
|
65
|
+
# Ouvrir http://localhost:3000
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Avertissement
|
|
69
|
+
|
|
70
|
+
**Ce provider communautaire non-officiel** n'est pas affilie a Anthropic ou Vercel. En utilisant ce provider :
|
|
71
|
+
|
|
72
|
+
- Vous comprenez que vos donnees seront envoyees aux serveurs d'Anthropic via le Claude Code SDK
|
|
73
|
+
- Vous acceptez de respecter les [Conditions d'utilisation d'Anthropic](https://www.anthropic.com/legal/consumer-terms)
|
|
74
|
+
- Vous reconnaissez que ce logiciel est fourni "tel quel" sans aucune garantie
|
|
75
|
+
|
|
76
|
+
## Changelog
|
|
77
|
+
|
|
78
|
+
Voir [CHANGELOG.md](CHANGELOG.md) pour l'historique complet des versions.
|
|
79
|
+
|
|
80
|
+
## License
|
|
81
|
+
|
|
82
|
+
MIT
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
[Christopher Lasgi](https://christopherlasgi.dev) — Expert Shopify & E-commerce
|
|
87
|
+
|
|
88
|
+
(c) 2026 [@BoostEcom/Provider](https://boostecom.dev) powered by [BoostEcom](https://boostecom.dev). Tous droits reserves.
|
|
89
|
+
|
|
90
|
+
Base sur [ai-sdk-provider-claude-code](https://github.com/ben-vargas/ai-sdk-provider-claude-code) par Ben Vargas.
|