@soulcraft/brainy 0.9.5
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 +21 -0
- package/README.demo.md +59 -0
- package/README.md +1257 -0
- package/brainy.png +0 -0
- package/cli-wrapper.js +56 -0
- package/dist/augmentationFactory.d.ts +87 -0
- package/dist/augmentationPipeline.d.ts +205 -0
- package/dist/augmentationRegistry.d.ts +48 -0
- package/dist/augmentationRegistryLoader.d.ts +147 -0
- package/dist/augmentations/conduitAugmentations.d.ts +173 -0
- package/dist/augmentations/memoryAugmentations.d.ts +71 -0
- package/dist/augmentations/serverSearchAugmentations.d.ts +168 -0
- package/dist/brainy.js +116929 -0
- package/dist/brainy.min.js +16107 -0
- package/dist/brainyData.d.ts +507 -0
- package/dist/cli.d.ts +7 -0
- package/dist/coreTypes.d.ts +131 -0
- package/dist/examples/basicUsage.d.ts +5 -0
- package/dist/hnsw/hnswIndex.d.ts +96 -0
- package/dist/hnsw/hnswIndexOptimized.d.ts +167 -0
- package/dist/index.d.ts +49 -0
- package/dist/mcp/brainyMCPAdapter.d.ts +69 -0
- package/dist/mcp/brainyMCPService.d.ts +99 -0
- package/dist/mcp/index.d.ts +14 -0
- package/dist/mcp/mcpAugmentationToolset.d.ts +68 -0
- package/dist/pipeline.d.ts +281 -0
- package/dist/sequentialPipeline.d.ts +114 -0
- package/dist/storage/fileSystemStorage.d.ts +123 -0
- package/dist/storage/opfsStorage.d.ts +244 -0
- package/dist/storage/s3CompatibleStorage.d.ts +158 -0
- package/dist/types/augmentations.d.ts +324 -0
- package/dist/types/augmentations.d.ts.map +1 -0
- package/dist/types/brainyDataInterface.d.ts +51 -0
- package/dist/types/brainyDataInterface.d.ts.map +1 -0
- package/dist/types/fileSystemTypes.d.ts +6 -0
- package/dist/types/fileSystemTypes.d.ts.map +1 -0
- package/dist/types/graphTypes.d.ts +134 -0
- package/dist/types/graphTypes.d.ts.map +1 -0
- package/dist/types/mcpTypes.d.ts +140 -0
- package/dist/types/mcpTypes.d.ts.map +1 -0
- package/dist/types/pipelineTypes.d.ts +27 -0
- package/dist/types/pipelineTypes.d.ts.map +1 -0
- package/dist/types/tensorflowTypes.d.ts +7 -0
- package/dist/types/tensorflowTypes.d.ts.map +1 -0
- package/dist/unified.d.ts +12 -0
- package/dist/unified.js +117122 -0
- package/dist/unified.min.js +16107 -0
- package/dist/utils/distance.d.ts +32 -0
- package/dist/utils/embedding.d.ts +55 -0
- package/dist/utils/environment.d.ts +28 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/version.d.ts +6 -0
- package/dist/utils/workerUtils.d.ts +28 -0
- package/package.json +156 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Soulcraft Research
|
|
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:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
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.
|
package/README.demo.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Running the Brainy Demo
|
|
2
|
+
|
|
3
|
+
The Brainy interactive demo showcases the library's features in a web browser. Follow these steps to run it:
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- Make sure you have Node.js installed (version 23.11.0 or higher)
|
|
8
|
+
- Ensure the project is built (`npm run build:all`)
|
|
9
|
+
|
|
10
|
+
## Running the Demo
|
|
11
|
+
|
|
12
|
+
### Option 1: Using the npm script (recommended)
|
|
13
|
+
|
|
14
|
+
Run the following command from the project root:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm run demo
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This will start an HTTP server and automatically open the demo in your default browser.
|
|
21
|
+
|
|
22
|
+
### Option 2: Manual setup
|
|
23
|
+
|
|
24
|
+
1. Start an HTTP server in the project root:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx http-server
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
2. Open your browser and navigate to:
|
|
31
|
+
http://localhost:8080/demo/index.html
|
|
32
|
+
|
|
33
|
+
## Troubleshooting
|
|
34
|
+
|
|
35
|
+
If you see the error "Could not load Brainy library. Please ensure the project is built and served over HTTP", check the
|
|
36
|
+
following:
|
|
37
|
+
|
|
38
|
+
1. Make sure you've built the project with `npm run build:all`
|
|
39
|
+
2. Ensure you're accessing the demo through HTTP (not by opening the file directly)
|
|
40
|
+
3. Check your browser's console for additional error messages
|
|
41
|
+
|
|
42
|
+
If issues persist, try clearing your browser cache or using a private/incognito window.
|
|
43
|
+
|
|
44
|
+
## Build Process
|
|
45
|
+
|
|
46
|
+
The Brainy library uses a two-step build process:
|
|
47
|
+
|
|
48
|
+
1. `npm run build` - Compiles TypeScript files to JavaScript (used for Node.js environments)
|
|
49
|
+
2. `npm run build:browser` - Creates a browser-compatible bundle using Rollup
|
|
50
|
+
|
|
51
|
+
You can run both steps together with:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm run build:all
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The browser bundle is created from `src/unified.ts`, which provides environment detection and adapts to browser,
|
|
58
|
+
Node.js, or serverless environments. This unified approach ensures that the library works correctly across all
|
|
59
|
+
environments.
|