open-index/open-npm huggingface dataset:
npm package: @soneway/form-engine
Description: form-engine是为解决多表单(成千上万不同的表单)需求
Author: soneway
Latest version: 1.2.0

## 介绍
form-engine是为解决多表单(成千上万不同的表单)需求

## 进入开发

### 开发
```bash
npm run dev
```

### 打包文档
```bash
npm run pack
```

### 打包组件库代码
```bash
npm run dist
```

### lint代码
```bash
npm run lint
```
npm package: @soneway/gdui2
Description: gdui2是基于vue研发的UI组件库
Author: soneway
Latest version: 1.2.0

## 介绍
gdui2是基于vue研发的UI组件库

## 准备动作

### 安装依赖
```bash
npm i
```

## 进入开发

### 开发
```bash
npm run dev
```

### 打包文档
```bash
npm run pack
```

### 打包组件库代码
```bash
npm run dist
```

### lint代码
```bash
npm run lint
```
npm package: @sonex/sdk-core
Description: Core logic and services for Sonex SDK - framework-agnostic chatbot functionality
Author: rijo-utsuk
Latest version: 0.1.0

# @sonex/sdk-core

Core logic and services for Sonex SDK - framework-agnostic chatbot functionality.

## Features

- 🔧 Framework-agnostic core services
- 🔐 Flexible token management (providers, storage adapters, direct injection)
- 📡 API communication layer with session handling
- 📦 State management with observer pattern
- 🎤 Voice transcription support
- 📝 TypeScript first with full type definitions

## Installation

```bash
npm install @sonex/sdk-core
```

## Quick Start

```typescript
import { ChatbotService, ChatbotConfig } from '@sonex/sdk-core';

const config: ChatbotConfig = {
  apiEndpoint: 'https://api.example.com/transcribe',
  sessionEndpoint: 'https://api.example.com/session',
  storage: 'localStorage',
};

const chatbot = new ChatbotService(config);

// Subscribe to state changes
chatbot.subscribe((state, event) => {
  console.log('State updated:', state);
  console.log('Event:', event.type);
});

// Send a message
await chatbot.sendMessage({ content: 'Hello!' });

// Clean up
chatbot.destroy();
```

## Token Management

The SDK supports multiple token management strategies:

### 1. Token Provider (Recommended)

```typescript
const config: ChatbotConfig = {
  apiEndpoint: 'https://api.example.com/transcribe',
  tokenProvider: {
    getToken: () => store.getState().auth.sonexToken,
    onTokenReceived: (token) => store.dispatch(setToken(token)),
    onTokenCleared: () => store.dispatch(clearToken()),
  },
};
```

### 2. Auth Token Provider (For Session API)

```typescript
const config: ChatbotConfig = {
  apiEndpoint: 'https://api.example.com/transcribe',
  sessionEndpoint: 'https://api.example.com/session',
  authTokenProvider: {
    getAuthToken: () => localStorage.getItem('app_auth_token'),
    headerName: 'Authorization', // Optional, defaults to 'Authorization'
  },
};
```

### 3. Storage Adapters

```typescript
const config: ChatbotConfig = {
  apiEndpoint: 'https://api.example.com/transcribe',
  storage: 'localStorage', // or 'sessionStorage' | 'memory' | custom adapter
};
```

## Exports

### Services

- `ChatbotService` - Main service for chat operations
- `SessionService` - Session token management
- `StateManager` - State management with observer pattern

### Storage Adapters

- `localStorageAdapter` - Browser localStorage adapter
- `sessionStorageAdapter` - Browser sessionStorage adapter
- `memoryStorageAdapter` - In-memory storage adapter

### Types

- `ChatbotConfig` - Configuration interface
- `Message`, `MessageRole`, `MessageStatus` - Message types
- `Conversation`, `ConversationMetadata` - Conversation types
- `ChatState`, `ConnectionStatus` - State types
- `TokenProvider`, `AuthTokenProvider`, `TokenStorage` - Token management types

## Documentation

For comprehensive documentation, see:
- [Integration Guide](./docs/INTEGRATION_GUIDE.md)
- [Token Management](./docs/TOKEN_MANAGEMENT.md)

## Related Packages

- `@sonex/sdk-browser` - React widget components (includes this package)
- `@sonex/sdk-node` - Server-side utilities

## License

MIT