open-index/open-npm huggingface dataset:
npm package: @llms-sdk/decorators-demo
Description: Example app demonstrating LLMS SDK decorators usage
Author: Lenny Miller
Latest version: 2.2.0

# LLMS SDK Adorn Example

This example application demonstrates the various features of the `@llms-sdk/decorators` package.

## Features Demonstrated

1. **Basic Documentation Generation** - Parse code and comments to generate HTML documentation
2. **LLM-Powered Annotations** - Use AI to add intelligent explanations to code
3. **Multiple File Documentation** - Process multiple files and generate an index
4. **Literate Programming** - Support for literate CoffeeScript style documentation

## Setup

```bash
# Install dependencies
npm install

# Build the example
npm run build
```

## Running the Examples

```bash
# Run all examples
npm start

# Or run directly
node dist/index.js
```

### With LLM Annotations

To enable AI-powered annotations, set your Anthropic API key:

```bash
export ANTHROPIC_API_KEY="your-api-key"
npm start
```

## Example Output

The examples will generate several files:

- `factorial-docs.html` - HTML documentation for a factorial function
- `docs-index.html` - Index page for multiple file documentation

## Individual Examples

You can also import and run individual examples:

```typescript
import { basicExample, annotationExample } from "@lennylmiller/adorn-example";

await basicExample();
await annotationExample();
```

## Use Cases

### 1. Static Documentation Generation

Generate beautiful HTML documentation from your source code:

```typescript
const adorn = new Adorn({ layout: "parallel" });
const result = await adorn.document("myfile.js", sourceCode);
await writeFile("docs.html", result.html);
```

### 2. Terminal Documentation

View documentation directly in your terminal:

```typescript
const adorn = new Adorn({ layout: "terminal" });
const result = await adorn.document("myfile.py", sourceCode);
console.log(result.terminal);
```

### 3. AI-Enhanced Documentation

Add intelligent annotations to your code:

```typescript
const client = promptsync.anthropic({ apiKey: "your-key" });
const adorn = new Adorn();
const result = await adorn.annotate("complex.ts", complexCode, "Explain the performance characteristics");
```

### 4. Integration with Build Tools

Integrate into your build process to generate documentation automatically:

```json
{
	"scripts": {
		"docs": "node generate-docs.js"
	}
}
```

## Next Steps

- Explore different layout options (parallel, linear, terminal)
- Customize syntax highlighting themes
- Add custom language definitions
- Integrate with your CI/CD pipeline
npm package: @llms-sdk/router
Description: Lightweight router with signals integration for LLMS SDK
Author: Lenny Miller
Latest version: 2.2.0

# @llms-sdk/router

Lightweight router with signals integration for LLMS SDK applications.

## Features

- 🔒 **Zero vulnerabilities** - Custom implementation eliminates CVE-2024-45296
- 📦 **Minimal bundle size** - <2KB gzipped vs 15KB+ for @vaadin/router  
- ⚡ **Signal integration** - Built with @preact/signals for reactive state
- 🌐 **History API** - Full browser navigation support
- 🎯 **Path parameters** - Support for `/users/:id` patterns
- 🔍 **Query parsing** - Automatic URLSearchParams handling

## Installation

```bash
npm install @llms-sdk/router
```

## Quick Start

```typescript
import { LLMSRouter } from '@llms-sdk/router';

// Create router instance
const router = new LLMSRouter();

// Add routes
router.addRoute('/users/:id', (route) => {
  console.log('User ID:', route.params.id);
});

router.addRoute('/posts/:postId/comments/:commentId', (route) => {
  console.log('Post:', route.params.postId, 'Comment:', route.params.commentId);
});

// Start the router
router.start();

// Navigate programmatically
router.navigate('/users/123');
router.navigate('/posts/456/comments/789');
```

## API Reference

### LLMSRouter

#### Constructor

```typescript
new LLMSRouter(config?: RouterConfig)
```

#### Methods

- `addRoute(pattern: string, handler: RouteHandler, meta?: any): void`
- `removeRoute(pattern: string): void`
- `navigate(path: string, options?: NavigateOptions): void`
- `replace(path: string, options?: NavigateOptions): void`
- `back(): void`
- `forward(): void`
- `start(): void`
- `stop(): void`

#### Signals

- `currentRoute: Signal<Route>` - Current route information
- `params: Signal<Record<string, string>>` - Path parameters
- `query: Signal<URLSearchParams>` - Query parameters
- `isNavigating: Signal<boolean>` - Navigation state

## Integration with ViewOrchestrator

```typescript
import { LLMSRouter } from '@llms-sdk/router';
import { setLayoutMode, setStakeholderRole } from './state/multi-view-state.js';

const router = new LLMSRouter();

// Sync layout mode with URL
router.addRoute('/layout/:mode', (route) => {
  setLayoutMode(route.params.mode);
});

// Sync stakeholder role with URL
router.addRoute('/role/:role', (route) => {
  setStakeholderRole(route.params.role);
});

// Combined routes
router.addRoute('/role/:role/layout/:mode', (route) => {
  setStakeholderRole(route.params.role);
  setLayoutMode(route.params.mode);
});

router.start();
```

## Security

This router is designed to be secure by default:

- No external dependencies with vulnerabilities
- Input validation and sanitization
- XSS prevention through proper escaping
- Content Security Policy compatible

## Performance

- Bundle size: <2KB gzipped
- Zero runtime dependencies
- Efficient pattern matching
- Minimal memory footprint

## License

MIT