@wiscale/velesdb-sdk 1.15.0 → 1.18.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/LICENSE CHANGED
@@ -1,27 +1,363 @@
1
- MIT License
1
+ VelesDB Core License 1.0
2
2
 
3
- Copyright (c) 2024-2026 Wiscale France
3
+ Based on the Elastic License 2.0 (ELv2) Adapted for VelesDB Core
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
5
+ Copyright (c) 2024-2026 Wiscale France. All rights reserved.
11
6
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
7
+ VelesDB® is a registered trademark of Wiscale France.
14
8
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
9
+ ---
10
+
11
+ ## Acceptance
12
+
13
+ By using the Software, you agree to all of the terms and conditions below.
14
+
15
+ ## Copyright License
16
+
17
+ The Licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the Software, in each case subject to the limitations and conditions below.
18
+
19
+ ## Limitations
20
+
21
+ ### 1) No Hosted or Managed Service
22
+
23
+ You may not provide the Software to third parties as a Hosted or Managed Service.
24
+
25
+ A "Hosted or Managed Service" is any service where You (or a third party acting on Your behalf) host, operate, or make available the Software — directly or indirectly — to third parties who are provided access to a Substantial Set of the Software's features or functionality.
26
+
27
+ This restriction includes, without limitation:
28
+
29
+ - offering the Software as a cloud service, hosted service, managed service, or database-as-a-service (DBaaS),
30
+ - operating the Software for third parties, including as a managed service provider (MSP), outsourcer, consultant, hosting provider, or service provider, even if provided to a single customer,
31
+ - exposing the Software's query, administration, indexing, ingestion, storage, graph traversal, knowledge graph, columnar filtering, or management capabilities (or any substantially similar capabilities) to third parties through any interface, including but not limited to: APIs, SDKs, web interfaces, command lines, gateways, middleware, service layers, application wrappers, proxy layers, or any other programmatic or interactive mechanism.
32
+
33
+ If third parties can store data in, query, manage collections or indexes, traverse or manage graph nodes and edges, filter structured data, administer schemas, or otherwise use the Software as a database, vector database, graph database, knowledge graph engine, columnar store, search engine, or query engine — whether directly or through any intermediary layer — this constitutes a Hosted or Managed Service and requires a separate commercial license from the Licensor.
34
+
35
+ ### 2) No Competitive Offering
36
+
37
+ You may not use the Software to build, sell, offer, operate, or otherwise make commercially available any product or service that is Substantially Similar to the Software or that competes with the Software as:
38
+
39
+ - a database,
40
+ - a vector database,
41
+ - a graph database or knowledge graph engine,
42
+ - a columnar store or analytical engine,
43
+ - a search engine,
44
+ - a query engine, or
45
+ - a hybrid search, retrieval, or multi-model data system.
46
+
47
+ This restriction applies whether the product is offered as software, as a service, or as a component of a larger offering, and regardless of whether the Software's code is modified.
48
+
49
+ This restriction does NOT prohibit:
50
+
51
+ - internal use of the Software within your own organization,
52
+ - integration of the Software as a backend component of your own product or service (provided end users receive only the results of your application and are not given access to the Software's core database capabilities),
53
+ - use of the Software to power features such as search, retrieval, ranking, recommendations, or RAG within your own product.
54
+
55
+ ### 3) No Circumvention of Paid Features
56
+
57
+ You may not move, change, disable, or circumvent any licensing mechanism or functionality that enforces paid features, and you may not remove or obscure any functionality in the Software that is protected by such licensing mechanism.
58
+
59
+ ### 4) No Removal of Notices; Trademarks
60
+
61
+ You may not alter, remove, or obscure any licensing, copyright, or other notices of the Licensor in the Software. Any use of the Licensor's trademarks is subject to applicable law.
62
+
63
+ ### 5) Benchmarking
64
+
65
+ You may conduct and publish benchmarks of the Software, provided that any public disclosure of benchmark results includes all of the following:
66
+
67
+ - the benchmarking methodology used,
68
+ - the dataset(s) used (including size, type, and source),
69
+ - the hardware configuration (CPU, RAM, storage, network),
70
+ - the software version of VelesDB Core tested,
71
+ - the full configuration of the Software as tested (including relevant parameters, tuning, and index settings),
72
+ - any other software or tools used in the benchmark.
73
+
74
+ The purpose of this requirement is transparency and reproducibility, not restriction. Benchmarks that omit this information may not be published or distributed publicly.
75
+
76
+ ## Redistribution
77
+
78
+ ### Attribution for Public-Facing Applications
79
+
80
+ If You deploy or make publicly available an Application or Service that uses the Software as a component — including SaaS products, web applications, mobile applications, or browser-based applications — You must include a visible attribution notice containing a hyperlink to https://velesdb.com.
81
+
82
+ **Placement:** The notice must appear in at least one location that is accessible to end users without requiring a separate action (e.g., not solely in source code or internal documentation). Acceptable placements include, but are not limited to:
83
+
84
+ - a website footer or sidebar;
85
+ - an application's About, Credits, or Settings page;
86
+ - API documentation or developer portal;
87
+ - a README or landing page for open-source projects that integrate the Software.
88
+
89
+ **Format:** The notice may take any reasonable form, such as:
90
+
91
+ - "Powered by [VelesDB](https://velesdb.com)"
92
+ - "Built with [VelesDB](https://velesdb.com)"
93
+ - The VelesDB logo (available at https://velesdb.com/brand) linking to https://velesdb.com
94
+
95
+ The key requirement is a **clickable link to https://velesdb.com** that is visible to end users.
96
+
97
+ **Exemptions:** This requirement does not apply to:
98
+ - internal use within your organization;
99
+ - development, testing, or staging environments;
100
+ - holders of a VelesDB Enterprise or Premium license (which may include waived or alternative attribution terms — contact contact@wiscale.fr).
101
+
102
+ Failure to comply with this attribution requirement constitutes a violation of this license.
103
+
104
+ ### Redistribution Terms
105
+
106
+ You may redistribute the Software (in original or modified form), including through container images (e.g., Docker), installers, package managers (e.g., Homebrew, apt, cargo), infrastructure-as-code templates (e.g., Terraform, Helm), or any other distribution mechanism, provided that:
107
+
108
+ 1. a complete copy of this license is included with each distribution,
109
+ 2. all copyright and licensing notices in the Software are preserved and unmodified,
110
+ 3. the redistributed Software remains governed by this license (you may not relicense it under different terms),
111
+ 4. if modified, the distribution includes prominent notices stating that you have modified the Software, and
112
+ 5. redistribution does not grant recipients any right to provide the Software as a Hosted or Managed Service.
113
+
114
+ For the avoidance of doubt, redistribution of the Software does not, by itself, constitute a Hosted or Managed Service, provided that the recipient operates the Software for its own internal use and not for the benefit of third parties.
115
+
116
+ ## Permitted Use (Clarification)
117
+
118
+ You may use the Software in production, including for commercial purposes, and you may embed or integrate the Software into your own products and services, provided that:
119
+
120
+ - the Software is used only as an internal component of your product or service, and
121
+ - your end users are not provided access to a Substantial Set of the Software's features or functionality.
122
+
123
+ For example, it is permitted to use the Software internally to power features such as:
124
+
125
+ - search and retrieval,
126
+ - retrieval-augmented generation (RAG),
127
+ - ranking and recommendations,
128
+ - document indexing and similarity matching,
129
+ - knowledge graph traversal and relationship discovery,
130
+ - structured data filtering and analytics,
131
+ - any other feature where end users receive only the results produced by your application and do not receive access to the Software itself.
132
+
133
+ **Embedded and local-first use.** The Software is designed to run as an embedded database (in-process, WASM, mobile, desktop, or server). Using the Software in embedded mode within your own application — including in browser-based (WASM), mobile (iOS/Android), desktop (Tauri), or server-side deployments — is expressly permitted under this license, provided the Software serves only as an internal component and end users do not receive direct access to the Software's database capabilities.
134
+
135
+ ## Business Model Clarification
136
+
137
+ The Licensor offers the Software under a multi-tier model:
138
+
139
+ - **VelesDB Core** — available under this license (source-available, free for permitted use).
140
+ - **VelesDB Enterprise** — available under a separate commercial license for advanced features, support, and use cases not permitted under this license.
141
+ - **VelesDB Cloud** — the Licensor's proprietary managed database service.
142
+
143
+ Any use of the Software as a Hosted or Managed Service, as a Competitive Offering, or in any other manner not permitted by this license requires a separate **Enterprise** or **Premium** commercial license from the Licensor.
144
+
145
+ ## Examples (Non-Normative)
146
+
147
+ ### Allowed under this license
148
+
149
+ - Your application uses VelesDB Core internally to power search, retrieval, or RAG, and customers cannot create or manage collections, indexes, or databases, nor run arbitrary queries against VelesDB Core.
150
+ - You distribute VelesDB Core bundled with a desktop, mobile, or on-premise application for the customer's own internal use.
151
+ - You use VelesDB Core as a backend for your SaaS product, where end users interact only with your application's interface and receive only processed results.
152
+ - You publish benchmark results comparing VelesDB Core to other databases, with full methodology disclosure.
153
+ - You redistribute VelesDB Core via Docker Hub, a package manager, or an infrastructure template, with this license included.
154
+
155
+ ### Requires a commercial (Enterprise/Premium) license
156
+
157
+ - Offering VelesDB Core (or a derivative) as a hosted, managed, or cloud database service (DBaaS), regardless of whether it is branded as "VelesDB" or under a different name.
158
+ - Operating VelesDB Core for a customer as a managed service provider, outsourcer, or consultant, where the customer has access to the Software's core capabilities.
159
+ - Building and selling a product that competes with VelesDB as a vector database, search engine, or query engine.
160
+ - A cloud provider offering VelesDB as a managed database, managed cluster, hosted indexing/query platform, or vector database as a service.
161
+ - A multi-tenant service where tenants have access to the Software's database-like capabilities (collections, indexes, schemas, queries, ingestion).
162
+ - Any service — regardless of the interface layer or branding — where third parties can effectively use the Software as a database.
163
+
164
+ ## Patents
165
+
166
+ The Licensor grants you a license, under any patent claims the Licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the Software, in each case subject to the limitations and conditions in this license.
167
+
168
+ This license does not cover any patent claims that you cause to be infringed by modifications or additions to the Software.
169
+
170
+ If you or your company make any written claim that the Software infringes or contributes to infringement of any patent, your patent license for the Software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
171
+
172
+ ## Notices
173
+
174
+ You must ensure that anyone who gets a copy of any part of the Software from you also gets a copy of these terms.
175
+
176
+ If you modify the Software, you must include in any modified copies of the Software prominent notices stating that you have modified the Software.
177
+
178
+ ## No Other Rights
179
+
180
+ These terms do not imply any licenses other than those expressly granted in these terms.
181
+
182
+ ## Termination
183
+
184
+ If you use the Software in violation of these terms, such use is not licensed, and your licenses will automatically terminate.
185
+
186
+ If the Licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
187
+
188
+ ## No Liability
189
+
190
+ As far as the law allows, the Software comes as is, without any warranty or condition, and the Licensor will not be liable to you for any damages arising out of these terms or the use or nature of the Software, under any kind of legal claim.
191
+
192
+ ## Definitions
193
+
194
+ The **"Licensor"** is Wiscale France.
195
+
196
+ The **"Software"** is the software the Licensor makes available under these terms, including VelesDB Core and all associated components, libraries, tools, and documentation.
197
+
198
+ The **"Author"** is Julien Lange.
199
+
200
+ **"You"** refers to the individual or entity agreeing to these terms.
201
+
202
+ **"Your company"** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. "Control" means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
203
+
204
+ **"Your licenses"** are all the licenses granted to you for the Software under these terms.
205
+
206
+ **"Use"** means anything you do with the Software requiring one of your licenses.
207
+
208
+ **"Hosted or Managed Service"** means any service, platform, or offering where You (or a third party acting on Your behalf) host, operate, or make available the Software for third parties, and those third parties are provided with access — directly or indirectly — to a Substantial Set of the Software's features or functionality. Access includes, without limitation, access through any of the following: APIs, SDKs, web interfaces, command lines, gateways, middleware, service layers, application wrappers, proxy layers, webhooks, message queues, or any other programmatic or interactive mechanism that enables third parties to create, manage, query, administer, index, ingest, store, traverse graphs, manage knowledge graph nodes or edges, filter structured data, or otherwise use the Software's core database, vector, graph, columnar, or hybrid capabilities.
209
+
210
+ **"Substantial Set of features or functionality"** means access to features or functionality that, taken together, would reasonably allow a third party to use the Software as a general-purpose database, vector database, graph database, knowledge graph engine, columnar store, search engine, query engine, or hybrid/multi-model data system, or as a replacement for the Software, rather than merely receiving the results of your product's or application's features.
211
+
212
+ **"Substantially Similar"** means a product or service that provides database, vector database, graph database, knowledge graph, columnar store, search engine, query engine, hybrid search, or multi-model data capabilities that overlap in purpose and function with the core capabilities of the Software to a degree that would reasonably be considered competitive. A product is not Substantially Similar merely because it uses the Software internally as a component.
213
+
214
+ **"Competitive Offering"** means any product or service that is Substantially Similar to the Software and is made commercially available to third parties, whether as software, as a service, or as a component of a larger offering.
215
+
216
+ **"Cloud Provider"** means any entity that provides cloud computing infrastructure, platform, or software services to third parties, including (without limitation) infrastructure-as-a-service (IaaS), platform-as-a-service (PaaS), and software-as-a-service (SaaS) providers.
217
+
218
+ ---
219
+
220
+ ## Licensing FAQ (VelesDB Core License 1.0)
221
+
222
+ This FAQ is provided for convenience and developer guidance only. It does not replace, modify, or supplement the license terms above. In case of any conflict, the license terms prevail. If in doubt, contact the Licensor (Wiscale France — contact@wiscale.fr).
223
+
224
+ ### 1) Can I use VelesDB Core in production?
225
+
226
+ **Yes.** Production use is permitted, including commercial production use, as long as you comply with the license limitations (no Hosted or Managed Service, no Competitive Offering).
227
+
228
+ ### 2) Can I use VelesDB Core inside my own SaaS product?
229
+
230
+ **Yes.** If VelesDB Core is used only as an internal component of your SaaS and your customers interact only with your application's interface (not with VelesDB directly), this is permitted.
231
+
232
+ In practice: your customers can use your app's features (search, RAG, recommendations, etc.), but they cannot create collections, manage indexes, run arbitrary queries, or otherwise use VelesDB as a database product.
233
+
234
+ ### 3) Can I use VelesDB Core as a backend for a RAG system?
235
+
236
+ **Yes.** Using VelesDB Core to index documents, store embeddings, and retrieve results for a RAG pipeline is a typical permitted use case, as long as end users receive only the generated answers from your application and do not have direct database access.
237
+
238
+ ### 4) What is NOT allowed without a commercial license?
239
+
240
+ - Offering VelesDB Core (or a derivative) as a hosted or managed database service (DBaaS, vector DB as a service, managed cluster, etc.).
241
+ - Operating VelesDB Core for a customer as an MSP, outsourcer, or consultant where the customer has access to VelesDB's core capabilities.
242
+ - Building and selling a competing database, vector database, search engine, or query engine based on VelesDB Core.
243
+ - A cloud provider (e.g., AWS, GCP, Azure, or any other) offering VelesDB as a managed database service.
244
+
245
+ If you want to do any of the above, you need an **Enterprise or Premium license**.
246
+
247
+ ### 5) Can I expose a public API endpoint that runs vector search against VelesDB Core?
248
+
249
+ **It depends:**
250
+
251
+ - **Allowed:** You expose an endpoint like `/search` or `/recommend` that returns results for your product, without giving customers the ability to create/manage collections, ingest vectors, manage indexes, run arbitrary queries, or administer the database.
252
+ - **Not allowed without a commercial license:** You expose VelesDB-like capabilities (collections, ingestion, indexing, querying, admin) to third parties in a way that makes your service effectively "VelesDB as a service."
253
+
254
+ ### 6) Can I let my customers upload documents, and I index them in VelesDB Core for RAG?
255
+
256
+ **Yes.** As long as customers are using your product's document upload feature and are not given direct access to VelesDB's database capabilities (no collection management, no arbitrary queries, no index administration).
257
+
258
+ ### 7) Can a cloud provider offer VelesDB as a managed service?
259
+
260
+ **No, not under this license.** Cloud providers (or any third party) offering VelesDB as a managed database, DBaaS, managed cluster, hosted indexing/query platform, or vector database as a service must obtain a commercial license from Wiscale France.
261
+
262
+ ### 8) Can an agency, consultant, or MSP host VelesDB Core for a client?
263
+
264
+ **Not under this license** if the arrangement constitutes a Hosted or Managed Service (including single-customer managed hosting where the client has access to VelesDB's core capabilities). That scenario requires a commercial license.
265
+
266
+ ### 9) Can I embed VelesDB Core in a desktop, mobile, or on-prem product I sell?
267
+
268
+ **Yes.** Distributing VelesDB Core bundled with your product is permitted, provided you comply with the license (include the license text and notices), and you are not providing it as a Hosted or Managed Service.
269
+
270
+ ### 10) Can I modify VelesDB Core and keep my changes private?
271
+
272
+ **Yes.** The license allows modification. If you distribute a modified version, you must include prominent notices stating that you modified it, and you must provide a copy of the license terms to recipients.
273
+
274
+ ### 11) Can I redistribute VelesDB Core?
275
+
276
+ **Yes.** You may redistribute the Software (as-is or modified) through any mechanism (Docker, package managers, Helm charts, etc.), provided:
277
+
278
+ - the license text is included,
279
+ - copyright notices are preserved,
280
+ - the software remains under this license,
281
+ - if modified, modifications are prominently marked.
282
+
283
+ Redistribution does not grant recipients any right to provide the Software as a Hosted or Managed Service.
284
+
285
+ ### 12) Can I publish benchmarks of VelesDB Core?
286
+
287
+ **Yes.** You are encouraged to benchmark VelesDB Core. However, public benchmark results must include full disclosure of methodology, dataset, hardware, software version, and configuration. This ensures transparency and reproducibility.
288
+
289
+ ### 13) Can I build a competing database product using VelesDB Core?
290
+
291
+ **No.** The No Competitive Offering clause prohibits using the Software to build, sell, or offer a product that competes with VelesDB as a database, vector database, graph database, columnar store, search engine, or query engine.
292
+
293
+ However, using VelesDB Core as an internal component of a non-competing product (e.g., a CRM, an e-commerce platform, a content management system) is permitted.
294
+
295
+ ### 14) Can I remove license headers or copyright notices?
296
+
297
+ **No.** You may not alter, remove, or obscure licensing, copyright, or other notices.
298
+
299
+ ### 15) Can I use the name "VelesDB" for my fork?
300
+
301
+ **No.** VelesDB® is a registered trademark of Wiscale France. You may not brand your fork, derivative work, or product as "VelesDB" without written permission from Wiscale France. Use of the VelesDB name or logo is subject to applicable trademark law.
302
+
303
+ ### 16) What about a multi-tenant service where each tenant only has limited features?
304
+
305
+ If tenants (third parties) get access to a Substantial Set of VelesDB's database, vector database, or query capabilities, it is a Hosted or Managed Service and requires a commercial license, regardless of the number of features exposed per tenant.
306
+
307
+ ### 17) What if my service wraps VelesDB behind an API gateway or middleware?
308
+
309
+ The license explicitly covers indirect access through APIs, SDKs, gateways, middleware, service layers, and application wrappers. If the end result is that third parties can use the Software as a database — regardless of how many layers sit between them and VelesDB — a commercial license is required.
310
+
311
+ ### 18) What if I'm unsure whether my use case is permitted?
312
+
313
+ **Ask.** Contact Wiscale France (contact@wiscale.fr) for clarification or to discuss a commercial license. We want developers to build great things with VelesDB — we're happy to help you find the right license for your use case.
314
+
315
+ ### 19) How do I get an Enterprise or Premium license?
316
+
317
+ Contact Wiscale France (contact@wiscale.fr) to discuss licensing for hosted/managed services, Competitive Offerings, cloud provider partnerships, and other premium use cases.
318
+
319
+ ### 20) What is the difference between VelesDB Core, Enterprise, and Cloud?
320
+
321
+ | Tier | License | Use Case |
322
+ |------|---------|----------|
323
+ | **VelesDB Core** | This license (source-available) | Internal use, embedding, SaaS backend, development, testing |
324
+ | **VelesDB Enterprise** | Commercial license | Advanced features, support, hosted/managed services, competitive offerings |
325
+ | **VelesDB Cloud** | Proprietary SaaS | Fully managed database service operated by Wiscale France |
326
+
327
+ ### 21) Can I use VelesDB's graph engine and knowledge graph features in my product?
328
+
329
+ **Yes.** You can use the vector, graph, columnar, and hybrid search features internally within your product. The restriction applies only if you expose those capabilities directly to third parties as a database service, or if you build a competing graph/vector/search product.
330
+
331
+ ### 22) Can I embed VelesDB in a browser (WASM), mobile app, or Tauri desktop app?
332
+
333
+ **Yes.** Embedded and local-first use is expressly permitted. VelesDB is designed to run in-process (WASM, iOS, Android, Tauri, server). As long as the Software serves as an internal component of your application, this is a permitted use.
334
+
335
+ ### 23) Does the license cover the premium features (Hybrid Search, RBAC, SSO, etc.)?
336
+
337
+ The VelesDB Core license covers VelesDB Core. Premium features (such as RBAC, SSO, GPU Acceleration, Audit Logging, Multi-Tenancy, Encryption at Rest, and Snapshots) are available under VelesDB Enterprise with a separate commercial license. You may not circumvent the licensing mechanism that enforces premium features.
338
+
339
+ ### 24) Can I use VelesDB Core's VelesQL query language in my product?
340
+
341
+ **Yes.** Using VelesQL to query data internally within your product is permitted. However, exposing a general-purpose VelesQL endpoint to third parties (allowing them to run arbitrary queries) would constitute providing access to a Substantial Set of the Software's capabilities and is not permitted without a commercial license.
342
+
343
+ ### 25) Do I need to display "Powered by VelesDB" on my website or app?
344
+
345
+ **Yes, if your app is public.** Include a link to velesdb.com somewhere visible — footer, About page, credits, or docs. That's it. No specific size, color, or position required. Just a clickable link that users can find.
346
+
347
+ Want to remove it? An Enterprise license waives the attribution requirement.
348
+
349
+ ### 26) What counts as a "public-facing application"?
350
+
351
+ Anything accessible by people outside your organization: a SaaS product, a public website, a mobile app on app stores, a public API. Internal tools and staging environments don't count.
352
+
353
+ ### 27) Can I use the VelesDB logo instead of text?
354
+
355
+ **Yes.** Logo or text, your choice — as long as it links to velesdb.com. Brand assets are at https://velesdb.com/brand.
22
356
 
23
357
  ---
24
358
 
25
- Note: This MIT license applies to the TypeScript SDK code only.
26
- VelesDB Core itself is licensed under the Elastic License 2.0 (ELv2).
27
- See https://github.com/cyberlife-coder/VelesDB for VelesDB Core licensing.
359
+ ## Trademark Notice
360
+
361
+ VelesDB® is a registered trademark of Wiscale France. All rights reserved.
362
+
363
+ Use of the VelesDB name, logo, or brand assets is subject to applicable trademark law. You may not use the VelesDB name or logo to imply endorsement, affiliation, or sponsorship by Wiscale France without prior written permission. Forks and derivative works must not be branded as "VelesDB" without explicit authorization from Wiscale France.
package/README.md CHANGED
@@ -2,11 +2,15 @@
2
2
 
3
3
  Official TypeScript SDK for [VelesDB](https://github.com/cyberlife-coder/VelesDB) -- the local-first vector database for AI and RAG. Sub-millisecond semantic search in Browser and Node.js.
4
4
 
5
- **v1.15.0** | Node.js >= 18 | Browser (WASM) | MIT License
5
+ **v1.18.0** | Node.js >= 18 | Browser (WASM) | VelesDB Core License 1.0
6
6
 
7
- ## What's New in v1.14.2
7
+ ## What's New in v1.16.0
8
8
 
9
- - **No SDK source change.** v1.14.2 is a workspace patch focused on the Python Haystack `DocumentStore` (`DuplicatePolicy.SKIP` contract fix) and seven version-drift gaps in the release tooling. The TS SDK ships in lock-step with the workspace and is functionally identical to v1.14.1; the version bump only ensures `npm install @wiscale/velesdb-sdk` resolves to the same release line as `pip install velesdb` and `cargo add velesdb-core@1.14.2`.
9
+ - **First-party embedding helper.** New `OpenAIEmbedder` (plus the `Embedder` interface and `OpenAIEmbedderOptions` type), exported from the package root. It calls any OpenAI-compatible `/embeddings` endpoint via the global `fetch` API no extra runtime dependency so you can go from text to vectors without hand-writing the request. See [Embedding helper](#embedding-helper) below. Works in Node.js 18, browsers, and Deno.
10
+
11
+ ### Previous (v1.14.2)
12
+
13
+ - **No SDK source change.** v1.14.2 was a workspace patch focused on the Python Haystack `DocumentStore` (`DuplicatePolicy.SKIP` contract fix) and seven version-drift gaps in the release tooling. The TS SDK ships in lock-step with the workspace and was functionally identical to v1.14.1.
10
14
 
11
15
  ### Previous (v1.14.1)
12
16
 
@@ -125,6 +129,7 @@ await db.upsertBatch('documents', [
125
129
  ]);
126
130
 
127
131
  // 5. Search for similar vectors
132
+ const queryVector = new Float32Array(768).fill(0.1);
128
133
  const results = await db.search('documents', queryVector, { k: 5 });
129
134
  console.log(results);
130
135
  // [{ id: 'doc-1', score: 0.95, payload: { title: 'Hello World', ... } }, ...]
@@ -151,6 +156,7 @@ await db.init();
151
156
  // Same API as WASM backend
152
157
  await db.createCollection('products', { dimension: 1536 });
153
158
  await db.upsert('products', { id: 1, vector: embedding });
159
+ const queryVector = new Float32Array(1536).fill(0.1);
154
160
  const results = await db.search('products', queryVector, { k: 10 });
155
161
  ```
156
162
 
@@ -161,6 +167,39 @@ const results = await db.search('products', queryVector, { k: 10 });
161
167
  > are accepted for backward compatibility but are deprecated and will be removed
162
168
  > in a future major version. Always target `/v1/` in custom HTTP clients.
163
169
 
170
+ ## Embedding helper
171
+
172
+ The SDK ships an optional `OpenAIEmbedder` so you can turn text into vectors without
173
+ writing the HTTP call yourself. It targets any OpenAI-compatible `/embeddings`
174
+ endpoint (OpenAI, Azure OpenAI, vLLM, …) using the global `fetch` API, so it adds
175
+ **no extra runtime dependency** and runs in Node.js ≥ 18, browsers, and Deno.
176
+
177
+ ```typescript
178
+ import { VelesDB, OpenAIEmbedder } from '@wiscale/velesdb-sdk';
179
+
180
+ const embedder = new OpenAIEmbedder({
181
+ apiKey: process.env.OPENAI_API_KEY!,
182
+ model: 'text-embedding-3-small', // default; pass `dimensions` to truncate
183
+ });
184
+
185
+ const db = new VelesDB({ backend: 'wasm' });
186
+ await db.init();
187
+
188
+ // Embed first so the collection dimension matches the model output.
189
+ const vectors = await embedder.embed(['hello world', 'vector search']);
190
+ await db.createCollection('docs', { dimension: embedder.dimension, metric: 'cosine' });
191
+ await db.upsertBatch('docs', vectors.map((vector, i) => ({ id: `doc-${i}`, vector })));
192
+
193
+ const [query] = await embedder.embed(['greeting']);
194
+ const results = await db.search('docs', query, { k: 5 });
195
+ ```
196
+
197
+ `embedder.dimension` is `0` until the first `embed()` call (or until you pass
198
+ `dimensions` to the constructor), at which point it is inferred from the model's
199
+ output. To use a different provider, set `baseUrl`. Implement the `Embedder`
200
+ interface (`{ dimension: number; embed(texts: string[]): Promise<number[][]> }`)
201
+ to plug in any other embedding source.
202
+
164
203
  ## API Reference
165
204
 
166
205
  ### Client
@@ -312,7 +351,7 @@ Vector similarity search.
312
351
  ```typescript
313
352
  const results = await db.search('docs', queryVector, {
314
353
  k: 10,
315
- filter: { category: 'tech' },
354
+ filter: { condition: { type: 'eq', field: 'category', value: 'tech' } },
316
355
  includeVectors: true
317
356
  });
318
357
  // Returns: SearchResult[] = [{ id, score, payload?, vector? }, ...]
@@ -325,7 +364,7 @@ Execute multiple search queries in parallel.
325
364
  ```typescript
326
365
  const batchResults = await db.searchBatch('docs', [
327
366
  { vector: queryA, k: 5 },
328
- { vector: queryB, k: 10, filter: { type: 'article' } },
367
+ { vector: queryB, k: 10, filter: { condition: { type: 'eq', field: 'type', value: 'article' } } },
329
368
  ]);
330
369
  // Returns: SearchResult[][] (one result array per query)
331
370
  ```
@@ -538,7 +577,7 @@ const combined = await db.query('users',
538
577
 
539
578
  // Fusion strategy
540
579
  const fused = await db.query('docs',
541
- "SELECT * FROM docs USING FUSION(strategy = 'rrf', k = 60) LIMIT 20"
580
+ "SELECT * FROM docs LIMIT 20 USING FUSION(strategy = 'rrf', k = 60)"
542
581
  );
543
582
  ```
544
583
 
@@ -733,7 +772,21 @@ const result = await db.trainPq('embeddings', {
733
772
 
734
773
  ### Agent Memory API
735
774
 
736
- The Agent Memory API provides three memory types for AI agents, built on top of VelesDB's vector and graph storage.
775
+ The Agent Memory API provides three memory types for AI agents, built on top of
776
+ VelesDB's vector storage. In the TypeScript/JavaScript SDK it is accessed **over
777
+ REST** against a running `velesdb-server` (the Python and Rust bindings use the
778
+ embedded engine instead).
779
+
780
+ > **You must create the collection first.** The TS facade does **not**
781
+ > auto-create a collection for you. Create it with the dimension that matches
782
+ > your embedding model and the metric you want (`'cosine'` is the usual choice
783
+ > for normalized text embeddings), then call `storeFact` / `recordEvent` /
784
+ > `learnProcedure` against that same collection name.
785
+
786
+ > **Embeddings are caller-supplied.** There is no auto-embedding: every
787
+ > `embedding` you pass must come from your own embedding model (see
788
+ > [Embedding helper](#embedding-helper)) and its length must equal the
789
+ > collection dimension.
737
790
 
738
791
  ```typescript
739
792
  import { VelesDB } from '@wiscale/velesdb-sdk';
@@ -741,13 +794,39 @@ import { VelesDB } from '@wiscale/velesdb-sdk';
741
794
  const db = new VelesDB({ backend: 'rest', url: 'http://localhost:8080' });
742
795
  await db.init();
743
796
 
797
+ // 1. Create the backing collection FIRST (nothing auto-creates it).
798
+ // The dimension must match your embedding model; cosine is typical.
799
+ await db.createCollection('knowledge', { dimension: 384, metric: 'cosine' });
800
+
801
+ // 2. Open the agent-memory facade.
744
802
  const memory = db.agentMemory({ dimension: 384 });
803
+
804
+ // 3. Store and recall (embedding is your own model's output, length 384).
805
+ await memory.storeFact('knowledge', {
806
+ id: 1,
807
+ text: 'VelesDB uses HNSW for vector indexing',
808
+ embedding: factEmbedding,
809
+ });
810
+ const facts = await memory.searchFacts('knowledge', queryEmbedding, 5);
811
+ ```
812
+
813
+ Each recall method returns `SearchResult[]`:
814
+
815
+ ```typescript
816
+ // SearchResult = { id: number; score: number; payload?: Record<string, unknown>; vector?: number[] }
745
817
  ```
746
818
 
819
+ - `score` is the cosine similarity in `[0, 1]` (for a `cosine` collection);
820
+ higher means more similar.
821
+ - `payload` carries the stored fields (`text`, `event_type`, `name`, `steps`,
822
+ plus your metadata). The reserved keys `_memory_type` / `text` /
823
+ `event_type` / `timestamp` / `name` / `steps` always take precedence over
824
+ caller `metadata`/`data` of the same name, so they cannot be clobbered.
825
+
747
826
  #### Semantic Memory (facts and knowledge)
748
827
 
749
828
  ```typescript
750
- // Store a fact
829
+ // Store a fact (id is caller-assigned; reusing an id upserts)
751
830
  await memory.storeFact('knowledge', {
752
831
  id: 1,
753
832
  text: 'VelesDB uses HNSW for vector indexing',
@@ -762,12 +841,11 @@ const facts = await memory.searchFacts('knowledge', queryEmbedding, 5);
762
841
  #### Episodic Memory (events and experiences)
763
842
 
764
843
  ```typescript
765
- // Record an event
766
- await memory.recordEvent('events', {
844
+ // Record an event — returns the generated point id
845
+ const eventId = await memory.recordEvent('events', {
767
846
  eventType: 'user_query',
768
847
  data: { query: 'How does HNSW work?', response: '...' },
769
848
  embedding: eventEmbedding,
770
- metadata: { timestamp: Date.now() }
771
849
  });
772
850
 
773
851
  // Recall similar events
@@ -777,10 +855,12 @@ const events = await memory.recallEvents('events', queryEmbedding, 5);
777
855
  #### Procedural Memory (learned patterns)
778
856
 
779
857
  ```typescript
780
- // Store a procedure
781
- await memory.learnProcedure('procedures', {
858
+ // Store a procedure — embedding is required so the pattern is recallable,
859
+ // and the generated point id is returned
860
+ const procId = await memory.learnProcedure('procedures', {
782
861
  name: 'deploy-to-prod',
783
862
  steps: ['Run tests', 'Build artifacts', 'Push to registry', 'Deploy'],
863
+ embedding: procedureEmbedding,
784
864
  metadata: { lastUsed: Date.now() }
785
865
  });
786
866
 
@@ -788,6 +868,22 @@ await memory.learnProcedure('procedures', {
788
868
  const procs = await memory.recallProcedures('procedures', queryEmbedding, 3);
789
869
  ```
790
870
 
871
+ #### Deleting memories
872
+
873
+ ```typescript
874
+ // Works for facts, events, and procedures — returns true if a point was removed
875
+ await memory.deleteMemory('procedures', procId);
876
+ ```
877
+
878
+ > **`dimension` is advisory.** `db.agentMemory({ dimension })` records a hint you
879
+ > can read back via `memory.dimension`, but it does **not** create or size any
880
+ > collection — the collection's own dimension (set at `createCollection`)
881
+ > governs storage and search, and your embeddings must match it.
882
+
883
+ > **TTL & snapshots.** Per-entry TTL (in **seconds**) and versioned snapshots are
884
+ > exposed by the embedded Rust API only; the REST-backed TypeScript facade does
885
+ > not surface them. See the [Agent Memory guide](../../docs/guides/AGENT_MEMORY.md).
886
+
791
887
  ---
792
888
 
793
889
  ## Error Handling
@@ -828,6 +924,11 @@ import {
828
924
  VelesDB,
829
925
  AgentMemoryClient,
830
926
 
927
+ // Embedding helper
928
+ OpenAIEmbedder,
929
+ type Embedder,
930
+ type OpenAIEmbedderOptions,
931
+
831
932
  // Backends (advanced: use VelesDB client instead)
832
933
  WasmBackend,
833
934
  RestBackend,
@@ -880,6 +981,6 @@ import {
880
981
 
881
982
  ## License
882
983
 
883
- MIT License -- See [LICENSE](./LICENSE) for details.
984
+ Licensed under the [VelesDB Core License 1.0](./LICENSE) (source-available). The SDK bundles the VelesDB WASM engine and is governed by the Core License.
884
985
 
885
986
  VelesDB Core and Server are licensed under VelesDB Core License 1.0 (source-available).