@diegoaltoworks/chatter 0.1.8 → 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 +164 -106
- package/dist/auth/apikeys.test.d.ts +2 -0
- package/dist/auth/apikeys.test.d.ts.map +1 -0
- package/dist/core/guardrails.test.d.ts +2 -0
- package/dist/core/guardrails.test.d.ts.map +1 -0
- package/dist/core/llm.d.ts +1 -0
- package/dist/core/llm.d.ts.map +1 -1
- package/dist/core/loaders.test.d.ts +2 -0
- package/dist/core/loaders.test.d.ts.map +1 -0
- package/dist/core/prompts.test.d.ts +2 -0
- package/dist/core/prompts.test.d.ts.map +1 -0
- package/dist/core/session.test.d.ts +2 -0
- package/dist/core/session.test.d.ts.map +1 -0
- package/dist/core/widgets.test.d.ts +2 -0
- package/dist/core/widgets.test.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22638 -1395
- package/dist/index.mjs +22619 -1373
- package/dist/mcp-server/conversation-id.d.ts +27 -0
- package/dist/mcp-server/conversation-id.d.ts.map +1 -0
- package/dist/mcp-server/conversation-id.test.d.ts +2 -0
- package/dist/mcp-server/conversation-id.test.d.ts.map +1 -0
- package/dist/mcp-server/cost-tracker.d.ts +36 -0
- package/dist/mcp-server/cost-tracker.d.ts.map +1 -0
- package/dist/mcp-server/cost-tracker.test.d.ts +2 -0
- package/dist/mcp-server/cost-tracker.test.d.ts.map +1 -0
- package/dist/mcp-server/index.d.ts +12 -0
- package/dist/mcp-server/index.d.ts.map +1 -0
- package/dist/mcp-server/logger.d.ts +25 -0
- package/dist/mcp-server/logger.d.ts.map +1 -0
- package/dist/mcp-server/logger.test.d.ts +2 -0
- package/dist/mcp-server/logger.test.d.ts.map +1 -0
- package/dist/mcp-server/rate-limiter.d.ts +59 -0
- package/dist/mcp-server/rate-limiter.d.ts.map +1 -0
- package/dist/mcp-server/rate-limiter.test.d.ts +2 -0
- package/dist/mcp-server/rate-limiter.test.d.ts.map +1 -0
- package/dist/mcp-server/types.d.ts +82 -0
- package/dist/mcp-server/types.d.ts.map +1 -0
- package/dist/mcp-server.d.ts +36 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +671 -0
- package/dist/mcp-server.mjs +636 -0
- package/dist/middleware/auth.test.d.ts +2 -0
- package/dist/middleware/auth.test.d.ts.map +1 -0
- package/dist/middleware/cors.test.d.ts +2 -0
- package/dist/middleware/cors.test.d.ts.map +1 -0
- package/dist/middleware/jwt.test.d.ts +2 -0
- package/dist/middleware/jwt.test.d.ts.map +1 -0
- package/dist/middleware/ratelimit.test.d.ts +2 -0
- package/dist/middleware/ratelimit.test.d.ts.map +1 -0
- package/dist/middleware/referrer.d.ts.map +1 -1
- package/dist/middleware/referrer.test.d.ts +2 -0
- package/dist/middleware/referrer.test.d.ts.map +1 -0
- package/dist/middleware/session.test.d.ts +2 -0
- package/dist/middleware/session.test.d.ts.map +1 -0
- package/package.json +26 -10
package/README.md
CHANGED
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
[](https://www.npmjs.com/package/@diegoaltoworks/chatter)
|
|
8
8
|
[](https://opensource.org/licenses/MIT)
|
|
9
9
|
[](https://github.com/diegoaltoworks/chatter/actions/workflows/ci.yml)
|
|
10
|
+
[](https://github.com/diegoaltoworks/chatter-demo)
|
|
10
11
|
|
|
11
|
-
[Features](#features) • [Quick Start](#quick-start) • [Documentation](#documentation) • [
|
|
12
|
+
[Features](#features) • [Quick Start](#quick-start) • [Documentation](#documentation) • [Demo](#demo)
|
|
12
13
|
|
|
13
14
|
</div>
|
|
14
15
|
|
|
@@ -24,152 +25,209 @@
|
|
|
24
25
|
- 📦 **Framework Agnostic**: Works with any JavaScript framework or vanilla JS
|
|
25
26
|
- 🎯 **TypeScript**: Fully typed for excellent developer experience
|
|
26
27
|
|
|
27
|
-
## Requirements
|
|
28
|
-
|
|
29
|
-
| Requirement | Details |
|
|
30
|
-
|-------------|---------|
|
|
31
|
-
| **OpenAI** | LLM completions and text embeddings for RAG<br><br>**Setup:**<br>1. Sign up: https://platform.openai.com/signup<br>2. Get API key: https://platform.openai.com/api-keys<br>3. Pricing: https://openai.com/pricing<br><br>**Environment Variables:**<br>`OPENAI_API_KEY` |
|
|
32
|
-
| **Turso** | Vector database for embeddings storage<br><br>**Setup:**<br>1. Sign up: https://turso.tech<br>2. Install Turso CLI: `curl -sSfL https://get.tur.so/install.sh \| bash`<br>3. Create database: `turso db create <db-name>`<br>4. Get URL: `turso db show <db-name> --url`<br>5. Create token: `turso db tokens create <db-name>`<br>6. Pricing: Free tier available<br><br>**Environment Variables:**<br>`TURSO_URL`, `TURSO_AUTH_TOKEN` |
|
|
33
|
-
| **Clerk**<br>(Optional) | User authentication for private/staff chat<br><br>**Setup:**<br>1. Sign up: https://clerk.com<br>2. Get credentials: Dashboard → API Keys<br>3. Required for: Private chat mode only<br>4. Pricing: Free tier available<br><br>**Environment Variables:**<br>`CLERK_PUBLISHABLE_KEY`, `CLERK_FRONTEND_URL` |
|
|
34
|
-
|
|
35
28
|
## Quick Start
|
|
36
29
|
|
|
37
|
-
### Installation
|
|
38
|
-
|
|
39
30
|
```bash
|
|
31
|
+
# Install
|
|
40
32
|
npm install @diegoaltoworks/chatter
|
|
41
|
-
# or
|
|
42
|
-
bun add @diegoaltoworks/chatter
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Basic Server Setup
|
|
46
33
|
|
|
47
|
-
|
|
34
|
+
# Create server
|
|
48
35
|
import { createServer } from '@diegoaltoworks/chatter';
|
|
49
36
|
|
|
50
37
|
const app = await createServer({
|
|
51
|
-
bot: {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
description: 'AI assistant for my website'
|
|
56
|
-
},
|
|
57
|
-
openai: {
|
|
58
|
-
apiKey: process.env.OPENAI_API_KEY
|
|
59
|
-
},
|
|
60
|
-
database: {
|
|
61
|
-
url: process.env.TURSO_URL,
|
|
62
|
-
authToken: process.env.TURSO_AUTH_TOKEN
|
|
63
|
-
},
|
|
64
|
-
auth: {
|
|
65
|
-
secret: process.env.CHATTER_SECRET // For JWT-based API keys
|
|
66
|
-
},
|
|
38
|
+
bot: { name: 'MyBot', personName: 'Your Name' },
|
|
39
|
+
openai: { apiKey: process.env.OPENAI_API_KEY },
|
|
40
|
+
database: { url: process.env.TURSO_URL, authToken: process.env.TURSO_AUTH_TOKEN },
|
|
41
|
+
auth: { secret: process.env.CHATTER_SECRET },
|
|
67
42
|
knowledgeDir: './knowledge',
|
|
68
43
|
promptsDir: './prompts'
|
|
69
44
|
});
|
|
70
45
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
46
|
+
Bun.serve({ port: 8181, fetch: app.fetch });
|
|
47
|
+
|
|
48
|
+
# Create API key for clients
|
|
49
|
+
npx chatter create-apikey --name "my-app" --expires-in 365d
|
|
76
50
|
```
|
|
77
51
|
|
|
78
|
-
|
|
52
|
+
**Requirements:** OpenAI API key, Turso database, Bun runtime. See [Requirements Guide](./docs/requirements.md) for setup instructions.
|
|
79
53
|
|
|
80
|
-
|
|
54
|
+
## Examples
|
|
81
55
|
|
|
82
|
-
|
|
83
|
-
export CHATTER_SECRET=your-secret-key-here
|
|
84
|
-
```
|
|
56
|
+
**[📁 Complete Examples](./examples/)** - Ready-to-run examples for all use cases:
|
|
85
57
|
|
|
86
|
-
|
|
58
|
+
- **[HTTP Server (Basic)](./examples/http-server-basic.ts)** - Production-ready HTTP API
|
|
59
|
+
- **[HTTP Server + Clerk](./examples/http-server-with-clerk.ts)** - With authentication
|
|
60
|
+
- **[MCP Server](./examples/mcp-server-example.ts)** - For Claude Desktop integration
|
|
61
|
+
- **[API Client](./examples/api-client-usage.ts)** - Call Chatter from code
|
|
62
|
+
- **[Programmatic RAG](./examples/programmatic-rag.ts)** - Use core modules directly
|
|
87
63
|
|
|
88
|
-
|
|
89
|
-
# Create a key that expires in 1 year
|
|
90
|
-
npx chatter create-apikey --name "mobile-app" --expires-in 365d
|
|
64
|
+
## Documentation
|
|
91
65
|
|
|
92
|
-
|
|
93
|
-
npx chatter create-apikey --name "test" --expires-in 1h
|
|
94
|
-
```
|
|
66
|
+
Complete guides for setup, deployment, and integration:
|
|
95
67
|
|
|
96
|
-
|
|
68
|
+
- **[Requirements](./docs/requirements.md)** - OpenAI, Turso, Clerk setup and pricing
|
|
69
|
+
- **[Server Setup](./docs/server.md)** - Configuration, knowledge base, prompts, API keys
|
|
70
|
+
- **[Client Integration](./docs/client.md)** - Widgets, React components, theming
|
|
71
|
+
- **[Deployment](./docs/deployment.md)** - Google Cloud Run, Fly.io, Railway, VPS
|
|
72
|
+
- **[Testing](./docs/testing.md)** - Comprehensive testing guide (254 tests, 98% coverage)
|
|
73
|
+
- **[Code Quality](./docs/CODE_QUALITY.md)** - Security assessment and architecture review
|
|
74
|
+
- **[FAQs](./docs/faqs.md)** - Troubleshooting and common questions
|
|
97
75
|
|
|
98
|
-
|
|
99
|
-
✅ API Key generated successfully!
|
|
76
|
+
## Demo
|
|
100
77
|
|
|
101
|
-
|
|
102
|
-
ID: 550e8400-e29b-41d4-a716-446655440000
|
|
103
|
-
Expires: 2025-11-16T12:00:00.000Z (365d)
|
|
78
|
+
**🎯 [View Live Demo & Complete Implementation Example](https://github.com/diegoaltoworks/chatter-demo)**
|
|
104
79
|
|
|
105
|
-
|
|
106
|
-
eyJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoibW9iaWxlLWFwcCIsInR5cGUiOiJhcGlfa2V5Ii...
|
|
107
|
-
```
|
|
80
|
+
The [chatter-demo](https://github.com/diegoaltoworks/chatter-demo) repository contains a complete, production-ready implementation showing:
|
|
108
81
|
|
|
109
|
-
|
|
82
|
+
- Full server setup with custom configuration
|
|
83
|
+
- 8 live demo implementations (Widget/React × Button/Inline × Public/Private)
|
|
84
|
+
- Clerk authentication integration
|
|
85
|
+
- Deployment configuration for Google Cloud Run
|
|
86
|
+
- Knowledge base and prompt customization
|
|
87
|
+
- Complete source code you can fork and customize
|
|
110
88
|
|
|
111
|
-
|
|
112
|
-
import { ApiKeyManager } from '@diegoaltoworks/chatter';
|
|
89
|
+
Perfect for understanding how to customize and deploy your own Chatter service.
|
|
113
90
|
|
|
114
|
-
|
|
91
|
+
## Client Integration
|
|
115
92
|
|
|
116
|
-
|
|
117
|
-
const apiKey = await manager.create({
|
|
118
|
-
name: 'dashboard',
|
|
119
|
-
expiresIn: '90d'
|
|
120
|
-
});
|
|
93
|
+
Add chat to your website with pre-built widgets or React components:
|
|
121
94
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
95
|
+
**Vanilla JavaScript** (load from your server):
|
|
96
|
+
```html
|
|
97
|
+
<script src="https://your-bot.example.com/chatter.js"></script>
|
|
98
|
+
<script>
|
|
99
|
+
new Chatter.ChatButton({
|
|
100
|
+
host: 'your-bot.example.com',
|
|
101
|
+
mode: 'public',
|
|
102
|
+
apiKey: 'your-api-key'
|
|
103
|
+
});
|
|
104
|
+
</script>
|
|
127
105
|
```
|
|
128
106
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
107
|
+
**React/NPM**:
|
|
108
|
+
```typescript
|
|
109
|
+
import { ChatButton } from '@diegoaltoworks/chatter/client';
|
|
110
|
+
import '@diegoaltoworks/chatter/client/style.css';
|
|
132
111
|
|
|
133
|
-
|
|
134
|
-
<!DOCTYPE html>
|
|
135
|
-
<html>
|
|
136
|
-
<head>
|
|
137
|
-
<!-- Load styles from your Chatter server -->
|
|
138
|
-
<link rel="stylesheet" href="https://your-bot.example.com/chatter.css">
|
|
139
|
-
</head>
|
|
140
|
-
<body>
|
|
141
|
-
<!-- Load widget from your Chatter server -->
|
|
142
|
-
<script src="https://your-bot.example.com/chatter.js"></script>
|
|
143
|
-
<script>
|
|
144
|
-
// Create a floating chat button
|
|
145
|
-
new Chatter.ChatButton({
|
|
146
|
-
host: 'your-bot.example.com',
|
|
147
|
-
mode: 'public',
|
|
148
|
-
apiKey: 'your-api-key',
|
|
149
|
-
position: 'bottom-right'
|
|
150
|
-
});
|
|
151
|
-
</script>
|
|
152
|
-
</body>
|
|
153
|
-
</html>
|
|
112
|
+
new ChatButton({ host: 'your-bot.example.com', mode: 'public', apiKey: '...' });
|
|
154
113
|
```
|
|
155
114
|
|
|
156
|
-
|
|
115
|
+
See [Client Setup Guide](./docs/client.md) for detailed integration examples, theming, and authentication options.
|
|
157
116
|
|
|
158
|
-
|
|
159
|
-
|
|
117
|
+
## MCP Server Integration
|
|
118
|
+
|
|
119
|
+
Use Chatter as a Model Context Protocol (MCP) server to expose your chatbot to Claude Desktop, VS Code extensions, and other MCP-compatible tools:
|
|
120
|
+
|
|
121
|
+
**Basic Setup:**
|
|
122
|
+
```typescript
|
|
123
|
+
import { createMCPServer } from '@diegoaltoworks/chatter/mcp';
|
|
124
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
125
|
+
|
|
126
|
+
const server = await createMCPServer({
|
|
127
|
+
bot: { name: 'MyBot', personName: 'Your Name' },
|
|
128
|
+
openai: { apiKey: process.env.OPENAI_API_KEY },
|
|
129
|
+
database: { url: process.env.TURSO_URL, authToken: process.env.TURSO_AUTH_TOKEN },
|
|
130
|
+
knowledgeDir: './knowledge',
|
|
131
|
+
promptsDir: './prompts'
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// Connect with STDIO transport (for Claude Desktop)
|
|
135
|
+
const transport = new StdioServerTransport();
|
|
136
|
+
await server.connect(transport);
|
|
160
137
|
```
|
|
161
138
|
|
|
139
|
+
**Customize Tools:**
|
|
162
140
|
```typescript
|
|
163
|
-
|
|
164
|
-
|
|
141
|
+
const server = await createMCPServer({
|
|
142
|
+
// ... other config ...
|
|
143
|
+
tools: {
|
|
144
|
+
public: {
|
|
145
|
+
enabled: true,
|
|
146
|
+
name: 'company_docs',
|
|
147
|
+
description: 'Search company documentation and FAQs'
|
|
148
|
+
},
|
|
149
|
+
private: {
|
|
150
|
+
enabled: false // Disable private tool
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
```
|
|
165
155
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
156
|
+
**Conversation Tracking & Cost Management:**
|
|
157
|
+
```typescript
|
|
158
|
+
const server = await createMCPServer({
|
|
159
|
+
// ... other config ...
|
|
160
|
+
toolRateLimit: 30, // Max 30 requests per minute per tool (optional)
|
|
161
|
+
logging: {
|
|
162
|
+
console: true, // JSON logs to stdout (default: true)
|
|
163
|
+
onChat: async (event) => {
|
|
164
|
+
// Custom logging - includes conversation tracking and cost data
|
|
165
|
+
console.log('Chat event:', {
|
|
166
|
+
timestamp: event.timestamp,
|
|
167
|
+
conversationId: event.conversationId, // Track sessions across calls
|
|
168
|
+
tool: event.toolName,
|
|
169
|
+
user_message: event.userMessage,
|
|
170
|
+
conversation_length: event.conversationHistory.length,
|
|
171
|
+
rag_chunks: event.ragContext.length,
|
|
172
|
+
response_length: event.response.length,
|
|
173
|
+
duration_ms: event.duration,
|
|
174
|
+
// OpenAI API usage and cost tracking
|
|
175
|
+
cost: {
|
|
176
|
+
promptTokens: event.cost.promptTokens,
|
|
177
|
+
completionTokens: event.cost.completionTokens,
|
|
178
|
+
totalTokens: event.cost.totalTokens,
|
|
179
|
+
estimatedCostUSD: event.cost.estimatedCost
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
// Example: Send to external monitoring
|
|
184
|
+
// await fetch('https://your-logging-service.com/events', {
|
|
185
|
+
// method: 'POST',
|
|
186
|
+
// body: JSON.stringify(event)
|
|
187
|
+
// });
|
|
188
|
+
}
|
|
189
|
+
}
|
|
170
190
|
});
|
|
171
191
|
```
|
|
172
192
|
|
|
193
|
+
**Claude Desktop Configuration:**
|
|
194
|
+
|
|
195
|
+
Add to your `claude_desktop_config.json`:
|
|
196
|
+
```json
|
|
197
|
+
{
|
|
198
|
+
"mcpServers": {
|
|
199
|
+
"chatter": {
|
|
200
|
+
"command": "node",
|
|
201
|
+
"args": ["/path/to/your/mcp-server.js"],
|
|
202
|
+
"env": {
|
|
203
|
+
"OPENAI_API_KEY": "your-key",
|
|
204
|
+
"TURSO_URL": "your-url",
|
|
205
|
+
"TURSO_AUTH_TOKEN": "your-token"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Available Tools (configurable):**
|
|
213
|
+
- `chat_public` (default name) - Chat using public knowledge base
|
|
214
|
+
- `chat_private` (default name) - Chat using private/internal knowledge base
|
|
215
|
+
|
|
216
|
+
Both tools:
|
|
217
|
+
- Support single messages or full conversation history
|
|
218
|
+
- Track conversation IDs across sessions for continuity
|
|
219
|
+
- Return token usage and cost estimates in response metadata
|
|
220
|
+
- Use RAG-powered context retrieval from your knowledge base
|
|
221
|
+
- Can be customized with different names and descriptions
|
|
222
|
+
- Can be individually enabled/disabled
|
|
223
|
+
- Optional per-tool rate limiting
|
|
224
|
+
|
|
225
|
+
**Features:**
|
|
226
|
+
- **Conversation ID Tracking**: Pass `conversationId` parameter to maintain session continuity across tool calls
|
|
227
|
+
- **Cost Tracking**: Every response includes token usage (prompt/completion/total) and estimated USD cost
|
|
228
|
+
- **Rate Limiting**: Optional per-tool rate limiting (requests per minute) to control API usage
|
|
229
|
+
- **Observability**: Comprehensive logging with conversation tracking and cost data
|
|
230
|
+
|
|
173
231
|
## License
|
|
174
232
|
|
|
175
233
|
MIT © [Diego Alto](https://github.com/diegoaltoworks)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apikeys.test.d.ts","sourceRoot":"","sources":["../../src/auth/apikeys.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guardrails.test.d.ts","sourceRoot":"","sources":["../../src/core/guardrails.test.ts"],"names":[],"mappings":""}
|
package/dist/core/llm.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare function completeOnce({ client, system, messages, temperature, }:
|
|
|
9
9
|
temperature?: number;
|
|
10
10
|
}): Promise<{
|
|
11
11
|
content: string;
|
|
12
|
+
usage: OpenAI.Completions.CompletionUsage;
|
|
12
13
|
}>;
|
|
13
14
|
export declare function completeStream({ client, system, messages, temperature, }: {
|
|
14
15
|
client: OpenAI;
|
package/dist/core/llm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../../src/core/llm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAGjC,wBAAsB,YAAY,CAAC,EACjC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,WAAiB,GAClB,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB
|
|
1
|
+
{"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../../src/core/llm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAGjC,wBAAsB,YAAY,CAAC,EACjC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,WAAiB,GAClB,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;;;GAaA;AAGD,wBAAuB,cAAc,CAAC,EACpC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,WAAiB,GAClB,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,yCAYA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loaders.test.d.ts","sourceRoot":"","sources":["../../src/core/loaders.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.test.d.ts","sourceRoot":"","sources":["../../src/core/prompts.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.test.d.ts","sourceRoot":"","sources":["../../src/core/session.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgets.test.d.ts","sourceRoot":"","sources":["../../src/core/widgets.test.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
*/
|
|
13
13
|
export { createServer } from "./server";
|
|
14
14
|
export type { ChatterConfig, ServerDependencies } from "./types";
|
|
15
|
+
export { createMCPServer } from "./mcp-server";
|
|
16
|
+
export type { MCPServerOptions, MCPTransportMode } from "./mcp-server";
|
|
15
17
|
export { VectorStore } from "./core/retrieval";
|
|
16
18
|
export { completeOnce, completeStream } from "./core/llm";
|
|
17
19
|
export { loadKnowledge } from "./core/loaders";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,YAAY,EAAE,aAAa,EAAE,kBAA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