@dcyfr/ai 1.0.3 → 1.0.4
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/LICENSE +27 -1
- package/README.md +343 -4
- package/dist/ai/index.d.ts +2 -0
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +2 -0
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/mcp/index.d.ts +14 -2
- package/dist/ai/mcp/index.d.ts.map +1 -1
- package/dist/ai/mcp/index.js +11 -1
- package/dist/ai/mcp/index.js.map +1 -1
- package/dist/ai/mcp/servers/analytics/index.d.ts +19 -0
- package/dist/ai/mcp/servers/analytics/index.d.ts.map +1 -0
- package/dist/ai/mcp/servers/analytics/index.js +556 -0
- package/dist/ai/mcp/servers/analytics/index.js.map +1 -0
- package/dist/ai/mcp/servers/content-manager/content-provider.d.ts +61 -0
- package/dist/ai/mcp/servers/content-manager/content-provider.d.ts.map +1 -0
- package/dist/ai/mcp/servers/content-manager/content-provider.js +8 -0
- package/dist/ai/mcp/servers/content-manager/content-provider.js.map +1 -0
- package/dist/ai/mcp/servers/content-manager/index.d.ts +19 -0
- package/dist/ai/mcp/servers/content-manager/index.d.ts.map +1 -0
- package/dist/ai/mcp/servers/content-manager/index.js +236 -0
- package/dist/ai/mcp/servers/content-manager/index.js.map +1 -0
- package/dist/ai/mcp/servers/design-tokens/index.d.ts +19 -0
- package/dist/ai/mcp/servers/design-tokens/index.d.ts.map +1 -0
- package/dist/ai/mcp/servers/design-tokens/index.js +422 -0
- package/dist/ai/mcp/servers/design-tokens/index.js.map +1 -0
- package/dist/ai/mcp/servers/design-tokens/token-provider.d.ts +59 -0
- package/dist/ai/mcp/servers/design-tokens/token-provider.d.ts.map +1 -0
- package/dist/ai/mcp/servers/design-tokens/token-provider.js +8 -0
- package/dist/ai/mcp/servers/design-tokens/token-provider.js.map +1 -0
- package/dist/ai/mcp/servers/promptintel/index.d.ts +19 -0
- package/dist/ai/mcp/servers/promptintel/index.d.ts.map +1 -0
- package/dist/ai/mcp/servers/promptintel/index.js +323 -0
- package/dist/ai/mcp/servers/promptintel/index.js.map +1 -0
- package/dist/ai/mcp/servers/shared/cache.d.ts +62 -0
- package/dist/ai/mcp/servers/shared/cache.d.ts.map +1 -0
- package/dist/ai/mcp/servers/shared/cache.js +117 -0
- package/dist/ai/mcp/servers/shared/cache.js.map +1 -0
- package/dist/ai/mcp/servers/shared/promptintel-client.d.ts +53 -0
- package/dist/ai/mcp/servers/shared/promptintel-client.d.ts.map +1 -0
- package/dist/ai/mcp/servers/shared/promptintel-client.js +185 -0
- package/dist/ai/mcp/servers/shared/promptintel-client.js.map +1 -0
- package/dist/ai/mcp/servers/shared/promptintel-types.d.ts +85 -0
- package/dist/ai/mcp/servers/shared/promptintel-types.d.ts.map +1 -0
- package/dist/ai/mcp/servers/shared/promptintel-types.js +7 -0
- package/dist/ai/mcp/servers/shared/promptintel-types.js.map +1 -0
- package/dist/ai/mcp/servers/shared/rate-limiter.d.ts +54 -0
- package/dist/ai/mcp/servers/shared/rate-limiter.d.ts.map +1 -0
- package/dist/ai/mcp/servers/shared/rate-limiter.js +122 -0
- package/dist/ai/mcp/servers/shared/rate-limiter.js.map +1 -0
- package/dist/ai/mcp/servers/shared/redis-client.d.ts +54 -0
- package/dist/ai/mcp/servers/shared/redis-client.d.ts.map +1 -0
- package/dist/ai/mcp/servers/shared/redis-client.js +225 -0
- package/dist/ai/mcp/servers/shared/redis-client.js.map +1 -0
- package/dist/ai/mcp/servers/shared/types.d.ts +292 -0
- package/dist/ai/mcp/servers/shared/types.d.ts.map +1 -0
- package/dist/ai/mcp/servers/shared/types.js +6 -0
- package/dist/ai/mcp/servers/shared/types.js.map +1 -0
- package/dist/ai/mcp/servers/shared/utils.d.ts +41 -0
- package/dist/ai/mcp/servers/shared/utils.d.ts.map +1 -0
- package/dist/ai/mcp/servers/shared/utils.js +183 -0
- package/dist/ai/mcp/servers/shared/utils.js.map +1 -0
- package/dist/ai/memory/config.d.ts +87 -0
- package/dist/ai/memory/config.d.ts.map +1 -0
- package/dist/ai/memory/config.js +154 -0
- package/dist/ai/memory/config.js.map +1 -0
- package/dist/ai/memory/dcyfr-memory.d.ts +63 -0
- package/dist/ai/memory/dcyfr-memory.d.ts.map +1 -0
- package/dist/ai/memory/dcyfr-memory.js +270 -0
- package/dist/ai/memory/dcyfr-memory.js.map +1 -0
- package/dist/ai/memory/index.d.ts +15 -0
- package/dist/ai/memory/index.d.ts.map +1 -0
- package/dist/ai/memory/index.js +15 -0
- package/dist/ai/memory/index.js.map +1 -0
- package/dist/ai/memory/mem0-client.d.ts +108 -0
- package/dist/ai/memory/mem0-client.d.ts.map +1 -0
- package/dist/ai/memory/mem0-client.js +166 -0
- package/dist/ai/memory/mem0-client.js.map +1 -0
- package/dist/ai/memory/types.d.ts +175 -0
- package/dist/ai/memory/types.d.ts.map +1 -0
- package/dist/ai/memory/types.js +10 -0
- package/dist/ai/memory/types.js.map +1 -0
- package/package.json +24 -2
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2026
|
|
3
|
+
Copyright (c) 2025-2026 DCYFR Labs (https://www.dcyfr.ai)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -19,3 +19,29 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Commercial Use
|
|
26
|
+
|
|
27
|
+
This software is dual-licensed:
|
|
28
|
+
|
|
29
|
+
- **MIT License** applies to personal, educational, and non-commercial use
|
|
30
|
+
- **Commercial License** required for business and revenue-generating use
|
|
31
|
+
|
|
32
|
+
### Commercial use includes:
|
|
33
|
+
- Using @dcyfr/ai in a product or service that generates revenue
|
|
34
|
+
- Deploying in a business environment (>5 employees)
|
|
35
|
+
- Providing consulting/services using @dcyfr/ai for profit
|
|
36
|
+
- Distributing as part of a commercial offering
|
|
37
|
+
|
|
38
|
+
### To obtain a commercial license:
|
|
39
|
+
- View tiers: https://github.com/dcyfr/workspace/blob/main/SPONSORSHIP.md
|
|
40
|
+
- Contact: licensing@dcyfr.ai
|
|
41
|
+
- GitHub Sponsors: https://github.com/sponsors/dcyfr
|
|
42
|
+
|
|
43
|
+
For questions about whether your use requires a commercial license, contact licensing@dcyfr.ai.
|
|
44
|
+
|
|
45
|
+
## Trademark
|
|
46
|
+
|
|
47
|
+
"DCYFR" is a trademark of DCYFR Labs. See TRADEMARK.md for usage guidelines.
|
package/README.md
CHANGED
|
@@ -2,13 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
> Portable AI agent framework with plugin architecture for multi-provider integration, telemetry tracking, and quality validation.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@dcyfr/ai)
|
|
6
|
+
[](https://www.npmjs.com/package/@dcyfr/ai)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
[](https://www.typescriptlang.org/)
|
|
9
|
+
[](https://bundlephobia.com/package/@dcyfr/ai)
|
|
9
10
|
|
|
10
11
|
Portable AI agent framework with plugin architecture for managing multiple AI providers, tracking telemetry, and ensuring quality compliance.
|
|
11
12
|
|
|
13
|
+
## Table of Contents
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary>📑 Table of Contents</summary>
|
|
17
|
+
|
|
18
|
+
- [Features](#features)
|
|
19
|
+
- [Installation](#installation)
|
|
20
|
+
- [Quick Start](#quick-start)
|
|
21
|
+
- [Configuration](#configuration)
|
|
22
|
+
- [File Formats](#file-formats)
|
|
23
|
+
- [Three-Layer Merge](#three-layer-merge)
|
|
24
|
+
- [Environment Overrides](#environment-overrides)
|
|
25
|
+
- [Architecture](#architecture)
|
|
26
|
+
- [Plugin System](#plugin-system)
|
|
27
|
+
- [Built-in Agents](#built-in-agents)
|
|
28
|
+
- [Custom Plugins](#custom-plugins)
|
|
29
|
+
- [CLI Commands](#cli-commands)
|
|
30
|
+
- [Examples](#examples)
|
|
31
|
+
- [Documentation](#documentation)
|
|
32
|
+
- [Contributing](#contributing)
|
|
33
|
+
- [Troubleshooting](#-troubleshooting)
|
|
34
|
+
- [Installation Issues](#installation-issues)
|
|
35
|
+
- [Configuration Issues](#configuration-issues)
|
|
36
|
+
- [Plugin Issues](#plugin-issues)
|
|
37
|
+
- [CLI Issues](#cli-issues)
|
|
38
|
+
- [FAQ](#-faq)
|
|
39
|
+
- [Performance Benchmarks](#-performance-benchmarks)
|
|
40
|
+
- [Security](#-security)
|
|
41
|
+
- [Known Limitations](#️-known-limitations)
|
|
42
|
+
- [License & Sponsorship](#-license--sponsorship)
|
|
43
|
+
|
|
44
|
+
</details>
|
|
45
|
+
|
|
12
46
|
## Features
|
|
13
47
|
|
|
14
48
|
- 🔌 **Plugin Architecture** - Extensible validation system with custom agents
|
|
@@ -88,6 +122,42 @@ npx @dcyfr/ai config:validate
|
|
|
88
122
|
npx @dcyfr/ai config:validate --verbose
|
|
89
123
|
```
|
|
90
124
|
|
|
125
|
+
## Architecture
|
|
126
|
+
|
|
127
|
+
The DCYFR AI framework follows a layered architecture with clear separation of concerns:
|
|
128
|
+
|
|
129
|
+
```mermaid
|
|
130
|
+
graph TB
|
|
131
|
+
A[Configuration Files] -->|Load & Merge| B[Config Loader]
|
|
132
|
+
B -->|Initialize| C[Plugin Registry]
|
|
133
|
+
C -->|Register| D[Validation Engine]
|
|
134
|
+
C -->|Register| E[Telemetry Engine]
|
|
135
|
+
D -->|Execute| F[Quality Gates]
|
|
136
|
+
E -->|Track| G[Storage Adapters]
|
|
137
|
+
B -->|Configure| H[CLI Interface]
|
|
138
|
+
H -->|Commands| I[User]
|
|
139
|
+
|
|
140
|
+
style A fill:#e1f5ff
|
|
141
|
+
style B fill:#fff3cd
|
|
142
|
+
style C fill:#d4edda
|
|
143
|
+
style D fill:#d4edda
|
|
144
|
+
style E fill:#d4edda
|
|
145
|
+
style H fill:#cfe2ff
|
|
146
|
+
style I fill:#f8d7da
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Key Components
|
|
150
|
+
|
|
151
|
+
- **Config Loader**: Three-layer merge system (defaults → project config → env vars)
|
|
152
|
+
- **Plugin Registry**: Manages custom and built-in validation agents
|
|
153
|
+
- **Validation Engine**: Executes quality gates in parallel or serial mode
|
|
154
|
+
- **Telemetry Engine**: Tracks usage, costs, quality metrics with pluggable storage
|
|
155
|
+
- **CLI Interface**: User-facing commands for config management and validation
|
|
156
|
+
|
|
157
|
+
[⬆️ Back to top](#dcyfr-ai)
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
91
161
|
## Configuration
|
|
92
162
|
|
|
93
163
|
### File Formats
|
|
@@ -154,6 +224,10 @@ const loader = new PluginLoader();
|
|
|
154
224
|
await loader.loadPlugin(customPlugin);
|
|
155
225
|
```
|
|
156
226
|
|
|
227
|
+
[⬆️ Back to top](#dcyfr-ai)
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
157
231
|
## CLI Commands
|
|
158
232
|
|
|
159
233
|
```bash
|
|
@@ -174,6 +248,10 @@ npx @dcyfr/ai config:schema
|
|
|
174
248
|
npx @dcyfr/ai help
|
|
175
249
|
```
|
|
176
250
|
|
|
251
|
+
[⬆️ Back to top](#dcyfr-ai)
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
177
255
|
## Examples
|
|
178
256
|
|
|
179
257
|
See [examples/](./examples/) directory:
|
|
@@ -212,3 +290,264 @@ git commit -m "feat: your feature"
|
|
|
212
290
|
- Changesets automatically creates Release PRs
|
|
213
291
|
- Merging a Release PR publishes to npm
|
|
214
292
|
- See [Release Management](./docs/RELEASE_MANAGEMENT.md) for full details
|
|
293
|
+
|
|
294
|
+
[⬆️ Back to top](#dcyfr-ai)
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## 🔧 Troubleshooting
|
|
299
|
+
|
|
300
|
+
### Installation Issues
|
|
301
|
+
|
|
302
|
+
**Issue: `npm install @dcyfr/ai` fails with 404**
|
|
303
|
+
- **Cause:** Package may not be published yet or npm registry issue
|
|
304
|
+
- **Solution:** Verify package exists: `npm view @dcyfr/ai`, or install from GitHub: `npm install git+https://github.com/dcyfr/dcyfr-ai.git`
|
|
305
|
+
- **Check:** Visit https://www.npmjs.com/package/@dcyfr/ai to confirm publication status
|
|
306
|
+
|
|
307
|
+
**Issue: "Cannot find module '@dcyfr/ai'"**
|
|
308
|
+
- **Cause:** Package not in `node_modules` or incorrect import path
|
|
309
|
+
- **Solution:** Run `npm install`, verify import: `import { loadConfig } from '@dcyfr/ai'`
|
|
310
|
+
- **TypeScript:** Ensure `moduleResolution: "bundler"` or `"node16"` in tsconfig.json
|
|
311
|
+
|
|
312
|
+
### Configuration Issues
|
|
313
|
+
|
|
314
|
+
**Issue: `.dcyfr.yaml` not detected**
|
|
315
|
+
- **Cause:** File in wrong location or invalid YAML syntax
|
|
316
|
+
- **Solution:**
|
|
317
|
+
1. Place `.dcyfr.yaml` in project root (same directory as package.json)
|
|
318
|
+
2. Validate YAML syntax with `npx @dcyfr/ai config:validate`
|
|
319
|
+
3. Check for tabs (use spaces), missing colons, incorrect indentation
|
|
320
|
+
- **Alternative:** Use `.dcyfr.json` or add `dcyfr` key to `package.json`
|
|
321
|
+
|
|
322
|
+
**Issue: "Invalid configuration schema"**
|
|
323
|
+
- **Cause:** Missing required fields or incorrect types
|
|
324
|
+
- **Solution:**
|
|
325
|
+
1. Run `npx @dcyfr/ai config:schema` to see full schema
|
|
326
|
+
2. Ensure required fields present: `version`, `projectName`
|
|
327
|
+
3. Check types match (strings in quotes, booleans without quotes, arrays with brackets)
|
|
328
|
+
- **Example:** Valid config minimum:
|
|
329
|
+
```yaml
|
|
330
|
+
version: '1.0.0'
|
|
331
|
+
projectName: my-app
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
**Issue: Environment variables not overriding config**
|
|
335
|
+
- **Cause:** Incorrect env var naming or precedence
|
|
336
|
+
- **Solution:** Use `DCYFR_` prefix with nested path: `DCYFR_AGENTS_DESIGNTOKENS_COMPLIANCE=0.95`
|
|
337
|
+
- **Format:** `DCYFR_<SECTION>_<SUBSECTION>_<KEY>=<value>` (uppercase, underscores)
|
|
338
|
+
- **Debug:** Log final config to see what values are being used
|
|
339
|
+
|
|
340
|
+
### Plugin Issues
|
|
341
|
+
|
|
342
|
+
**Issue: Custom plugin not loading**
|
|
343
|
+
- **Cause:** Plugin doesn't implement required interface or missing manifest
|
|
344
|
+
- **Solution:** Ensure plugin exports:
|
|
345
|
+
1. `manifest` object with `name`, `version`, `description`
|
|
346
|
+
2. `onValidate` method (async function)
|
|
347
|
+
3. Proper TypeScript types if using TypeScript
|
|
348
|
+
- **Example:** See [examples/plugin-system.ts](./examples/plugin-system.ts)
|
|
349
|
+
|
|
350
|
+
**Issue: Validation fails with "No plugins loaded"**
|
|
351
|
+
- **Cause:** Plugins not registered with PluginLoader before validation
|
|
352
|
+
- **Solution:**
|
|
353
|
+
```typescript
|
|
354
|
+
import { PluginLoader } from '@dcyfr/ai';
|
|
355
|
+
const loader = new PluginLoader();
|
|
356
|
+
await loader.loadPlugin(myPlugin);
|
|
357
|
+
await loader.runValidation();
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### CLI Issues
|
|
361
|
+
|
|
362
|
+
**Issue: `npx @dcyfr/ai` command not found**
|
|
363
|
+
- **Cause:** Package not installed or PATH issue
|
|
364
|
+
- **Solution:**
|
|
365
|
+
- Local: Add to devDependencies: `npm install --save-dev @dcyfr/ai`
|
|
366
|
+
- Global: `npm install -g @dcyfr/ai`
|
|
367
|
+
- npx: Use full package name: `npx @dcyfr/ai@latest`
|
|
368
|
+
|
|
369
|
+
**Issue: CLI commands hang or timeout**
|
|
370
|
+
- **Cause:** Large project or slow file system operations
|
|
371
|
+
- **Solution:**
|
|
372
|
+
1. Use `--files` flag to target specific files: `npx @dcyfr/ai validate --files "src/**/*.ts"`
|
|
373
|
+
2. Increase timeout in config: `timeout: 60000` (60 seconds)
|
|
374
|
+
3. Check for infinite loops in custom plugins
|
|
375
|
+
|
|
376
|
+
[⬆️ Back to top](#dcyfr-ai)
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## 📚 FAQ
|
|
381
|
+
|
|
382
|
+
**Q: Is @dcyfr/ai published to npm?**
|
|
383
|
+
|
|
384
|
+
A: Yes, it's published as a public package on npm. Install with `npm install @dcyfr/ai`. Check https://www.npmjs.com/package/@dcyfr/ai for latest version and stats.
|
|
385
|
+
|
|
386
|
+
**Q: Can I use @dcyfr/ai with JavaScript (no TypeScript)?**
|
|
387
|
+
|
|
388
|
+
A: Yes, but TypeScript is strongly recommended for better type safety and IDE support. The framework provides full TypeScript support with Zod validation for runtime type checking. If using JavaScript, you'll miss compile-time type checking but runtime validation still works.
|
|
389
|
+
|
|
390
|
+
**Q: How do I create a custom validation plugin?**
|
|
391
|
+
|
|
392
|
+
A: Implement the `Plugin` interface with `manifest` and `onValidate` method:
|
|
393
|
+
```typescript
|
|
394
|
+
export const myPlugin = {
|
|
395
|
+
manifest: {
|
|
396
|
+
name: 'my-plugin',
|
|
397
|
+
version: '1.0.0',
|
|
398
|
+
description: 'My custom validation'
|
|
399
|
+
},
|
|
400
|
+
async onValidate(context) {
|
|
401
|
+
// Your validation logic here
|
|
402
|
+
return { passed: true, issues: [] };
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
```
|
|
406
|
+
See [docs/plugins.md](./docs/plugins.md) and [examples/plugin-system.ts](./examples/plugin-system.ts) for complete guide.
|
|
407
|
+
|
|
408
|
+
**Q: What's the difference between @dcyfr/ai and @dcyfr/agents?**
|
|
409
|
+
|
|
410
|
+
A: `@dcyfr/ai` is the **public framework** (plugin architecture, config management, telemetry engine, validation framework). `@dcyfr/agents` is a **private package** with DCYFR-specific validation agents (design tokens, barrel exports, PageLayout enforcement). Think of @dcyfr/ai as the engine, @dcyfr/agents as pre-built plugins.
|
|
411
|
+
|
|
412
|
+
**Q: Can I use this with other AI providers (non-Claude)?**
|
|
413
|
+
|
|
414
|
+
A: Yes! The framework supports multi-provider integration including Claude, GitHub Copilot, Groq, Ollama, OpenAI, Anthropic. Configure providers in `.dcyfr.yaml`:
|
|
415
|
+
```yaml
|
|
416
|
+
providers:
|
|
417
|
+
- name: openai
|
|
418
|
+
apiKey: ${OPENAI_API_KEY}
|
|
419
|
+
- name: anthropic
|
|
420
|
+
apiKey: ${ANTHROPIC_API_KEY}
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
**Q: How do I track telemetry and costs?**
|
|
424
|
+
|
|
425
|
+
A: Use the `TelemetryEngine` with storage adapters:
|
|
426
|
+
```typescript
|
|
427
|
+
import { TelemetryEngine, FileStorageAdapter } from '@dcyfr/ai';
|
|
428
|
+
const telemetry = new TelemetryEngine({
|
|
429
|
+
storage: new FileStorageAdapter('./telemetry')
|
|
430
|
+
});
|
|
431
|
+
```
|
|
432
|
+
Telemetry tracks: API calls, token usage, costs, latency, quality scores. See [docs/configuration.md](./docs/configuration.md#telemetry) for full guide.
|
|
433
|
+
|
|
434
|
+
**Q: Is this framework production-ready?**
|
|
435
|
+
|
|
436
|
+
A: Yes! @dcyfr/ai is used in production at dcyfr-labs and other projects. It has comprehensive test coverage, semantic versioning, automated releases via Changesets, and follows best practices for package publishing.
|
|
437
|
+
|
|
438
|
+
[⬆️ Back to top](#dcyfr-ai)
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
## 📊 Performance Benchmarks
|
|
443
|
+
|
|
444
|
+
### Framework Performance
|
|
445
|
+
- **Config Loading:** ~10ms (cached), ~50ms (first load with file I/O)
|
|
446
|
+
- **Validation Framework:** Parallel execution 2-5x faster than serial (depends on plugin count)
|
|
447
|
+
- **Plugin System:** Minimal overhead ~5ms per plugin registration
|
|
448
|
+
- **Bundle Size:** ~200KB gzipped (includes Zod validation library)
|
|
449
|
+
|
|
450
|
+
### Recommended Usage Patterns
|
|
451
|
+
- **Use parallel validation** for independent checks (faster): `mode: 'parallel'`
|
|
452
|
+
- **Cache config loading** (use singleton pattern): Load once, reuse across app
|
|
453
|
+
- **Batch telemetry writes** (reduce I/O overhead): Buffer writes, flush periodically
|
|
454
|
+
- **Lazy load plugins** (faster startup): Only load plugins you need for current validation
|
|
455
|
+
|
|
456
|
+
### Comparison with Alternatives
|
|
457
|
+
- **vs. Custom Scripts:** 10-20x faster due to optimized plugin execution
|
|
458
|
+
- **vs. Serial Validation:** 2-5x faster with parallel execution mode
|
|
459
|
+
- **vs. LangChain:** ~10x smaller bundle size (~200KB vs 2MB+)
|
|
460
|
+
|
|
461
|
+
[⬆️ Back to top](#dcyfr-ai)
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
## 🔒 Security
|
|
466
|
+
|
|
467
|
+
### Reporting Vulnerabilities
|
|
468
|
+
Found a security issue? Report it privately:
|
|
469
|
+
- **GitHub Security Advisories:** [dcyfr-ai/security](https://github.com/dcyfr/dcyfr-ai/security/advisories/new)
|
|
470
|
+
- **Expected Response:** Within 48 hours
|
|
471
|
+
|
|
472
|
+
### Security Considerations
|
|
473
|
+
- **No API keys stored:** Use environment variables for sensitive data (Zod validates but doesn't store)
|
|
474
|
+
- **Zod validation:** All inputs validated with schemas before processing
|
|
475
|
+
- **No remote code execution:** Plugins run in local environment only (no sandboxing yet - see limitations)
|
|
476
|
+
- **Telemetry privacy:** Optional, disable with `DCYFR_TELEMETRY_ENABLED=false`
|
|
477
|
+
- **Dependencies:** Regular Dependabot updates, npm audit on CI
|
|
478
|
+
|
|
479
|
+
### Best Practices
|
|
480
|
+
- Never commit `.env` files (use `.env.example`)
|
|
481
|
+
- Use environment variables for API keys: `${OPENAI_API_KEY}`
|
|
482
|
+
- Review plugin code before loading (plugins have full access to filesystem)
|
|
483
|
+
- Keep dependencies updated: `npm outdated`, `npm update`
|
|
484
|
+
- Enable GitHub security scanning in your repository
|
|
485
|
+
|
|
486
|
+
[⬆️ Back to top](#dcyfr-ai)
|
|
487
|
+
|
|
488
|
+
---
|
|
489
|
+
|
|
490
|
+
## ⚙️ Known Limitations
|
|
491
|
+
|
|
492
|
+
### Current Constraints
|
|
493
|
+
- **Plugin isolation:** Plugins run in same process (no sandboxing yet) - trust plugin code before loading
|
|
494
|
+
- **File-based telemetry only:** No database storage adapter yet (planned for v2.0)
|
|
495
|
+
- **Config caching:** Requires manual cache invalidation on config changes (no hot-reload yet)
|
|
496
|
+
- **Provider-specific features:** Some providers may have limited support (e.g., streaming not supported for all)
|
|
497
|
+
- **TypeScript required for development:** JavaScript works at runtime but TypeScript recommended for development
|
|
498
|
+
|
|
499
|
+
### Platform-Specific Issues
|
|
500
|
+
- **Windows:** Path separators handled automatically but some plugins may have issues
|
|
501
|
+
- **Node.js version:** Requires ≥18.0.0 (uses native fetch, modern APIs)
|
|
502
|
+
- **ESM-only:** Package is ESM (ECMAScript Modules) - CommonJS require() not supported
|
|
503
|
+
|
|
504
|
+
### Planned Improvements
|
|
505
|
+
- [ ] Database storage adapter for telemetry (PostgreSQL, SQLite)
|
|
506
|
+
- [ ] Plugin sandboxing for security (worker threads or VM isolation)
|
|
507
|
+
- [ ] Hot-reload config watching (auto-reload on file changes)
|
|
508
|
+
- [ ] Web UI for telemetry dashboard (view costs, usage, quality over time)
|
|
509
|
+
- [ ] Enhanced provider feature parity (streaming, function calling, vision)
|
|
510
|
+
- [ ] CommonJS compatibility mode (for legacy projects)
|
|
511
|
+
|
|
512
|
+
See [GitHub Issues](https://github.com/dcyfr/dcyfr-ai/issues) for tracked feature requests and bugs.
|
|
513
|
+
|
|
514
|
+
[⬆️ Back to top](#dcyfr-ai)
|
|
515
|
+
|
|
516
|
+
---
|
|
517
|
+
|
|
518
|
+
## 📄 License & Sponsorship
|
|
519
|
+
|
|
520
|
+
**License:** MIT for personal/non-commercial use. Commercial use requires a paid tier.
|
|
521
|
+
|
|
522
|
+
### Commercial Use
|
|
523
|
+
|
|
524
|
+
This package is dual-licensed:
|
|
525
|
+
- **MIT License** for personal, educational, and non-commercial use (free)
|
|
526
|
+
- **Commercial License** for business and revenue-generating use (paid)
|
|
527
|
+
|
|
528
|
+
**Commercial use includes:**
|
|
529
|
+
- Using @dcyfr/ai in SaaS products or revenue-generating services
|
|
530
|
+
- Deploying in companies with >5 employees
|
|
531
|
+
- Providing paid consulting/services using @dcyfr/ai
|
|
532
|
+
- Distributing as part of commercial products
|
|
533
|
+
|
|
534
|
+
### Sponsorship Tiers
|
|
535
|
+
|
|
536
|
+
- 🌍 **Community** ($5/mo) - Signal community access (DCYFR.NET, Quantum Flux)
|
|
537
|
+
- 💚 **Sponsors** ($10/mo) - Bio on dcyfr.ai website + private channels
|
|
538
|
+
- 👨💻 **Developer** ($20/mo) - Limited commercial license + pre-release builds + portfolio support
|
|
539
|
+
- 🚀 **Founder** ($2,400/yr) - Full commercial license + 1hr consultation/mo
|
|
540
|
+
- 💼 **Executive** ($4,800/yr) - Business license + 2hr consultation/mo + 50 employees
|
|
541
|
+
- 🏢 **Enterprise** ($9,600/yr) - Enterprise license + 4hr consultation/mo + unlimited scale
|
|
542
|
+
|
|
543
|
+
**Learn more:** [SPONSORSHIP.md](https://github.com/dcyfr/workspace/blob/main/SPONSORSHIP.md)
|
|
544
|
+
**Join:** [GitHub Sponsors](https://github.com/sponsors/dcyfr)
|
|
545
|
+
**Contact:** licensing@dcyfr.ai
|
|
546
|
+
|
|
547
|
+
### Trademark
|
|
548
|
+
|
|
549
|
+
"DCYFR" is a trademark of DCYFR Labs. See [TRADEMARK.md](https://github.com/dcyfr/workspace/blob/main/TRADEMARK.md) for usage guidelines.
|
|
550
|
+
|
|
551
|
+
---
|
|
552
|
+
|
|
553
|
+
**Made with ❤️ by [DCYFR Labs](https://dcyfr.ai)**
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export { FrameworkConfigSchema, DesignTokenConfigSchema, BarrelExportConfigSchem
|
|
|
15
15
|
export { createStorageAdapter, MemoryStorageAdapter, FileStorageAdapter } from './utils/storage';
|
|
16
16
|
export { type AgentCategory, type AgentTier, type AgentModel, type AgentPermissionMode, type AgentQualityGate, type AgentProactiveTrigger, type AgentSkill, type AgentManifest, type AgentHooks, type Agent, type LoadedAgent, type AgentExecutionContext, type AgentExecutionResult, type AgentViolation, type AgentRoutingRule, type AgentRoutingResult, type AgentRegistryConfig, type AgentLoaderConfig, type AgentRouterConfig, AgentLoader, AgentLoadError, AgentValidationError, getGlobalAgentLoader, resetGlobalAgentLoader, AgentRegistry, getGlobalAgentRegistry, resetGlobalAgentRegistry, AgentRouter, getGlobalAgentRouter, resetGlobalAgentRouter, } from './agents';
|
|
17
17
|
export { type MCPTransport, type MCPServerStatus, type MCPTool, type MCPResource, type MCPServerConfig, type MCPServerManifest, type MCPServerCapabilities, type LoadedMCPServer, type MCPRegistryConfig, type MCPHealthCheckResult, MCPRegistry, getGlobalMCPRegistry, resetGlobalMCPRegistry, } from './mcp';
|
|
18
|
+
export { getMemory, resetMemory, DCYFRMemoryImpl, getMemoryConfig, loadMemoryConfig, validateMemoryConfig, DEFAULT_CONFIG as DEFAULT_MEMORY_CONFIG, createMem0Client, getMem0Client, resetMem0Client, } from './memory';
|
|
19
|
+
export type { DCYFRMemory, Memory, MemorySearchResult, MemoryContext, AgentMemory, SessionMemory, MemoryProvider, VectorDBProvider, VectorDBConfig, LLMConfig, MemoryConfig, Mem0Client, } from './memory';
|
|
18
20
|
export { fullstackDeveloper, frontendDeveloper, backendArchitect, typescriptPro, testEngineer, debugger, securityEngineer, architectureReviewer, databaseArchitect, cloudArchitect, performanceProfiler, devopsEngineer, dataScientist, technicalWriter, researchOrchestrator, loadBuiltinAgents, getBuiltinAgent, listBuiltinAgents, builtinAgentsByName, } from './agents-builtin';
|
|
19
21
|
export declare const VERSION = "1.0.0";
|
|
20
22
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ai/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/ai/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,wBAAwB,EACxB,KAAK,sBAAsB,GAC5B,MAAM,0BAA0B,CAAC;AAGlC,YAAY,EACV,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,WAAW,EACX,eAAe,EACf,YAAY,GACb,MAAM,SAAS,CAAC;AAGjB,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,UAAU,EACV,eAAe,EACf,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,kBAAkB,GACxB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,mCAAmC,CAAC;AAG3C,OAAO,EACL,YAAY,EACZ,UAAU,EACV,KAAK,aAAa,GACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,qBAAqB,EACrB,uB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B,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EAEtB,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EACb,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAEzB,WAAW,EACX,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EAEb,YAAY,EACZ,QAAQ,EAER,gBAAgB,EAEhB,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EAEd,mBAAmB,EAEnB,cAAc,EAEd,aAAa,EAEb,eAAe,EAEf,oBAAoB,EAEpB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAG1B,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/ai/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,wBAAwB,EACxB,KAAK,sBAAsB,GAC5B,MAAM,0BAA0B,CAAC;AAGlC,YAAY,EACV,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,MAAM,EACN,cAAc,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B,cAAc,IAAI,qBAAqB,EACvC,gBAAgB,EAChB,aAAa,EACb,eAAe,GAChB,MAAM,UAAU,CAAC;AAElB,YAAY,EACV,WAAW,EACX,MAAM,EACN,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,YAAY,EACZ,UAAU,GACX,MAAM,UAAU,CAAC;AAGlB,OAAO,EAEL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EAEb,YAAY,EACZ,QAAQ,EAER,gBAAgB,EAEhB,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EAEd,mBAAmB,EAEnB,cAAc,EAEd,aAAa,EAEb,eAAe,EAEf,oBAAoB,EAEpB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAG1B,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/dist/ai/index.js
CHANGED
|
@@ -28,6 +28,8 @@ AgentLoader, AgentLoadError, AgentValidationError, getGlobalAgentLoader, resetGl
|
|
|
28
28
|
export {
|
|
29
29
|
// Classes
|
|
30
30
|
MCPRegistry, getGlobalMCPRegistry, resetGlobalMCPRegistry, } from './mcp';
|
|
31
|
+
// Memory module exports
|
|
32
|
+
export { getMemory, resetMemory, DCYFRMemoryImpl, getMemoryConfig, loadMemoryConfig, validateMemoryConfig, DEFAULT_CONFIG as DEFAULT_MEMORY_CONFIG, createMem0Client, getMem0Client, resetMem0Client, } from './memory';
|
|
31
33
|
// Built-in agents exports
|
|
32
34
|
export {
|
|
33
35
|
// Development agents
|
package/dist/ai/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../packages/ai/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe;AACf,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC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,EACjB,gBAAgB,EAChB,aAAa;AACb,iBAAiB;AACjB,YAAY,EACZ,QAAQ;AACR,kBAAkB;AAClB,gBAAgB;AAChB,sBAAsB;AACtB,oBAAoB,EACpB,iBAAiB,EACjB,cAAc;AACd,qBAAqB;AACrB,mBAAmB;AACnB,gBAAgB;AAChB,cAAc;AACd,cAAc;AACd,aAAa;AACb,iBAAiB;AACjB,eAAe;AACf,kBAAkB;AAClB,oBAAoB;AACpB,oBAAoB;AACpB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,UAAU;AACV,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../packages/ai/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe;AACf,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,wBAAwB,GAEzB,MAAM,0BAA0B,CAAC;AAqClC,wBAAwB;AACxB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,GAExB,MAAM,yBAAyB,CAAC;AAEjC,+BAA+B;AAC/B,OAAO,EACL,mBAAmB,GAIpB,MAAM,mCAAmC,CAAC;AAE3C,+BAA+B;AAC/B,OAAO,EACL,YAAY,EACZ,UAAU,GAEX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB;AACpB,gBAAgB;AAChB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,yBAAyB,EACzB,sBAAsB,EACtB,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB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/ai/mcp/index.d.ts
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module @dcyfr/ai/mcp
|
|
5
5
|
*/
|
|
6
|
-
export type { MCPTransport, MCPServerStatus, MCPTool, MCPResource, MCPServerConfig, MCPServerManifest, MCPServerCapabilities, LoadedMCPServer, MCPRegistryConfig, MCPHealthCheckResult, } from './types';
|
|
7
|
-
export { MCPRegistry, getGlobalMCPRegistry, resetGlobalMCPRegistry, } from './mcp-registry';
|
|
6
|
+
export type { MCPTransport, MCPServerStatus, MCPTool, MCPResource, MCPServerConfig, MCPServerManifest, MCPServerCapabilities, LoadedMCPServer, MCPRegistryConfig, MCPHealthCheckResult, } from './types.js';
|
|
7
|
+
export { MCPRegistry, getGlobalMCPRegistry, resetGlobalMCPRegistry, } from './mcp-registry.js';
|
|
8
|
+
export type { MCPContext, MCPError, TimeRange, PageViewData, TrendingContent, EngagementMetric, ActivityLog, Milestone, AnalyticsSummary, TokenCategory, TokenViolation, TokenValidationResult, TokenSuggestion, TokenUsage, ComplianceReport, ContentType, ContentMetadata, ContentItem, ContentAnalysis, RelatedContent, TopicTaxonomy, SearchResult, CacheEntry, CacheOptions, ScholarAuthor, ScholarPaper, ScholarCitation, ScholarReference, ScholarSearchResult, ScholarBulkSearchResult, ScholarAuthorSearchResult, ScholarRecommendation, ScholarSearchParams, ScholarCacheStats, } from './servers/shared/types.js';
|
|
9
|
+
export { MCPToolError, handleToolError, isProduction, isDevelopment, getEnvironment, filterProductionData, warnProductionFallback, getTimeRangeMs, isWithinTimeRange, sanitizePath, extractSlug, calculateReadingTime, dedupe, sortByProperty, limitResults, isValidUrl, isValidPath, measurePerformance, logToolExecution, } from './servers/shared/utils.js';
|
|
10
|
+
export { SimpleCache, analyticsCache, tokensCache, contentCache, scholarPapersCache, scholarSearchCache, scholarAuthorsCache, } from './servers/shared/cache.js';
|
|
11
|
+
export { redis, getRedisKeyPrefix, getRedisEnvironment, closeRedisClient, } from './servers/shared/redis-client.js';
|
|
12
|
+
export type { RateLimiterStats } from './servers/shared/rate-limiter.js';
|
|
13
|
+
export { RateLimiter } from './servers/shared/rate-limiter.js';
|
|
14
|
+
export type { PromptIntelIoPC, PromptIntelTaxonomy, PromptIntelAgentReport, PromptIntelSearchParams, PromptIntelClientConfig, PromptIntelHealthResponse, PromptIntelErrorResponse, } from './servers/shared/promptintel-types.js';
|
|
15
|
+
export { PromptIntelClient } from './servers/shared/promptintel-client.js';
|
|
16
|
+
export type { ContentProvider, ContentItem as ContentManagerItem, ContentMetadata as ContentManagerMetadata, ContentSearchOptions, } from './servers/content-manager/content-provider.js';
|
|
17
|
+
export { createContentManagerServer } from './servers/content-manager/index.js';
|
|
18
|
+
export type { TokenProvider, TokenCategory as DesignTokenCategory, TokenViolation as DesignTokenViolation, ValidationResult as DesignTokenValidationResult, TokenSuggestion as DesignTokenSuggestion, ComplianceReport as DesignTokenComplianceReport, } from './servers/design-tokens/token-provider.js';
|
|
19
|
+
export { createDesignTokenServer } from './servers/design-tokens/index.js';
|
|
8
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/ai/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,YAAY,EACZ,eAAe,EACf,OAAO,EACP,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/ai/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,YAAY,EACZ,eAAe,EACf,OAAO,EACP,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,WAAW,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AAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAO3E,YAAY,EACV,eAAe,EACf,WAAW,IAAI,kBAAkB,EACjC,eAAe,IAAI,sBAAsB,EACzC,oBAAoB,GACrB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAGhF,YAAY,EACV,aAAa,EACb,aAAa,IAAI,mBAAmB,EACpC,cAAc,IAAI,oBAAoB,EACtC,gBAAgB,IAAI,2BAA2B,EAC/C,eAAe,IAAI,qBAAqB,EACxC,gBAAgB,IAAI,2BAA2B,GAChD,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC"}
|
package/dist/ai/mcp/index.js
CHANGED
|
@@ -4,5 +4,15 @@
|
|
|
4
4
|
* @module @dcyfr/ai/mcp
|
|
5
5
|
*/
|
|
6
6
|
// MCP Registry exports
|
|
7
|
-
export { MCPRegistry, getGlobalMCPRegistry, resetGlobalMCPRegistry, } from './mcp-registry';
|
|
7
|
+
export { MCPRegistry, getGlobalMCPRegistry, resetGlobalMCPRegistry, } from './mcp-registry.js';
|
|
8
|
+
// Shared utilities
|
|
9
|
+
export { MCPToolError, handleToolError, isProduction, isDevelopment, getEnvironment, filterProductionData, warnProductionFallback, getTimeRangeMs, isWithinTimeRange, sanitizePath, extractSlug, calculateReadingTime, dedupe, sortByProperty, limitResults, isValidUrl, isValidPath, measurePerformance, logToolExecution, } from './servers/shared/utils.js';
|
|
10
|
+
// Cache utilities
|
|
11
|
+
export { SimpleCache, analyticsCache, tokensCache, contentCache, scholarPapersCache, scholarSearchCache, scholarAuthorsCache, } from './servers/shared/cache.js';
|
|
12
|
+
// Redis client
|
|
13
|
+
export { redis, getRedisKeyPrefix, getRedisEnvironment, closeRedisClient, } from './servers/shared/redis-client.js';
|
|
14
|
+
export { RateLimiter } from './servers/shared/rate-limiter.js';
|
|
15
|
+
export { PromptIntelClient } from './servers/shared/promptintel-client.js';
|
|
16
|
+
export { createContentManagerServer } from './servers/content-manager/index.js';
|
|
17
|
+
export { createDesignTokenServer } from './servers/design-tokens/index.js';
|
|
8
18
|
//# sourceMappingURL=index.js.map
|
package/dist/ai/mcp/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/ai/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgBH,uBAAuB;AACvB,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/ai/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgBH,uBAAuB;AACvB,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AA4C3B,mBAAmB;AACnB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,MAAM,EACN,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AAEnC,kBAAkB;AAClB,OAAO,EACL,WAAW,EACX,cAAc,EACd,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAEnC,eAAe;AACf,OAAO,EACL,KAAK,EACL,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAY/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAa3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAWhF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analytics MCP Server
|
|
3
|
+
* Provides AI assistants with direct access to Redis analytics data
|
|
4
|
+
*
|
|
5
|
+
* Tools:
|
|
6
|
+
* - analytics:getPageViews - Query page view data
|
|
7
|
+
* - analytics:getTrending - Find trending content
|
|
8
|
+
* - analytics:getEngagement - Query interaction metrics
|
|
9
|
+
* - analytics:searchActivity - Search activity logs
|
|
10
|
+
* - analytics:getMilestones - List achievement milestones
|
|
11
|
+
*
|
|
12
|
+
* Resources:
|
|
13
|
+
* - analytics://recent - Last 24h metrics
|
|
14
|
+
* - analytics://top-pages - Most viewed pages
|
|
15
|
+
* - analytics://milestones/production - Production milestones
|
|
16
|
+
* - analytics://engagement/summary - Overall engagement stats
|
|
17
|
+
*/
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/ai/mcp/servers/analytics/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
|