open-index/open-npm huggingface dataset:
npm package: @neuraflash/einstein-lang
Description: A command-line tool to easily create and train natural language models on Salesforce Einstein
Latest version: 1.0.0

# Einstein Language CLI

A command-line tool to easily create and train natural language models on Salesforce Einstein, without having to use cURL.

[Introduction to Einstein Language](https://metamind.readme.io/docs/intro-to-einstein-language)

Usage:

    einstein-lang [options] <argument>

Accepted Arguments:

    upload
    verify-upload
    train
    train-status
    predict

Options:

    -h, --help                output usage information
    -a, --auth <auth>         The auth token to use
    -f, --file <file>         The local path to the file to upload
    -n, --name <datasetname>  The name of the dataset
    -d, --dataset <dataset>   The dataset id
    -m, --model <model>       The model id
    -p, --phrase <phrase>     The phrase to try prediction on
npm package: @neuraform/core
Description: Framework-agnostic graph-based form engine
Author: Mehul Birare
Latest version: 1.0.1

# @neuraform/core

[![npm version](https://img.shields.io/npm/v/@neuraform/core.svg?style=flat-square)](https://www.npmjs.com/package/@neuraform/core)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue.svg?style=flat-square)](https://www.typescriptlang.org/)

**The Brain of Your Forms.** Framework-agnostic graph-based form engine that eliminates "condition hell" in complex multi-step flows.

## 🚀 Why Graph-Based?

Traditional linear forms (`[Step1, Step2, Step3]`) break when logic gets complex. **NeuraForm** treats your form as a **Directed Acyclic Graph (DAG)**.

```mermaid
graph LR
  Start((Start)) --> UserType{User Type?}
  UserType -->|Business| Biz[Business Details]
  UserType -->|Individual| Pers[Personal Details]
  Biz --> Tax[Tax Info]
  Pers --> Complete((Complete))
  Tax --> Complete
  style Start fill:#f9f,stroke:#333,stroke-width:2px
  style Complete fill:#9f9,stroke:#333,stroke-width:2px
```

| Feature | ❌ Linear Forms | ✅ NeuraForm (Graph) |
| :--- | :--- | :--- |
| **Logic** | Nested `if/else` spaghetti | Declarative Edges |
| **Navigation** | Hardcoded implementation | Auto-computed Paths |
| **Progress** | `Step / Total` (Inaccurate) | Weighted Path Calculation |
| **Validation** | Field-level only | Predictive Path Validation |

## 📦 Installation

```bash
npm install @neuraform/core
```

## ⚡ Quick Start

[![Try on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/edit/node?file=index.js&dependencies=@neuraform/core)

```javascript
import { NeuraFormEngine } from '@neuraform/core';

// 1. Define your map (Schema)
const schema = {
  id: 'onboarding-flow',
  initial: 'welcome',
  states: {
    welcome: {
      on: { NEXT: 'userType' }
    },
    userType: {
      on: {
        BUSINESS: 'businessDetails',
        INDIVIDUAL: 'personalDetails'
      }
    },
    businessDetails: { on: { NEXT: 'complete' } },
    personalDetails: { on: { NEXT: 'complete' } },
    complete: { type: 'final' }
  }
};

// 2. Initialize the engine
const engine = new NeuraFormEngine({
  schema,
  autoSave: true, // Auto-saves to IndexedDB
  onComplete: (data) => console.log('🎉 Form Completed:', data)
});

await engine.start();

// 3. Drive!
console.log(engine.getCurrentState()); // 'welcome'
await engine.transition('NEXT'); 
console.log(engine.getCurrentState()); // 'userType'
```

## 📚 Documentation

- [**Core Concepts**](https://github.com/Mehulbirare/neura-form/blob/main/docs/core-concepts.md) - Learn about Nodes, Edges, and Travelers.
- [**API Reference**](https://github.com/Mehulbirare/neura-form/blob/main/docs/api-reference.md) - Full method documentation.
- [**Examples**](https://github.com/Mehulbirare/neura-form/tree/main/examples) - Real-world usage.

## 📄 License

MIT © [Mehul Birare](https://github.com/Mehulbirare)
npm package: @neuraform/visualizer
Description: Visual form flow designer for NeuraForm schemas
Author: Mehul Birare
Latest version: 1.0.1

# @neuraform/visualizer

[![npm version](https://img.shields.io/npm/v/@neuraform/visualizer.svg?style=flat-square)](https://www.npmjs.com/package/@neuraform/visualizer)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)

**See Your Form Logic.** Generate beautiful flowcharts and insightful statistics from your NeuraForm schemas.

## 📦 Installation

```bash
# Install globally
npm install -g @neuraform/visualizer

# Or run directly with npx
npx @neuraform/visualizer my-schema.json
```

## ⚡ Quick Start

1.  **Paste your schema** into our live playground (Coming Soon) or use the CLI:

    ```bash
    npx @neuraform/visualizer ./examples/onboarding-schema.json -o flow.html
    ```

2.  **Open `flow.html`** in your browser. You'll see an interactive graph like this:

    [![Mermaid Chart](https://mermaid.ink/img/pako:eNpVkMtqw0AMRX9FaNW2QJ5tCiEkL9qQhSy6q7E9Y8-I5ZGUhgT_vXJcAi3W4s49V9KdkNEKqchflfK64Slg67hvebo8PcyfT_Onh_n2-vYyX82f5-v59jJ_u5jP91c4o8t9w51SyrH8P6_4-YF_j7j8x-uGz4xWfFzxtuIjo4K_V_zKSMX3O64Yqfi-4oqRim8rrrR6h1Lo8229q1d-U-9YCtW09a5e1Wv1jqVQ9VvvanWv1TuWQjW19a5ed6_VO5ZCVbX1rl6r1-odS6GKWu_q9eZaq3cshSpqvavXzav1jqVQXeter943r9U7lkJ13npXrzdv1TuWQlXNetcf2Vb7_QHaumc3?type=png)](https://mermaid.live/edit#pako:eNpVkMtqw0AMRX9FaNW2QJ5tCiEkL9qQhSy6q7E9Y8-I5ZGUhgT_vXJcAi3W4s49V9KdkNEKqchflfK64Slg67hvebo8PcyfT_Onh_n2-vYyX82f5-v59jJ_u5jP91c4o8t9w51SyrH8P6_4-YF_j7j8x-uGz4xWfFzxtuIjo4K_V_zKSMX3O64Yqfi-4oqRim8rrrR6h1Lo8229q1d-U-9YCtW09a5e1Wv1jqVQ9VvvanWv1TuWQjW19a5ed6_VO5ZCVbX1rl6r1-odS6GKWu_q9eZaq3cshSpqvavXzav1jqVQXeter943r9U7lkJ13npXrzdv1TuWQlXNetcf2Vb7_QHaumc3)

## 🖥️ CLI Usage

```bash
neuraform-visualizer <schema-file> [options]

# Options:
# -o, --output <file>    Output HTML file (Default: schema-visualization.html)
# -h, --help            Show help
```

## 🛠️ Programmatic API

```javascript
import { SchemaVisualizer } from '@neuraform/visualizer';
import schema from './onboarding.json';

// Get Mermaid Diagram String
const diagram = SchemaVisualizer.toMermaid(schema);
console.log(diagram);
// Output: graph TD; A-->B; ...

// Get Complexity Stats
const stats = SchemaVisualizer.getStats(schema);
console.log(stats);
/*
{
  totalStates: 15,
  maxBranching: 4,
  cyclomaticComplexity: 3
}
*/
```

## 📄 License

MIT © [Mehul Birare](https://github.com/Mehulbirare)
npm package: @neuraiproject/neurai-history-list
Description: A human understandable list of in or outgoing transactions
Author: Neuraiproject
Latest version: 1.2.5

# neurai-history-list

A human understandable list of in or outgoing transactions

## What do we mean by human understandable?

Example.
Alice transfer one LEMONADE token to Bob.
Now Alice expects her history to show that she sent one LEMONADE token to Bob.

Technically, a transaction has been broadcasted on the network.
That transaction typically contains

- One or more unspent transaction outputs (UTXOs) to cover the miner fee, Alice needs to pay some XNA to send an asset.
- One or more UTXOs for the LEMONADE transfer, like input 20 LEMONADE, output one to BOB and 19 back to a change address.

## Install

`npm install @neuraiproject/neurai-history-list`

## How to use

As a developer, you have to ask a Neurai node for the address deltas (getaddressdelta).
The address deltas represents everything that has come in and out from your addresses.

`  import {getHistory } from "@neuraiproject/neurai-history-list";`

OK so you invoke the method getHistory with deltas as argument.
`const history = getHistory(deltas);`
`history` is a list.
Each item in the list represents a transaction in or out of the wallet (list of addresses).
An item in the history list has an `assets` property.
`assets`is a list with objects of type {assetName, value, satoshis}
For example

```
"assets": [
      { "assetName": "LEMONADE", "satoshis": 1000000000, "value": 10 }
    ]
```

### Example user received 5 XNA

```
 {
    "isSent": false,
    "fee": 0,
    "assets": [{ "assetName": "XNA", "satoshis": 500000000, "value": 5 }],
    "blockHeight": 914584,
    "transactionId": "4729236e883325878665a3d5bb989de3a65341f3c6d7a43b4ce58522773f2548"
  }
```

### Example user sent 1 LEMONADE token

```
 {
  "assets": [
    { "assetName": "LEMONADE", "satoshis": -100000000, "value": -1 }
  ],
  "blockHeight": 914603,
  "transactionId": "1c776b263ad75d46f25d19b5330882fad020a46e220799877b982ff2c259a3be",
  "isSent": true,
  "fee": 0
}
```

Unfortunately, it looks like the user intentionally sent 0.01 XNA, that is not true, that was the transaction fee.
This will be fixed in a later version

## Example how to use

Checkout example.js

```
const { getHistory } = require("../neurai-history-list"); //Replace with  @neuraiproject/neurai-history-list
const aliceDeltas = require("./example/alice_deltas_after_sending.json");

const history = getHistory(aliceDeltas);
const stuff = [];
for (let item of history) {
  item.assets.map((asset) => {
    asset.transactionId = item.transactionId.substring(0, 10) + "..";
    stuff.push(asset);
  });
}
console.table(stuff);

```

![image](https://user-images.githubusercontent.com/9694984/215324239-95632d7f-447b-424d-8cbf-c16cf2533b49.png)
npm package: @neuraiproject/neurai-reader
Description: Read information from Neurai blockchain
Author: Neuraiproject
Latest version: 0.0.9

# neurai-reader
![image](https://user-images.githubusercontent.com/9694984/214588738-2d4f4522-44ec-44dd-9962-3bd4534bab4d.png)

Read information from Neurai blockchain



## Install and use

Create an empty JavaScript project
```
mkdir reader
cd reader
npm init -y
npm install @neuraiproject/neurai-reader
```

Now create a file called `index.mjs` the extension .mjs tells Node.js to support ECMA Module (ECMAScript Module).

Add content to index.mjs
```
import Reader from "@neuraiproject/neurai-reader";

Reader.getAsset("FREN#RED").then(console.table);
```


Now run your script
```
node index.mjs
```

Expected output

![image](https://user-images.githubusercontent.com/9694984/214542343-c842ca90-e0bd-4d25-9983-34d3fbf57ace.png)

# API (more are added every day)
For the truth, check type definitions [Type Definitions](./dist/types.d.ts)
```
declare function getAddressesByAsset(assetName: string, onlytotal?: boolean, count?: boolean, start?: boolean): Promise<any>;
declare function getAddressDeltas(address: string | string[]): Promise<any[]>;
declare function getAddressMempool(address: string | string[]): Promise<any>;
declare function getAllAssets(prefix?: string, includeAllMetaData?: boolean): Promise<any>;
declare function getAssetBalance(address: string | string[]): Promise<any>;
declare function getAsset(name: string): Promise<any>;
declare function getBestBlockHash(): Promise<string>;
declare function getBlockByHash(hash: string): Promise<any>;
declare function getBlockByHeight(height: number): Promise<any>;
declare function getMempool(): Promise<any>;
declare function getNeuraiBalance(address: string | string[]): {};
declare function getPubKey(address: string): Promise<{address: string; pubkey: string; revealed: number; height: number; txid: string;}>;
declare function getTransaction(id: string): Promise<any>;
declare function verifyMessage(address: string, signature: string, message: string): Promise<boolean>;

declare function setURL(newURL: string): void;
declare function setUsername(newUsername: string): void;
declare function setPassword(newPassword: string): void;

```
npm package: @neural-nexus/neural-client-runtime
Description: 会话客户端运行时sdk
Latest version: 0.0.1

# neural-client-runtime
会话客户端运行时sdk


## Getting started

安装
```
npm i @neural-nexus/neural-client-runtime
```

## 使用说明

使用示例
```typescript
import Runtime, { MessageType } from '@neural-nexus/neural-client-runtime'

const cardRunTime = new Runtime('cardCode')

cardRunTime.application.openApp('https://1688.com', '1688')

cardRunTime.ui.openNotification({
  title: '消息',
  message: '这是一条消息的提示消息',
  type: MessageType.INF
})

```

API列表

### Action(自定义行为)
```typescript
export interface Action {
  /**
   * 注册自定义行为
   * @param name 行为名称
   * @param containerCode 行为触发端
   * @param cb 行为回调
   */
  register(name:string, containerCode: string, cb: () => void): void;

  /**
   * 触发自定义行为
   * @param name 行为名称
   * @param params 行为参数
   * @param containerCodeList 行为触发端列表
   */
  trigger(name: string, params: any, containerCodeList: string[]): void;
}
```

### application(应用空间)
```typescript
export interface Application {
  /**
   * 打开应用空间
   */
  openWorkspace(): void;
  /**
   * 打开工作台首页
   */
  openLaunchPad(): void;
  /**
   * 打开
   */
  openNexus(): void;
  /**
   * 打开子应用
   */
  openApp(url: string, name: string): void;
  /**
   * 页面回退
   */
  goBack(): void;
  /**
   * 更新首页关注内容
   */
  updateFollow(): void;
    
  /**
   * 更新首页通知
   */
  updateNotice(payload: any): void;
  
  /**
   * 更新首页任务
   */
  updateTask(payload: any): void;
  
  /**
   * 更新首页示险
   */
  updateWarning(payload: any): void
}
```

### nexus(会话)
```typescript
export enum NexusMessageType {
  CARD = "card",
  TEXT = "text",
}

export interface ITextMsgPayload {
  text: string,
  show?: boolean,
  notTriggerAPI?: boolean
}

export interface ICardMsgPayload<T = any>  {
  code: string,
  data: T,
  position?: string
}
export interface Nexus {
  /**
   * 发送系统消息
   * @param type 消息类型
   * @param payload 消息数据
   */
  sendSystemMsg(type: NexusMessageType, payload: ITextMsgPayload | ICardMsgPayload): void;
  /**
   * 发送用户消息
   * @param type 消息类型
   * @param payload 消息数据
   */
  sendUserMsg(type: NexusMessageType, payload: ITextMsgPayload | ICardMsgPayload): void;

  /**
   * 更新上次回答结果
   * @param content 回答内容
   */
  updateLastResult(content: string): void;
}
```

### ui
```typescript
export interface UI {

openToast (params: IToastOpts): void;

/**
 * 打开通知，可以从四个角弹出
 * 里面的组件属性和饿了么一样
 * @param {*} params
 */
openNotification (params: INotificationOpts): void;

/**
 * 打开 Modal 弹窗
 * 里面的组件属性和饿了么一样
 * @param {*} params
 */
openDialog (params: IDialogOpts): void;
```
npm package: @neural-nexus/portal-channel
Description: portal-channel
Author: xiaoa
Latest version: 0.0.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

### About

> @neural-nexus/portal-channel

### Feature

* 🤝 支持 iframe 及非 iframe 执行环境
* 📢 支持不同执行环境之间的广播通信
* 🚀 支持 iframe 的监听句柄不受限制

### install


**step 1: install**

```shell
$ npm install
```

### Core Api

#### setup

> 建立广播 📢 信道的前提是，需要使用 `setup` 进行初始化，建议在主应用合适的地方执行该方法一次即可

```javascript
import { channel } from '@neural-nexus/portal-channel';
channel.setup()
```

#### on

> 监听 `channel` 消息，不管是来自于直接发送到 `channel` 的还是转发到 `channel` 的，返回一个移除监听器的句柄

```javascript
import { channel } from '@neural-nexus/portal-channel';

const remove = channel.on('iframe-broadcast', (payload) => {
  alert(`in qiankun: ${JSON.stringify(payload)}`)

  // 移除监听器
  remove()
})
```

⚠️ **iframe 上下文里监听消息**

> 由于 `structured clone algorithm` 的 🚫 限制，iframe 中监听的 callback 需要使用 cb.autoRun 进行包装

```javascript
import { channel, cb } from '@neural-nexus/portal-channel';

// cb.autoRun 的魔法在于
// 1. 它突破了 structured clone algorithm 的限制
// 2. 将执行权转交至当前所在上下文
channel.on('qiankun-broadcast', cb.autoRun((payload) => {
  alert(`in iframe: ${JSON.stringify(payload)}`)
}))
```

#### broadcast

> 向 `channel` 发送广播 📢 消息，`channel` 会向上下文发送特定消息


```javascript
import { channel } from '@neural-nexus/portal-channel';

setTimeout(() => {
  channel.broadcast('qiankun-broadcast', { key: 'hello, I am qianku.' })
}, 5000)
```

#### send

> 只向 `channel` 单向发送消息，通过 `send` 发送到 `channel` 的消息，可以在 `channel` 监听，但是无法 📢 广播到其他上下文

```javascript
import { channel } from '@neural-nexus/portal-channel';

channel.send(message, payload);
```

### Enable Debug Mode

```javascript
import { channel } from '@neural-nexus/portal-channel';

channel.debug();
```

### 和 iframe 握手通信

#### handshake

> see https://github.com/dollarshaveclub/postmate


```javascript
const disconnect = channel.handshake({
  container: DOM_NODE,
  url: IFRAME_URL,
  name: NAME, // required, 必须声明 
  classListArray: [], // 你可以自行添加的 classList
});

// 请在合适的地方断开握手，释放连接
disconnect();
```
npm package: @neuralbase-org/js
Description: Official JavaScript client for the NeuralBase memory and ingest API.
Latest version: 0.1.1

# `@neuralbase-org/js`

Official JavaScript client for the NeuralBase API.

## Install

```bash
npm install @neuralbase-org/js
```

## Use

```ts
import { NeuralBaseClient } from "@neuralbase-org/js";

const nb = new NeuralBaseClient({
  apiKey: "nb_live_...",
});

const queued = await nb.ingestConversation(
  {
    userId: "user_123",
    source: "intercom",
    externalId: "conv_987",
    data: {
      title: "Refund request",
      messages: [
        { role: "user", content: "I need help with a refund." },
        { role: "assistant", content: "Refund review started." }
      ]
    }
  },
  { idempotencyKey: "conv_987-v1" }
);

console.log(queued.memoryId);
```

## Included methods

- `store()`
- `ingest()`
- `ingestBatch()`
- `ingestConversation()`
- `ingestSupportTicket()`
- `ingestDocument()`
- `getMemoryStatus()`
npm package: @neuralbase/client
Description: Frontend chat SDK for NeuralBase.
Author: NeuralBase
Latest version: 1.1.0

# @neuralbase/client

Official client SDK for NeuralBase AI services.

## Installation

```bash
npm install @neuralbase/client
```

## Quick Start

```typescript
import { NeuralBase } from '@neuralbase/client';

const client = new NeuralBase({
  baseURL: 'https://api.your-domain.com'
});

// Chat
const response = await client.chat.neural.ask({ question: 'Hello!' });
console.log(response.answer); // "Hello there!"

// Custom Endpoints
const customClient = new NeuralBase({
  baseURL: 'https://api.your-domain.com',
  endpoints: {
    chat: '/api/v1/chat',
    stt: '/api/v1/stt',
    tts: '/api/v1/tts'
  }
});
```

## API Reference

### `new NeuralBase(config)`

| Option | Type | Default | Description |
|---|---|---|---|
| `baseURL` | `string` | _Required_ | API endpoint |
| `timeout` | `number` | `30000` | Request timeout (ms) |
| `contextId` | `string` | `undefined` | Default RAG context ID |
| `endpoints` | `object` | `{}` | Custom API paths (chat, stt, tts) |

#### Default Endpoints

| Feature | Path |
|---|---|
| Chat | `/chat/context` |
| STT | `/stt` |
| TTS | `/tts` |

### Methods

#### `client.chat.neural.ask(request)`

```typescript
interface ChatRequest {
  question: string;
  contextId?: string;
}

interface ChatResponse {
  answer: string;      // HTML formatted
  answerClean: string; // Plain text
  sources: Source[];   // RAG citations
}
```

#### Voice

- `client.voice.stt.transcribe(audio: Blob | Buffer)`: Returns `{ text: string }`
- `client.voice.tts.generate(text: string, options: TTSOptions)`: Returns `ArrayBuffer` (WAV)

## Examples

See [examples/nextjs-sdk-test](../examples/nextjs-sdk-test) for a complete Next.js implementation including voice features.

## License

MIT
npm package: @neuralbase/server
Description: Server-side library for NeuralBase API - uses API keys to communicate with the NeuralBase API (backend only)
Author: NeuralBase
Latest version: 1.0.0

# @neuralbase/server

Official Server-Side SDK for NeuralBase. Securely interact with NeuralBase AI services from your backend.

## Installation

```bash
npm install @neuralbase/server
```

## Configuration

The SDK automatically reads credentials from environment variables. Add these to your `.env` file:

```env
NEURALBASE_API_KEY=your_api_key_here
NEURALBASE_BASE_URL=https://api.neuralbase.com/v1
NEURALBASE_CONTEXT_ID=your_rag_context_id
```

## Usage

### Initialize

```typescript
import { NeuralBase } from '@neuralbase/server';

// Automatically configured via process.env
const nb = new NeuralBase();
```

### Chat (RAG)

```typescript
const response = await nb.chat.ask(
  "What is the capital of France?", 
  "optional-context-id-override" // defaults to env var if omitted
);

console.log(response.answer);
```

### Voice (Speech-to-Text)

```typescript
// Transcribe an audio file
const { text } = await nb.voice.stt.transcribeFile('./audio.wav');
console.log(text);

// Transcribe raw buffer
const { text } = await nb.voice.stt.transcribe(audioBuffer);
```

### Voice (Text-to-Speech)

```typescript
import fs from 'fs';

// Generate speech from text
const audioBuffer = await nb.voice.tts.generate('Hello world', {
  voice: 'alloy', // optional
  language: 'en'  // optional
});

fs.writeFileSync('output.wav', Buffer.from(audioBuffer));
```

## API Reference

### Environment Variables

| Variable | Required | Description |
|---|---|---|
| `NEURALBASE_API_KEY` | ✅ Yes | Your API key |
| `NEURALBASE_BASE_URL` | ✅ Yes | API Endpoint URL |
| `NEURALBASE_CONTEXT_ID` | ✅ Yes | Default Context ID for RAG requests |

## License

MIT

## Installation

```bash
npm install @neuralbase/server
```

## Configuration

You **MUST** set the following environment variables in your `.env` file:

```env
NEURALBASE_API_KEY=your_api_key_here
NEURALBASE_CONTEXT_ID=your_rag_context_id
NEURALBASE_BASE_URL=https://api.your-domain.com
```

## Quick Start

```typescript
import { NeuralBase } from '@neuralbase/server';

// No config needed - reads from process.env
const client = new NeuralBase();

// Chat
const response = await client.chat.neural.ask({ question: 'Hello!' });
console.log(response.answer);

// Voice (STT)
const { text } = await client.voice.stt.transcribe(audioBuffer);
```

## API Reference

### `new NeuralBase(config?)`

Configuration is optional as credentials are read from environment variables.

| Option | Type | Default | Description |
|---|---|---|---|
| `timeout` | `number` | `30000` | Request timeout (ms) |

### Environment Variables

| Variable | Required | Description |
|---|---|---|
| `NEURALBASE_API_KEY` | ✅ Yes | Your API key |
| `NEURALBASE_CONTEXT_ID` | ✅ Yes | Default Context ID for RAG requests |
| `NEURALBASE_BASE_URL` | ✅ Yes | API Endpoint URL |

## License

MIT
npm package: @neuralbertatech/react
Description: UI react framework built on top of natUI.
Latest version: 0.2.1

# natUI-react
![MIT License](https://img.shields.io/github/license/neuralbertatech/natUI-react)
[![CI Test](https://github.com/neuralbertatech/natUI-react/actions/workflows/yarn-test.yml/badge.svg)](https://github.com/neuralbertatech/natUI-react/actions/workflows/yarn-test.yml)
[![Deploy docs](https://github.com/neuralbertatech/natUI-react/actions/workflows/pages.yaml/badge.svg)](https://github.com/neuralbertatech/natUI-react/actions/workflows/pages.yaml)

NeurAlbertaTech's react components using [natUI](https://github.com/neuralbertatech/natUI).

Checkout our [docs](https://ui.react.neuralberta.tech/).
npm package: @neuralbertatech/ui
Description: NeurAlbertaTech's scss framework built on top of bulma.
Latest version: 0.1.5

# natUI
![MIT License](https://img.shields.io/github/license/neuralbertatech/natUI)

NeurAlbertaTech's scss framework built on top of bulma.

## Install
To add this to your project, run
```bash
# npm
npm i @neuralbertatech/
# yarn
yarn add @neuralbertatech/ui
```

## Documentation
Since this is built on top of bulma, you can refer to their [documentation](https://bulma.io/documentation/) for most things. You can checkout x for the changes we've made on top.

## Development
To run the development environment and start contributing, you'll need to use a [devcontainer](https://containers.dev/). 

Once you've opened the program in a devcontainer, open a terminal and run
```bash
yarn dev
```
to start the sass watcher. This will automatically create a `css/` folder which will contain the output file `main.css`. You can use this css file as the stylesheet for testing purposes. You can find test sites in the `test/` folder.
npm package: @neuralcompute/afs-api-cli
Description: Simple CLI for Google AI models - works in 60 seconds
Author: AFS Development Team
Latest version: 1.0.1

# AFS API CLI

Simple CLI for Google AI models. Works in 60 seconds.

## Installation

```bash
npm install -g afsapi-cli
```

## Quick Start

### 1. Configure your API key

```bash
afsapi config set-key sk_your_api_key_here
```

### 2. Generate text

```bash
afsapi generate --prompt "Write a haiku about coding"
```

### 3. Interactive chat

```bash
afsapi chat
```

## Commands

### `afsapi config set-key <key>`
Set your API key for authentication.

### `afsapi generate`
Generate AI completions.

Options:
- `-m, --model <model>` - Model to use (default: gemini-flash)
- `-p, --prompt <prompt>` - Your prompt
- `-t, --temperature <temp>` - Temperature 0-1 (default: 0.7)
- `--max-tokens <tokens>` - Max tokens (default: 1000)

### `afsapi chat`
Start an interactive chat session.

Options:
- `-m, --model <model>` - Model to use (default: gemini-flash)

### `afsapi test`
Test your API connection.

## Examples

```bash
# Simple generation
afsapi generate --prompt "Explain quantum computing"

# Use a different model
afsapi generate --model gemini-pro --prompt "Write a poem"

# Adjust temperature for creativity
afsapi generate --prompt "Story idea" --temperature 0.9

# Interactive chat with specific model
afsapi chat --model gemini-pro
```

## Models

Available models:
- `gemini-flash` - Fast, efficient (default)
- `gemini-pro` - More capable
- `gemini-pro-vision` - Multimodal
- `gemini-ultra` - Most capable

## Support

- Website: https://afsapi.ai
- Documentation: https://afsapi.ai/docs
- Issues: https://github.com/afsapi/afsapi-cli/issues

## License

MIT
npm package: @neuralegion/capture-har
Description: **THIS REPO HAS BEEN DEPRECATED. THE DEVELOPMENT HAS MOVED TO A NEW REPOSITORY: https://github.com/NeuraLegion/har-sdk**
Author: Artem Derevnjuk
Latest version: 0.3.5
Deprecated: the development has moved to a new repository: https://github.com/neuralegion/har-sdk

# capture-har

**THIS REPO HAS BEEN DEPRECATED. THE DEVELOPMENT HAS MOVED TO A NEW REPOSITORY: https://github.com/NeuraLegion/har-sdk**

Fetch requests in HAR format

This module makes a request and captures it as a [HAR](http://www.softwareishard.com/blog/har-12-spec/) object.
Under the covers it uses [request](https://www.npmjs.com/package/request) and just passes through all options.
Currently only GET requests are supported although other methods will probably work. The request body might not be properly captured though.

It can now be also used in stream mode. This means that it will stream data events containing the body of the response and then at the end event, the HAR object will be accessible.

## API

```js
// Promise mode
const captureHar = require('@neuralegion/capture-har');
captureHar({
  url: 'http://www.google.com'
}, { withContent: false })
  .then(har => {
    console.log(JSON.stringify(har, null, 2));
  });

// Stream mode
const CaptureHar = require('@neuralegion/capture-har').CaptureHar;
const captureHar = new CaptureHar(require('request'));
captureHar.start({ url: 'http://www.google.com' })
  .on('data', data => // data event will contain the response body as it is received)
  .on('end', () => {
    const har = captureHar.stop();
    // har will contain the HAR object
    })
```

The result of code this can be found in [example.json](https://github.com/Woorank/capture-har/blob/master/example.json).

### `captureHar`

```
captureHar(Object|String requestOptions, [ Object harOptions ]) -> Promise<Object>
```

#### `requestOptions`

The [options](https://www.npmjs.com/package/request#requestoptions-callback) for making the request, is just passed through to request package.
This can accept the url directly.

#### `harOptions`

Optional configuration for the resulting HAR object.

##### `withContent`

Defaults to `true`. Specifies whether the response content object should contain the full body of the response.

##### `maxContentLength`

Defaults to `Infinity`. Limits the response body to a maximum byte size.
If the response body is larger than the specified limit, the content text won't exist and an error will be returned for this entity with the code `MAX_RES_BODY_SIZE`.
npm package: @neuralegion/karma-nexmock-reporter
Description: Reporter for saving request mocks to file.
Author: Artem Derevnjuk
Latest version: 1.0.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# karma-nexmock-reporter

The reporter for saving request mocks to file.

## Installation

The easiest way is to keep `karma-nexmock-reporter` as a devDependency in your `package.json`.
```json
{
  "devDependencies": {
    "karma": "~0.10",
    "@neuralegion/nexmock": "~1.0",
    "@neuralegion/karma-nexmock-reporter": "~1.0"
  }
}
```

You can simple do it by:
```bash
npm install @neuralegion/karma-nexmock-reporter --save-dev
```

## Configuration

```js
module.exports = (config) => config.set({
    reporters: ['progress', 'nexmock'],
    plugins: [
      '@neuralegion/karma-nexmock-reporter'
    ],
    nexmock: {
      path: "./.nexmock"
    }
});
```

You can pass list of reporters as a CLI argument too:
```bash
karma start --reporters nexmock
```
npm package: @neuralegion/mocha-nexmock-reporter
Description: The reporter for saving request mocks to file.
Author: Artem Derevnjuk
Latest version: 1.0.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# mocha-nexmock-reporter

The reporter for saving request mocks to file.

## Installation

The easiest way is to keep `mocha-nexmock-reporter` as a devDependency in your `package.json`.
```json
{
  "devDependencies": {
    "mocha": "~1.3.0",
    "@neuralegion/nexmock": "~1.0",
    "@neuralegion/mocha-nexmock-reporter": "~1.0"
  }
}
```

You can simple do it by:
```bash
npm install @neuralegion/mocha-nexmock-reporter --save-dev
```

## Configuration

```js
module.exports = {
    reporter: '@neuralegion/mocha-nexmock-reporter',
    reporterOptions: {
      path: "./.nexmock"
    }
};
```

You can pass list of reporters as a CLI argument too:
```bash
mocha --reporter @neuralegion/mocha-nexmock-reporter --reporter-options path=./.nexmock
```
npm package: @neuralegion/nexmock
Description: Mock http requests made using fetch (or isomorphic-fetch)
Author: Artem Derevnjuk
Latest version: 1.1.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# nexmock

Mock http requests made using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch) based on [fetch-mock](https://github.com/wheresrhys/fetch-mock) 

![node version](https://img.shields.io/node/v/fetch-mock.svg?style=flat-square)
[![licence](https://img.shields.io/npm/l/fetch-mock.svg?style=flat-square)](https://github.com/wheresrhys/fetch-mock/blob/master/LICENSE)

```js
fetchMock.mock('http://example.com', 200);
const res = await fetch('http://example.com');
assert(res.ok);
fetchMock.restore();
```

## Requirements

fetch-mock requires the following to run:

- [Node.js](https://nodejs.org/) 8+ for full feature operation
- [npm](https://www.npmjs.com/package/npm) (normally comes with Node.js)
- Either of the following
  - [karma-nexmock-reporter](https://github.com/NeuraLegion/karma-nexmock-reporter) (karma reporter)
  - [mocha-nexmock-reporter](https://github.com/NeuraLegion/mocha-nexmock-reporter) (mocha reporter)
  - [node-fetch](https://www.npmjs.com/package/node-fetch) when testing in a nodejs
  - A browser that supports the `fetch` API when testing in a browser

## Documentation and Usage

See the [fork website](http://www.wheresrhys.co.uk/fetch-mock/) and [example](https://github.com/NeuraLegion/fetch-mock/blob/master/example)

## License

nexmock is licensed under the [MIT](https://github.com/NeuraLegion/fetch-mock/blob/master/LICENSE) license.
Copyright © 2019, NeuraLegion

## Third-party license 

fetch-mock is licensed under the [MIT](https://github.com/NeuraLegion/fetch-mock/blob/master/LICENSE) license.
Copyright © 2019, Rhys Evans
npm package: @neuralegion/nexploit-cli
Description: NexPloit CLI is a CLI tool that can initialize, stop, polling and maintain scans in NeuraLegions solutions (Such as NexPloit).
Author: Artem Derevnjuk
Latest version: 9.2.0
Deprecated: This package is no longer supported and has been deprecated. It has been relocated under a new npm scope called @bright. We highly recommend that you transition to @brightsec/cli to ensure ongoing support and access to the latest features and enhancements.
npm package: @neuralegion/oas2har
Description: Generate HAR objects from OAS
Author: Artem Derevnjuk
Latest version: 0.7.2
Deprecated: the development has moved to a new repository: https://github.com/neuralegion/har-sdk

# oas2har

**THIS REPO HAS BEEN DEPRECATED. THE DEVELOPMENT HAS MOVED TO A NEW REPOSITORY: https://github.com/NeuraLegion/har-sdk**

Transform you Swagger OAI spec files to a series of HAR request objects.

* http://swagger.io/specification/
* http://www.softwareishard.com/blog/har-12-spec/#request

## Setup

```bash
npm i --save @neuralegion/oas2har
```

## Usage

Using as a ES module:
```js
import { oasToHarList } from '@neuralegion/oas2har';
import swaggerJSON from 'your-swagger-api.json'; // e.g. http://petstore.swagger.io/v2/swagger.json

oasToHarList(swaggerJSON)
  .then((har) => {
    console.log(har);
  });
```


## Testing

```bash
npm run test
```
npm package: @neuralegion/openapi-sampler
Description: Tool for generation samples based on OpenAPI payload/response schema
Latest version: 0.7.3
Deprecated: the development has moved to a new repository: https://github.com/neuralegion/har-sdk

# openapi-sampler

**THIS REPO HAS BEEN DEPRECATED. THE DEVELOPMENT HAS MOVED TO A NEW REPOSITORY: https://github.com/NeuraLegion/har-sdk**

Tool for generation samples based on OpenAPI payload/response schema

## Features
- deterministic (given a particular input, will always produce the same output)
- Supports `allOf`
- Supports `additionalProperties`
- Uses `default`, `const`, `enum` and `examples` where possible
- Full array support: supports `minItems`, and tuples (`items` as an array)
- Supports `minLength`, `maxLength`, `min`, `max`, `exclusiveMinimum`, `exclusiveMaximum`
- Supports the next `string` formats:
  - email
  - password
  - date-time
  - date
  - ipv4
  - ipv6
  - hostname
  - uri
- Infers schema type automatically following same rules as [json-schema-faker](https://www.npmjs.com/package/json-schema-faker#inferred-types)
- Support for `$ref` resolving

## Installation

Install using [npm](https://docs.npmjs.com/getting-started/what-is-npm)

    npm install @neuralegion/openapi-sampler --save

or using [yarn](https://yarnpkg.com)

    yarn add @neuralegion/openapi-sampler

Then require it in your code:

```js
var OpenAPISampler = require('@neuralegion/openapi-sampler');
```

## Usage
#### `OpenAPISampler.sample(schema, [options], [spec])`
- **schema** (_required_) - `object`
A [OpenAPI Schema Object](http://swagger.io/specification/#schemaObject)
- **options** (_optional_) - `object`
Available options:
  - **skipNonRequired** - `boolean`
  Don't include non-required object properties not specified in [`required` property of the schema object](https://swagger.io/docs/specification/data-models/data-types/#required)
  - **skipReadOnly** - `boolean`
  Don't include `readOnly` object properties
  - **skipWriteOnly** - `boolean`
  Don't include `writeOnly` object properties
  - **quiet** - `boolean`
  Don't log console warning messages
- **spec** - whole specification where the schema is taken from. Required only when schema may contain `$ref`. **spec** must not contain any external references

## Example
```js
const OpenAPISampler = require('.');
OpenAPISampler.sample({
  type: 'object',
  properties: {
    a: {type: 'integer', minimum: 10},
    b: {type: 'string', format: 'password', minLength: 10},
    c: {type: 'boolean', readOnly: true}
  }
}, {skipReadOnly: true});
// { a: 10, b: 'pa$$word_q' }
```
npm package: @neuralegion/passport-headerapikey
Description: Api key authentication strategy for Passport, which only handles headers (not body fields).
Author: Artem Derevnjuk
Latest version: 1.2.2

# Passport-HeaderAPIKey

[Passport](http://passportjs.org/) strategy for authenticating with a apikey.

This module lets you authenticate using a apikey in your Node.js
applications which is used to build rest apis. By plugging into Passport, apikey authentication can be easily and
unobtrusively integrated into any application or framework that supports
[Connect](http://www.senchalabs.org/connect/)-style middleware, including
[Express](http://expressjs.com/).

## Installation

    $ npm install @neuralegion/passport-headerapikey

## Usage

#### Configure Strategy

The api key authentication strategy authenticates users using a apikey.
The strategy requires a `verify` callback, which accepts these
credentials and calls `done` providing a user.

```javascipt
    const HeaderAPIKeyStrategy = require('passport-headerapikey').HeaderAPIKeyStrategy
    
    passport.use(new HeaderAPIKeyStrategy(
      { header: 'Authorization', prefix: 'Api-Key' },
      (apikey, done) => {
        User.findOne({ apikey: apikey }, (err, user) => {
          if (err) { return done(err); }
          if (!user) { return done(null, false); }
          return done(null, user);
        });
      }
    ));
```
#### Authenticate Requests

Use `passport.authenticate()`, specifying the `'headerapikey'` strategy, to
authenticate requests.

For example, as route middleware in an [Express](http://expressjs.com/)
application:

    app.post('/api/authenticate', 
      passport.authenticate('headerapikey', { session: false, failureRedirect: '/api/unauthorized' }),
      function(req, res) {
        res.json({ message: "Authenticated" })
      });
  
## Examples

    curl -v --header "Authorization: Api-Key asdasjsdgfjkjhg" http://127.0.0.1:3000/api/authenticate
npm package: @neuralegion/postman2har
Description: **THIS REPO HAS BEEN DEPRECATED. THE DEVELOPMENT HAS MOVED TO A NEW REPOSITORY: https://github.com/NeuraLegion/har-sdk**
Author: Artem Derevnjuk
Latest version: 1.3.2
Deprecated: the development has moved to a new repository: https://github.com/neuralegion/har-sdk

# @neuralegion/postman2har

**THIS REPO HAS BEEN DEPRECATED. THE DEVELOPMENT HAS MOVED TO A NEW REPOSITORY: https://github.com/NeuraLegion/har-sdk**

Transform you Postman collection to a series of HAR request objects.

- https://schema.getpostman.com/collection/json/v2.1.0/draft-07/docs/index.html
- http://www.softwareishard.com/blog/har-12-spec/#request

## Setup

```bash
npm i --save @neuralegion/postman2har
```

## 🚀 Usage

Using as a ES module:

```js
import { postman2har } from '@neuralegion/postman2har';
import collection from 'your-postman-collection.json';

postman2har(collection).then((requests) => {
  console.log(requests);
});
```

If you want to pass additional data to resolve environment variables you can pass them via options:
```js
postman2har(collection, {
  environment: { baseUrl: 'https://example.com' }
}).then((requests) => {
  console.log(requests);
});
```

## 📝License

Copyright © 2020 [NeuraLegion](https://github.com/NeuraLegion).

This project is licensed under the MIT License - see the [LICENSE file](LICENSE) for details.
npm package: @neuralfog/elemix-storybook
Description: bash ``` npx storybook@latest init --type web_components ```
Author: brownhounds
Latest version: 0.0.1

## Notes

bash
```
npx storybook@latest init --type web_components
```

Storybook wizard is ass, so have to create `tsconfig.json` first in order to bootstrap typescript project.

## TODO

- [x] This was easy just works
- [] Cant have globals in stories it will mess up concurrent runs of stories:
    - [] Application context is static class, needs changing
    - [] Application context inject in stories somehow
    - [] Signals are also global states that may be used by multiple components
        - [] Need to find a way to stub signals per story, this is not easy, it is
        but ergonomics matter, at moment signal are injected at the decorator stage :thinking:
    - [] Write helpers in testing package to pierce shadow dom and wait for element
npm package: @neuralline/tidy
Description: Removes node modules and build time files from your project directories and sub directories
Author: Darik Hart
Latest version: 0.0.4

# TIDY

Removes node modules and build time files from your project directories. Silently uninstall dependencies 💨.

```sh

    Neural Line
    Neat and controlled.
    T.I.D.Y ~/ˈtʌɪdi/
    cli version 0.0.4 - 2020

```

## Installation

```sh
npm i -g @neuralline/tidy
yarn add -g @neuralline/tidy

then you can use 'tidy' cli on your terminal

or
npx @neuralline/tidy

```

## Example

```sh
After installation
type 'tidy' to list available options, atm [scan, clean, help]
type 'tidy scan' or 'tidy up' on your terminal to scan or remove unnecessary files from your project directories and sub directories

```

## Description

```sh
Finds and Removes installed npm dependencies, node_modules, cache and other build time files/directories from your machine. If you are like me, clone git projects to test, revers engineer or use create-react-app a lot chances are there are huge npm dependencies installed every where. Sometimes twice [server, client]. This cli app will help you keep your project neat and tidy

```

## Why

```sh
- Tidy removes downloaded dependencies and build time files silently. Since these files are not meant to be tracked by git no further action required. type install when its time.

- No need to do it individually for each project. Tidy is automated

- Also provides other related information, like number of project directories with package.json etc...

- Uses all the latest technologies JavaScript and Node could offer in 2020



```

## Watched files

```sh
- clean removes [node_modules, .cache, .yarn, .pnp] files
- scan tracks [.vscode, .idea, .yarn-error.log, build , dist]


```

### What's new on V0.04

```sh
- destructuring and unit testing
- performance improvement
- uses the new Promise.allSettled module
- might require Node 12 to run
- built with 'Node 14'
- shake down some dependencies and went native
- full TypeScript
- transpile to 'ESNEXT'


```

### ...

```sh

Q0.0U0.0A0.0N0.0T0.0U0.0M0 - I0.0N0.0C0.0E0.0P0.0T0.0I0.0O0.0N0.0S0

```
npm package: @neuralsea/react-parallel-timeline
Description: An extensible, Gantt-style “parallel processes” timeline component for React.
Latest version: 0.1.5

# @neuralsea/react-parallel-timeline

An extensible, Gantt-style “parallel processes” timeline component for React.

## Install

```bash
npm i @neuralsea/react-parallel-timeline
```

Peer deps: `react`, `react-dom` (React 19).

## Usage

```tsx
import { Timeline } from "@neuralsea/react-parallel-timeline";
import "@neuralsea/react-parallel-timeline/styles.css";

export function Example() {
  return (
    <Timeline
      lanes={[{ id: "ui", label: "UIAgent", color: "#4C8DFF" }]}
      items={[
        { id: "a", laneId: "ui", start: 0, end: 10_000, label: "draft", status: "responding" },
      ]}
      defaultView={{ start: 0, end: 60_000 }}
      now={12_345}
      grid={{ show: true }}
      axes={{ showLaneAxis: true, showTimeAxis: true, timeOrigin: 0 }}
      motion={{ mode: "auto" }}
    />
  );
}
```

## Links

- Repo: https://github.com/emmett08/react-parallel-timeline-starter
npm package: @neuralyze.io/analytics-next-server
Description: Neuralyze Analytics Next.js Server Components
Author: w3debugger
Latest version: 0.0.1-alpha.6

# Universal Analytics - Next.js Server

Privacy-first analytics for Next.js server components and server actions.

## Installation

```bash
npm install @neuralyze.io/analytics-next-server
```

## Usage

### Basic Usage

```javascript
// app/lib/analytics.js
'use server';

import { createAnalytics } from '@neuralyze.io/analytics-next-server';

const analytics = createAnalytics({
  apiKey: process.env.NEURALYZE_API_KEY,
  environment: process.env.NEURALYZE_ENV_ID
});

export { analytics };
```

### Track Page Views

```javascript
import { analytics } from './lib/analytics';

export default async function Page() {
  // Track page view
  await analytics.trackPageView({
    url: '/dashboard',
    title: 'Dashboard',
    referrer: 'https://example.com'
  });

  return <div>Page content</div>;
}
```

### Track Server Actions

```javascript
import { analytics } from './lib/analytics';

async function handleFormSubmit(formData) {
  'use server';
  
  // Track form submission
  await analytics.trackServerAction('form_submit', {
    formId: 'contact',
    email: formData.get('email')
  });
}
```

### Track API Routes

```javascript
export async function POST(request) {
  // Track API usage
  await analytics.trackServerAction('form_submit', {
    endpoint: '/api/contact',
    method: 'POST'
  });
}
```

### Batch Processing

For efficient processing of multiple events:

```javascript
// app/lib/batch-analytics.js
'use server';

import { AnalyticsBatch } from '@neuralyze.io/analytics-next-server';

const batch = new AnalyticsBatch({
  apiKey: process.env.NEURALYZE_API_KEY,
  environment: process.env.NEURALYZE_ENV_ID,
  batchSize: 10, // Process in batches of 10
  flushInterval: 5000 // Flush every 5 seconds
});

export { batch };
```

## API Reference

### UniversalAnalytics

- `trackPageView(url, options)` - Track page views with optional metadata
- `trackServerAction(name, data)` - Track server actions and API routes
- `getSessionData(sessionId)` - Get session analytics data

### AnalyticsBatch

- `addEvent(name, data)` - Add event to batch queue
- `flush()` - Manually flush queued events
- `setConfig(config)` - Update batch configuration

## Environment Variables

```env
NEURALYZE_API_KEY=your-api-key
NEURALYZE_ENV_ID=your-environment-id
```

## License

MIT