1.0.3 • Published 7 months ago

@nestai/assistant-core v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

@nestai/assistant-core

Framework-agnostic assistant core logic with optional reactive storage adapters for Vue, React, and Vanilla JS.


📦 Installation

npm install @nestai/assistant-core
# or
yarn add @nestai/assistant-core

⚙️ Building the package (local dev or publishing)

npm install
npm run build

Outputs will go to the dist/ directory.


🚀 Usage

🧩 Vue 3 / Nuxt 3

import { AssistantService, VueThreadStorage } from '@nestai/assistant-core';

const assistant = new AssistantService(VueThreadStorage);

You can also use the exposed reactive variable:

import { xThread } from '@nestai/assistant-core';

⚛️ React (e.g. Next.js, Vite)

import { AssistantService, useReactThreadStorage } from '@nestai/assistant-core';

const threadStorage = useReactThreadStorage();
const assistant = new AssistantService(threadStorage);

🌐 Vanilla JS / Node.js

import { AssistantService, VanillaThreadStorage } from '@nestai/assistant-core';

const assistant = new AssistantService(VanillaThreadStorage);

📚 Architecture

  • AssistantService — Core logic with no framework dependencies
  • ThreadStorage — Interface for pluggable state handling
  • VueThreadStorage — Vue 3 ref-based reactive storage
  • useReactThreadStorage — React useRef-based storage
  • VanillaThreadStorage — Simple runtime variable (non-reactive)

🛠 Publish to NPM

Make sure you're logged in:

npm login

Then publish:

npm publish --access public

📝 License

MIT © NestAI Multi-agents systems

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago