1.0.3 • Published 7 months ago
@nestai/assistant-core v1.0.3
@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 buildOutputs 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 dependenciesThreadStorage— Interface for pluggable state handlingVueThreadStorage— Vue 3ref-based reactive storageuseReactThreadStorage— ReactuseRef-based storageVanillaThreadStorage— Simple runtime variable (non-reactive)
🛠 Publish to NPM
Make sure you're logged in:
npm loginThen publish:
npm publish --access public📝 License
MIT © NestAI Multi-agents systems