@soulcraft/brainy 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.demo.md CHANGED
@@ -4,7 +4,7 @@ The Brainy interactive demo showcases the library's features in a web browser. F
4
4
 
5
5
  ## Prerequisites
6
6
 
7
- - Make sure you have Node.js installed (version 23.0.0 or higher)
7
+ - Make sure you have Node.js installed (version 24.4.0 or higher)
8
8
  - Ensure the project is built (run both `npm run build` and `npm run build:browser`)
9
9
 
10
10
  ## Running the Demo
package/README.md CHANGED
@@ -3,10 +3,10 @@
3
3
  <br/><br/>
4
4
 
5
5
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
6
- [![Node.js](https://img.shields.io/badge/node-%3E%3D24.3.0-brightgreen.svg)](https://nodejs.org/)
6
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D24.4.0-brightgreen.svg)](https://nodejs.org/)
7
7
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.4.5-blue.svg)](https://www.typescriptlang.org/)
8
8
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
9
- [![npm](https://img.shields.io/badge/npm-v0.10.0-blue.svg)](https://www.npmjs.com/package/@soulcraft/brainy)
9
+ [![npm](https://img.shields.io/badge/npm-v0.11.0-blue.svg)](https://www.npmjs.com/package/@soulcraft/brainy)
10
10
 
11
11
  [//]: # ([![Cartographer]&#40;https://img.shields.io/badge/Cartographer-Official%20Standard-brightgreen&#41;]&#40;https://github.com/sodal-project/cartographer&#41;)
12
12
 
@@ -1246,10 +1246,6 @@ terabyte-scale data that can't fit entirely in memory, we provide several approa
1246
1246
  For detailed information on how to scale Brainy for large datasets, see our
1247
1247
  comprehensive [Scaling Strategy](scalingStrategy.md) document.
1248
1248
 
1249
- ## Requirements
1250
-
1251
- - Node.js >= 23.0.0
1252
-
1253
1249
  ## Contributing
1254
1250
 
1255
1251
  For detailed contribution guidelines, please see [CONTRIBUTING.md](CONTRIBUTING.md).
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Huggingface Activation Augmentation
3
+ *
4
+ * This augmentation provides embedding and text generation capabilities using Huggingface models.
5
+ * It implements the IActivationAugmentation interface to make it pluggable with other solutions.
6
+ */
7
+ import { AugmentationResponse, IActivationAugmentation } from '../types/augmentations.js';
8
+ /**
9
+ * Huggingface Activation Augmentation
10
+ *
11
+ * This augmentation uses Huggingface transformers and sentence_transformers (specifically all-MiniLM-L6-v2)
12
+ * for embedding and text generation capabilities.
13
+ */
14
+ export declare class HuggingfaceActivation implements IActivationAugmentation {
15
+ readonly name: string;
16
+ readonly description: string;
17
+ enabled: boolean;
18
+ private embeddingModel;
19
+ private embeddingFunction;
20
+ private initialized;
21
+ private hfInference;
22
+ constructor();
23
+ /**
24
+ * Initializes the augmentation
25
+ */
26
+ initialize(): Promise<void>;
27
+ /**
28
+ * Shuts down the augmentation
29
+ */
30
+ shutDown(): Promise<void>;
31
+ /**
32
+ * Gets the status of the augmentation
33
+ */
34
+ getStatus(): Promise<'active' | 'inactive' | 'error'>;
35
+ /**
36
+ * Triggers an action based on a processed command or internal state
37
+ * @param actionName The name of the action to trigger
38
+ * @param parameters Optional parameters for the action
39
+ */
40
+ triggerAction(actionName: string, parameters?: Record<string, unknown>): Promise<AugmentationResponse<unknown>>;
41
+ /**
42
+ * Generates an expressive output or response from Brainy
43
+ * @param knowledgeId The identifier of the knowledge to express
44
+ * @param format The desired output format (e.g., 'text', 'json')
45
+ */
46
+ generateOutput(knowledgeId: string, format: string): Promise<AugmentationResponse<string | Record<string, unknown>>>;
47
+ /**
48
+ * Interacts with an external system or API
49
+ * @param systemId The identifier of the external system
50
+ * @param payload The data to send to the external system
51
+ */
52
+ interactExternal(systemId: string, payload: Record<string, unknown>): Promise<AugmentationResponse<unknown>>;
53
+ }
54
+ /**
55
+ * Creates a new instance of the Huggingface Activation Augmentation
56
+ */
57
+ export declare function createHuggingfaceActivation(): IActivationAugmentation;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"huggingfaceActivation.d.ts","sourceRoot":"","sources":["../../src/augmentations/huggingfaceActivation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAoB,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAI3G;;;;;GAKG;AACH,qBAAa,qBAAsB,YAAW,uBAAuB;IACnE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAA2B;IAChD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAA2F;IACvH,OAAO,EAAE,OAAO,CAAO;IAEvB,OAAO,CAAC,cAAc,CAAgC;IACtD,OAAO,CAAC,iBAAiB,CAAgC;IACzD,OAAO,CAAC,WAAW,CAAiB;IACpC,OAAO,CAAC,WAAW,CAAY;;IAO/B;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IA2BjC;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAgB/B;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;IAI3D;;;;OAIG;IACG,aAAa,CACjB,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,OAAO,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAsEzC;;;;OAIG;IACG,cAAc,CAClB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,oBAAoB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IA+ClE;;;;OAIG;IACG,gBAAgB,CACpB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;CAoD1C;AAED;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,uBAAuB,CAErE"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Registration file for Huggingface Activation Augmentation
3
+ *
4
+ * This file registers the Huggingface Activation Augmentation with the augmentation registry.
5
+ */
6
+ export declare function registerHuggingfaceActivation(): void;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"huggingfaceActivationRegistration.d.ts","sourceRoot":"","sources":["../../src/augmentations/huggingfaceActivationRegistration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,wBAAgB,6BAA6B,IAAI,IAAI,CAEpD"}