@frontmcp/skills 0.0.1 → 1.0.0-beta.11

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 (104) hide show
  1. package/README.md +2 -2
  2. package/catalog/TEMPLATE.md +58 -13
  3. package/catalog/frontmcp-config/SKILL.md +156 -0
  4. package/catalog/{auth/configure-auth/references/auth-modes.md → frontmcp-config/references/configure-auth-modes.md} +5 -0
  5. package/catalog/frontmcp-config/references/configure-auth.md +243 -0
  6. package/catalog/frontmcp-config/references/configure-elicitation.md +183 -0
  7. package/catalog/frontmcp-config/references/configure-http.md +210 -0
  8. package/catalog/frontmcp-config/references/configure-session.md +210 -0
  9. package/catalog/{config/configure-throttle/references/guard-config.md → frontmcp-config/references/configure-throttle-guard-config.md} +5 -0
  10. package/catalog/frontmcp-config/references/configure-throttle.md +234 -0
  11. package/catalog/{config/configure-transport/references/protocol-presets.md → frontmcp-config/references/configure-transport-protocol-presets.md} +5 -0
  12. package/catalog/frontmcp-config/references/configure-transport.md +200 -0
  13. package/catalog/frontmcp-config/references/setup-redis.md +9 -0
  14. package/catalog/frontmcp-config/references/setup-sqlite.md +9 -0
  15. package/catalog/frontmcp-deployment/SKILL.md +152 -0
  16. package/catalog/frontmcp-deployment/references/build-for-browser.md +143 -0
  17. package/catalog/frontmcp-deployment/references/build-for-cli.md +191 -0
  18. package/catalog/{deployment/build-for-sdk/SKILL.md → frontmcp-deployment/references/build-for-sdk.md} +66 -20
  19. package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +218 -0
  20. package/catalog/{deployment/deploy-to-lambda/SKILL.md → frontmcp-deployment/references/deploy-to-lambda.md} +77 -59
  21. package/catalog/{deployment/deploy-to-node/references/Dockerfile.example → frontmcp-deployment/references/deploy-to-node-dockerfile.md} +18 -4
  22. package/catalog/{deployment/deploy-to-node/SKILL.md → frontmcp-deployment/references/deploy-to-node.md} +69 -36
  23. package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +65 -0
  24. package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +229 -0
  25. package/catalog/frontmcp-development/SKILL.md +126 -0
  26. package/catalog/frontmcp-development/references/create-adapter.md +170 -0
  27. package/catalog/{development/create-agent/references/llm-config.md → frontmcp-development/references/create-agent-llm-config.md} +10 -5
  28. package/catalog/{development/create-agent/SKILL.md → frontmcp-development/references/create-agent.md} +83 -40
  29. package/catalog/{development/create-job/SKILL.md → frontmcp-development/references/create-job.md} +62 -15
  30. package/catalog/{plugins/create-plugin-hooks/SKILL.md → frontmcp-development/references/create-plugin-hooks.md} +100 -7
  31. package/catalog/frontmcp-development/references/create-plugin.md +506 -0
  32. package/catalog/{development/create-prompt/SKILL.md → frontmcp-development/references/create-prompt.md} +65 -22
  33. package/catalog/{development/create-provider/SKILL.md → frontmcp-development/references/create-provider.md} +63 -23
  34. package/catalog/{development/create-resource/SKILL.md → frontmcp-development/references/create-resource.md} +148 -26
  35. package/catalog/{development/create-skill-with-tools/SKILL.md → frontmcp-development/references/create-skill-with-tools.md} +174 -20
  36. package/catalog/{development/create-skill/SKILL.md → frontmcp-development/references/create-skill.md} +114 -28
  37. package/catalog/{development/create-tool/references/tool-annotations.md → frontmcp-development/references/create-tool-annotations.md} +5 -0
  38. package/catalog/{development/create-tool/references/output-schema-types.md → frontmcp-development/references/create-tool-output-schema-types.md} +5 -0
  39. package/catalog/{development/create-tool/SKILL.md → frontmcp-development/references/create-tool.md} +172 -23
  40. package/catalog/{development/create-workflow/SKILL.md → frontmcp-development/references/create-workflow.md} +61 -14
  41. package/catalog/frontmcp-development/references/decorators-guide.md +754 -0
  42. package/catalog/frontmcp-development/references/official-adapters.md +199 -0
  43. package/catalog/{plugins/official-plugins/SKILL.md → frontmcp-development/references/official-plugins.md} +97 -27
  44. package/catalog/frontmcp-extensibility/SKILL.md +103 -0
  45. package/catalog/frontmcp-extensibility/references/vectoriadb.md +289 -0
  46. package/catalog/frontmcp-guides/SKILL.md +420 -0
  47. package/catalog/frontmcp-guides/references/example-knowledge-base.md +641 -0
  48. package/catalog/frontmcp-guides/references/example-task-manager.md +517 -0
  49. package/catalog/frontmcp-guides/references/example-weather-api.md +297 -0
  50. package/catalog/frontmcp-production-readiness/SKILL.md +98 -0
  51. package/catalog/frontmcp-production-readiness/references/common-checklist.md +156 -0
  52. package/catalog/frontmcp-production-readiness/references/production-browser.md +46 -0
  53. package/catalog/frontmcp-production-readiness/references/production-cli-binary.md +62 -0
  54. package/catalog/frontmcp-production-readiness/references/production-cli-daemon.md +61 -0
  55. package/catalog/frontmcp-production-readiness/references/production-cloudflare.md +52 -0
  56. package/catalog/frontmcp-production-readiness/references/production-lambda.md +53 -0
  57. package/catalog/frontmcp-production-readiness/references/production-node-sdk.md +66 -0
  58. package/catalog/frontmcp-production-readiness/references/production-node-server.md +61 -0
  59. package/catalog/frontmcp-production-readiness/references/production-vercel.md +52 -0
  60. package/catalog/frontmcp-setup/SKILL.md +132 -0
  61. package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +280 -0
  62. package/catalog/{setup/multi-app-composition/SKILL.md → frontmcp-setup/references/multi-app-composition.md} +66 -19
  63. package/catalog/{setup/nx-workflow/SKILL.md → frontmcp-setup/references/nx-workflow.md} +79 -17
  64. package/catalog/frontmcp-setup/references/project-structure-nx.md +251 -0
  65. package/catalog/frontmcp-setup/references/project-structure-standalone.md +217 -0
  66. package/catalog/frontmcp-setup/references/readme-guide.md +226 -0
  67. package/catalog/{setup/setup-project/SKILL.md → frontmcp-setup/references/setup-project.md} +63 -58
  68. package/catalog/{setup/setup-redis/SKILL.md → frontmcp-setup/references/setup-redis.md} +60 -82
  69. package/catalog/{setup/setup-sqlite/SKILL.md → frontmcp-setup/references/setup-sqlite.md} +65 -72
  70. package/catalog/frontmcp-testing/SKILL.md +135 -0
  71. package/catalog/{testing/setup-testing/SKILL.md → frontmcp-testing/references/setup-testing.md} +79 -63
  72. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-auth.md +5 -0
  73. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-browser-build.md +5 -0
  74. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-cli-binary.md +5 -0
  75. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-direct-client.md +5 -0
  76. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-e2e-handler.md +5 -0
  77. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-tool-unit.md +6 -0
  78. package/catalog/skills-manifest.json +337 -382
  79. package/package.json +2 -2
  80. package/src/index.d.ts +1 -1
  81. package/src/index.js.map +1 -1
  82. package/src/loader.js +0 -1
  83. package/src/loader.js.map +1 -1
  84. package/src/manifest.d.ts +15 -3
  85. package/src/manifest.js +3 -3
  86. package/src/manifest.js.map +1 -1
  87. package/catalog/adapters/create-adapter/SKILL.md +0 -127
  88. package/catalog/adapters/official-adapters/SKILL.md +0 -136
  89. package/catalog/auth/configure-auth/SKILL.md +0 -250
  90. package/catalog/auth/configure-session/SKILL.md +0 -201
  91. package/catalog/config/configure-elicitation/SKILL.md +0 -136
  92. package/catalog/config/configure-http/SKILL.md +0 -167
  93. package/catalog/config/configure-throttle/SKILL.md +0 -189
  94. package/catalog/config/configure-transport/SKILL.md +0 -151
  95. package/catalog/deployment/build-for-browser/SKILL.md +0 -95
  96. package/catalog/deployment/build-for-cli/SKILL.md +0 -100
  97. package/catalog/deployment/deploy-to-cloudflare/SKILL.md +0 -192
  98. package/catalog/deployment/deploy-to-vercel/SKILL.md +0 -196
  99. package/catalog/deployment/deploy-to-vercel/references/vercel.json.example +0 -60
  100. package/catalog/development/decorators-guide/SKILL.md +0 -598
  101. package/catalog/plugins/create-plugin/SKILL.md +0 -336
  102. package/catalog/setup/frontmcp-skills-usage/SKILL.md +0 -200
  103. package/catalog/setup/project-structure-nx/SKILL.md +0 -186
  104. package/catalog/setup/project-structure-standalone/SKILL.md +0 -153
@@ -0,0 +1,289 @@
1
+ ---
2
+ name: vectoriadb
3
+ description: Use VectoriaDB for in-memory vector search with ML-based or TF-IDF engines in FrontMCP servers
4
+ ---
5
+
6
+ # VectoriaDB Integration
7
+
8
+ Use VectoriaDB for in-memory vector search in FrontMCP servers. Two engines are available:
9
+
10
+ - **VectoriaDB** — ML-based semantic search using transformer models. Best for understanding meaning ("find users" matches "list accounts").
11
+ - **TFIDFVectoria** — Zero-dependency keyword search using TF-IDF scoring. Best for exact/fuzzy keyword matching with no model downloads.
12
+
13
+ Both are included in the `vectoriadb` package (already a FrontMCP dependency).
14
+
15
+ ## When to Use
16
+
17
+ | Engine | Use When | Dependencies | Init |
18
+ | --------------- | ----------------------------------------------------------------- | --------------- | ------------------------------------ |
19
+ | `TFIDFVectoria` | Keyword matching, zero deps, no network, small corpus (<10K docs) | None | Synchronous |
20
+ | `VectoriaDB` | Semantic understanding, similarity matching, large corpus | transformers.js | Async (downloads model on first run) |
21
+
22
+ ## TFIDFVectoria — Lightweight Keyword Search
23
+
24
+ Zero dependencies, synchronous initialization. Good for tool discovery, FAQ matching, and simple search features.
25
+
26
+ ### Basic Usage
27
+
28
+ ```typescript
29
+ import { TFIDFVectoria } from 'vectoriadb';
30
+
31
+ const db = new TFIDFVectoria({
32
+ defaultSimilarityThreshold: 0.0,
33
+ defaultTopK: 10,
34
+ });
35
+
36
+ // Add documents (id, text)
37
+ db.addDocument('users-list', 'List all users with pagination and filtering');
38
+ db.addDocument('users-create', 'Create a new user account with email and password');
39
+ db.addDocument('orders-list', 'List orders for a customer with date range filters');
40
+
41
+ // Build the index (required after adding documents)
42
+ db.buildIndex();
43
+
44
+ // Search
45
+ const results = db.search('find users', 5);
46
+ // results: [{ id: 'users-list', score: 0.82 }, { id: 'users-create', score: 0.65 }]
47
+ ```
48
+
49
+ ### With Field Weights
50
+
51
+ Weight different fields to control scoring influence:
52
+
53
+ ```typescript
54
+ const db = new TFIDFVectoria({
55
+ fields: {
56
+ name: { weight: 3 }, // Name matches are 3x more important
57
+ description: { weight: 2 }, // Description matches are 2x
58
+ tags: { weight: 1 }, // Tags are baseline
59
+ },
60
+ });
61
+
62
+ db.addDocument('weather-tool', {
63
+ name: 'get_weather',
64
+ description: 'Fetch current weather conditions for a city',
65
+ tags: 'weather forecast temperature',
66
+ });
67
+
68
+ db.buildIndex();
69
+ const results = db.search('temperature forecast', 5);
70
+ ```
71
+
72
+ ### FrontMCP Provider Pattern
73
+
74
+ ```typescript
75
+ import { Provider, ProviderScope } from '@frontmcp/sdk';
76
+ import { TFIDFVectoria } from 'vectoriadb';
77
+
78
+ export const FAQSearch = Symbol('FAQSearch');
79
+
80
+ @Provider({ name: 'faq-search', provide: FAQSearch, scope: ProviderScope.GLOBAL })
81
+ export class FAQSearchProvider {
82
+ private db = new TFIDFVectoria({
83
+ fields: {
84
+ question: { weight: 3 },
85
+ answer: { weight: 1 },
86
+ tags: { weight: 2 },
87
+ },
88
+ });
89
+
90
+ async initialize(faqs: Array<{ id: string; question: string; answer: string; tags: string }>) {
91
+ for (const faq of faqs) {
92
+ this.db.addDocument(faq.id, {
93
+ question: faq.question,
94
+ answer: faq.answer,
95
+ tags: faq.tags,
96
+ });
97
+ }
98
+ this.db.buildIndex();
99
+ }
100
+
101
+ search(query: string, limit = 5) {
102
+ return this.db.search(query, limit);
103
+ }
104
+ }
105
+ ```
106
+
107
+ ## VectoriaDB — Semantic ML Search
108
+
109
+ Uses transformer models for true semantic understanding. "find users" matches "list accounts" even without shared keywords.
110
+
111
+ ### Basic Usage
112
+
113
+ ```typescript
114
+ import { VectoriaDB, DocumentMetadata } from 'vectoriadb';
115
+
116
+ interface ProductDoc extends DocumentMetadata {
117
+ name: string;
118
+ category: string;
119
+ price: number;
120
+ }
121
+
122
+ const db = new VectoriaDB<ProductDoc>({
123
+ modelName: 'Xenova/all-MiniLM-L6-v2', // Default model
124
+ cacheDir: './.cache/transformers', // Model cache
125
+ defaultSimilarityThreshold: 0.4,
126
+ defaultTopK: 10,
127
+ useHNSW: true, // Enable HNSW for fast search on large datasets
128
+ });
129
+
130
+ // Must initialize before use (downloads model on first run)
131
+ await db.initialize();
132
+
133
+ // Add documents
134
+ await db.add('prod-1', 'Wireless noise-canceling headphones with 30h battery', {
135
+ id: 'prod-1',
136
+ name: 'QuietComfort Ultra',
137
+ category: 'audio',
138
+ price: 349,
139
+ });
140
+
141
+ // Semantic search — understands meaning, not just keywords
142
+ const results = await db.search('something to block office noise', {
143
+ topK: 5,
144
+ threshold: 0.4,
145
+ });
146
+ // results[0].metadata.name === 'QuietComfort Ultra' (semantic match!)
147
+ ```
148
+
149
+ ### Batch Operations
150
+
151
+ ```typescript
152
+ await db.addMany([
153
+ {
154
+ id: 'doc-1',
155
+ text: 'First document content',
156
+ metadata: {
157
+ /* ... */
158
+ },
159
+ },
160
+ {
161
+ id: 'doc-2',
162
+ text: 'Second document content',
163
+ metadata: {
164
+ /* ... */
165
+ },
166
+ },
167
+ ]);
168
+ ```
169
+
170
+ ### Filtered Search
171
+
172
+ ```typescript
173
+ const results = await db.search('wireless audio', {
174
+ topK: 5,
175
+ filter: (meta) => meta.category === 'audio' && meta.price < 300,
176
+ });
177
+ ```
178
+
179
+ ### Persistence with Storage Adapters
180
+
181
+ ```typescript
182
+ import { VectoriaDB, FileStorageAdapter } from 'vectoriadb';
183
+
184
+ const db = new VectoriaDB<MyDoc>({
185
+ storageAdapter: new FileStorageAdapter({ cacheDir: './.cache/vectors' }),
186
+ });
187
+
188
+ await db.initialize();
189
+ // After adding documents, persist to disk
190
+ await db.saveToStorage();
191
+ // On next startup, restores without re-embedding
192
+ await db.loadFromStorage();
193
+ ```
194
+
195
+ ### FrontMCP Provider Pattern
196
+
197
+ ```typescript
198
+ import { Provider, ProviderScope } from '@frontmcp/sdk';
199
+ import { VectoriaDB, FileStorageAdapter } from 'vectoriadb';
200
+ import type { DocumentMetadata } from 'vectoriadb';
201
+
202
+ export const KnowledgeBase = Symbol('KnowledgeBase');
203
+
204
+ interface Article extends DocumentMetadata {
205
+ title: string;
206
+ category: string;
207
+ }
208
+
209
+ @Provider({ name: 'knowledge-base', provide: KnowledgeBase, scope: ProviderScope.GLOBAL })
210
+ export class KnowledgeBaseProvider {
211
+ private db: VectoriaDB<Article>;
212
+ private ready: Promise<void>;
213
+
214
+ constructor() {
215
+ this.db = new VectoriaDB<Article>({
216
+ useHNSW: true,
217
+ storageAdapter: new FileStorageAdapter({ cacheDir: './.cache/kb-vectors' }),
218
+ });
219
+ this.ready = this.db.initialize();
220
+ }
221
+
222
+ async search(query: string, options?: { category?: string; limit?: number }) {
223
+ await this.ready;
224
+ return this.db.search(query, {
225
+ topK: options?.limit ?? 10,
226
+ filter: options?.category ? (m) => m.category === options.category : undefined,
227
+ });
228
+ }
229
+
230
+ async index(id: string, text: string, metadata: Article) {
231
+ await this.ready;
232
+ if (this.db.has(id)) {
233
+ await this.db.update(id, { text, metadata });
234
+ } else {
235
+ await this.db.add(id, text, metadata);
236
+ }
237
+ await this.db.saveToStorage();
238
+ }
239
+ }
240
+ ```
241
+
242
+ ## Configuration Reference
243
+
244
+ ### VectoriaDB Options
245
+
246
+ | Option | Type | Default | Description |
247
+ | ---------------------------- | -------------- | --------------------------- | ---------------------------------------- |
248
+ | `modelName` | string | `'Xenova/all-MiniLM-L6-v2'` | Transformer model for embeddings |
249
+ | `cacheDir` | string | `'./.cache/transformers'` | Model download cache directory |
250
+ | `defaultSimilarityThreshold` | number | `0.3` | Minimum similarity score (0-1) |
251
+ | `defaultTopK` | number | `10` | Default results limit |
252
+ | `useHNSW` | boolean | `false` | Enable HNSW index for O(log n) search |
253
+ | `maxDocuments` | number | `100000` | Max documents (DoS protection) |
254
+ | `storageAdapter` | StorageAdapter | None | Persistence adapter (FileStorageAdapter) |
255
+
256
+ ### TFIDFVectoria Options
257
+
258
+ | Option | Type | Default | Description |
259
+ | ---------------------------- | -------------------------- | ------- | ------------------------ |
260
+ | `defaultSimilarityThreshold` | number | `0.0` | Minimum similarity score |
261
+ | `defaultTopK` | number | `10` | Default results limit |
262
+ | `fields` | Record<string, { weight }> | None | Field-weighted indexing |
263
+
264
+ ## Choosing Between Engines
265
+
266
+ | Criterion | TFIDFVectoria | VectoriaDB |
267
+ | ------------------ | ------------------------------ | ----------------------------------------- |
268
+ | **Dependencies** | Zero | transformers.js (~50MB model) |
269
+ | **Initialization** | Synchronous, instant | Async, first-run model download |
270
+ | **Search quality** | Keyword-based (exact/fuzzy) | Semantic (understands meaning) |
271
+ | **Best for** | Tool discovery, FAQ, <10K docs | Knowledge base, recommendations, any size |
272
+ | **Reindex needed** | Yes (`buildIndex()` after add) | No (auto-indexed on add) |
273
+ | **Persistence** | Not built-in | FileStorageAdapter |
274
+
275
+ ## Verification Checklist
276
+
277
+ - [ ] Correct engine chosen based on requirements (TFIDFVectoria vs VectoriaDB)
278
+ - [ ] Provider wraps the database with proper initialization
279
+ - [ ] `buildIndex()` called after adding documents (TFIDFVectoria only)
280
+ - [ ] `await db.initialize()` called before any operations (VectoriaDB only)
281
+ - [ ] Field weights configured based on domain relevance
282
+ - [ ] Storage adapter configured if persistence is needed
283
+ - [ ] Search tool injects provider via `this.get(TOKEN)`
284
+
285
+ ## Reference
286
+
287
+ - [VectoriaDB Documentation](https://docs.agentfront.dev/vectoriadb/get-started/welcome)
288
+ - [TFIDFVectoria API](https://docs.agentfront.dev/vectoriadb/api-reference/tfidf-vectoria/constructor)
289
+ - Related skills: `create-provider`, `create-tool`, `frontmcp-development`