open-index/open-npm huggingface dataset:
npm package: @orchard9ai/analytics
Description: Analytics and event tracking utilities for Orchard9 platform
Author: Orchard9
Latest version: 0.0.0

# @orchard9ai/analytics

Analytics and event tracking utilities for the Orchard9 platform.

## Installation

```bash
npm install @orchard9ai/analytics
# or
pnpm add @orchard9ai/analytics
# or
yarn add @orchard9ai/analytics
```

## Usage

```typescript
import { AnalyticsClient } from '@orchard9ai/analytics';

const analytics = new AnalyticsClient({
  apiKey: 'your-api-key',
  debug: process.env.NODE_ENV === 'development',
});

// Track an event
analytics.track('button_clicked', {
  button_name: 'Submit',
  page: '/dashboard',
});

// Identify a user
analytics.identify('user-123', {
  name: 'John Doe',
  email: 'john@example.com',
});

// Track page views
analytics.page('Dashboard', {
  section: 'main',
});
```

## Features

- Event tracking with TypeScript support
- Session management
- User identification
- Performance metrics integration
- Offline support with event batching
- Privacy-first design

## License

MIT © Orchard9
npm package: @orchard9ai/auth
Description: OAuth2/JWT authentication utilities for Orchard9 platform
Author: Orchard9
Latest version: 0.0.0

# @orchard9ai/auth

OAuth2/JWT authentication utilities for Orchard9 platform.

## Installation

```bash
pnpm add @orchard9ai/auth
```

## Usage

```typescript
import auth from '@orchard9ai/auth';

// TODO: Add usage examples
```

## Features

- OAuth2 authentication flow
- JWT token management
- Session handling
- Secure token storage
- Auth state management

## License

MIT
npm package: @orchard9ai/config
Description: Configuration management utilities for Orchard9 platform
Author: Orchard9
Latest version: 0.1.0

# @orchard9ai/config

Configuration management utilities for Orchard9 platform

## Installation

```bash
npm install @orchard9ai/config
# or
pnpm add @orchard9ai/config
# or
yarn add @orchard9ai/config
```

## Usage

```typescript
import {} from /* exports */ '@orchard9ai/config';

// Usage examples coming soon
```

## Features

Coming soon...

## License

MIT © Orchard9
npm package: @orchard9ai/deploy-utils
Description: Deployment utilities for Orchard9 platform
Author: Orchard9
Latest version: 0.0.0

# @orchard9ai/deploy-utils

Deployment utilities for Orchard9 platform

## Installation

```bash
npm install @orchard9ai/deploy-utils
# or
pnpm add @orchard9ai/deploy-utils
# or
yarn add @orchard9ai/deploy-utils
```

## Usage

```typescript
import {} from /* exports */ '@orchard9ai/deploy-utils';

// Usage examples coming soon
```

## Features

Coming soon...

## License

MIT © Orchard9
npm package: @orchard9ai/error-handling
Description: Federated error handling package with go-core-http-toolkit format support and logging integration
Latest version: 0.1.2

# @orchard9ai/error-handling

Graceful HTTP error handling for React applications. Prevents crashes from API errors and provides user-friendly error messages.

## Installation

```bash
npm install @orchard9ai/error-handling
```

## Quick Start

```typescript
import { useHttpClient, ToastProvider, installGlobalErrorHandling } from '@orchard9ai/error-handling';

// 1. Wrap your app with ToastProvider
function App() {
  return (
    <ToastProvider>
      <YourApp />
    </ToastProvider>
  );
}

// 2. Use the HTTP client in components
function MyComponent() {
  const http = useHttpClient({
    baseUrl: 'http://localhost:25820/api/v1'
  });

  const handleSubmit = async (data) => {
    try {
      const result = await http.post('/organizations/register', data);
      console.log('Success:', result.data);
    } catch (error) {
      // Error automatically shown as toast
      // No app crashes!
    }
  };
}
```

## Key Features

- **No More Crashes**: 409 conflicts and other HTTP errors show friendly toasts instead of crashing
- **Auto Cleanup**: Requests automatically abort when components unmount
- **XSS Safe**: All error messages are sanitized
- **React Ready**: Hooks for easy integration

## API Reference

### `useHttpClient(config)`

React hook that creates an HTTP client with automatic cleanup.

```typescript
const http = useHttpClient({
  baseUrl: 'https://api.example.com',
  timeout: 30000,
  enableRetry: false, // Default: false
  showToasts: true,   // Default: true
});

// Make requests
const response = await http.get('/users');
const response = await http.post('/users', { name: 'John' });
const response = await http.put('/users/1', { name: 'Jane' });
const response = await http.delete('/users/1');
```

### `ToastProvider`

Required wrapper component for toast notifications.

```jsx
<ToastProvider config={{
  position: 'top-right',
  autoHideDuration: 5000
}}>
  <App />
</ToastProvider>
```

### `installGlobalErrorHandling(config)`

Optional: Catch unhandled errors globally.

```typescript
installGlobalErrorHandling({
  showToasts: true,
  logToConsole: true,
  ignoredErrors: ['ResizeObserver loop limit exceeded']
});
```

## Error Format

Automatically handles API errors in this format:

```json
{
  "error": "conflict",
  "message": "Organization already exists",
  "code": "organization_conflict",
  "correlation_id": "err_9c20308c",
  "details": {
    "field": "name",
    "value": "Already exists"
  }
}
```

## Best Practices

1. **Always use `useHttpClient`** for HTTP requests (not raw fetch)
2. **Wrap your app** with `ToastProvider` 
3. **Let errors bubble up** - they'll be shown as toasts automatically
4. **Don't enable retry** unless you have specific backoff requirements
5. **Configure base URL** once and reuse the client

## Security

- All error messages are HTML-escaped to prevent XSS
- Sensitive fields (password, token, api_key) are automatically filtered
- Stack traces are never shown to users

## License

MIT
npm package: @orchard9ai/event-bus
Description: Cross-micro communication for Orchard9 platform
Author: Orchard9
Latest version: 0.0.0

# @orchard9ai/event-bus

Cross-micro communication for Orchard9 platform

## Installation

```bash
npm install @orchard9ai/event-bus
# or
pnpm add @orchard9ai/event-bus
# or
yarn add @orchard9ai/event-bus
```

## Usage

```typescript
import {} from /* exports */ '@orchard9ai/event-bus';

// Usage examples coming soon
```

## Features

Coming soon...

## License

MIT © Orchard9
npm package: @orchard9ai/feature-flags
Description: Feature flag management for Orchard9 platform
Author: Orchard9
Latest version: 0.0.0

# @orchard9ai/feature-flags

Feature flag management for Orchard9 platform

## Installation

```bash
npm install @orchard9ai/feature-flags
# or
pnpm add @orchard9ai/feature-flags
# or
yarn add @orchard9ai/feature-flags
```

## Usage

```typescript
import {} from /* exports */ '@orchard9ai/feature-flags';

// Usage examples coming soon
```

## Features

Coming soon...

## License

MIT © Orchard9
npm package: @orchard9ai/i18n
Description: Internationalization utilities for Orchard9 platform
Author: Orchard9
Latest version: 0.0.0

# @orchard9ai/i18n

Internationalization utilities for Orchard9 platform

## Installation

```bash
npm install @orchard9ai/i18n
# or
pnpm add @orchard9ai/i18n
# or
yarn add @orchard9ai/i18n
```

## Usage

```typescript
import {} from /* exports */ '@orchard9ai/i18n';

// Usage examples coming soon
```

## Features

Coming soon...

## License

MIT © Orchard9
npm package: @orchard9ai/logging
Description: Federated logging package for Orchard9 applications
Author: Orchard9
Latest version: 0.1.1

# @orchard9ai/logging

A high-performance, extensible logging library for Orchard9 applications with support for multiple transports, structured logging, and PII safety.

## Features

- 🚀 **High Performance** - Minimal overhead with lazy evaluation
- 🔧 **Extensible** - Multiple transports and formatters
- 🔒 **Secure** - Automatic PII sanitization
- 📊 **Structured** - First-class support for structured logging
- 🌐 **Universal** - Works in browsers, Node.js, and Tauri
- 📦 **Tree-shakeable** - Only include what you use

## Installation

```bash
npm install @orchard9ai/logging
# or
pnpm add @orchard9ai/logging
# or
yarn add @orchard9ai/logging
```

## Quick Start

```typescript
import { createLogger } from '@orchard9ai/logging';

// Create a logger
const logger = createLogger('MyApp');

// Basic logging
logger.info('Application started');
logger.error('Something went wrong', { error });

// With context
const userLogger = logger.child({ userId: '123' });
userLogger.debug('User action', { action: 'clicked' });
```

## Status

This package is currently under development. See [tasks.md](./tasks.md) for the implementation roadmap.

## License

MIT © Orchard9
npm package: @orchard9ai/module-federation-utils
Description: Module Federation helpers for Orchard9 platform
Author: Orchard9
Latest version: 0.0.0

# @orchard9ai/module-federation-utils

Module Federation helpers for Orchard9 platform

## Installation

```bash
npm install @orchard9ai/module-federation-utils
# or
pnpm add @orchard9ai/module-federation-utils
# or
yarn add @orchard9ai/module-federation-utils
```

## Usage

```typescript
import {} from /* exports */ '@orchard9ai/module-federation-utils';

// Usage examples coming soon
```

## Features

Coming soon...

## License

MIT © Orchard9
npm package: @orchard9ai/monitoring
Description: Error tracking and monitoring for Orchard9 platform
Author: Orchard9
Latest version: 0.0.0

# @orchard9ai/monitoring

Error tracking and monitoring for Orchard9 platform

## Installation

```bash
npm install @orchard9ai/monitoring
# or
pnpm add @orchard9ai/monitoring
# or
yarn add @orchard9ai/monitoring
```

## Usage

```typescript
import {} from /* exports */ '@orchard9ai/monitoring';

// Usage examples coming soon
```

## Features

Coming soon...

## License

MIT © Orchard9
npm package: @orchard9ai/performance
Description: Performance monitoring utilities for Orchard9 platform
Author: Orchard9
Latest version: 0.0.0

# @orchard9ai/performance

Performance monitoring utilities for Orchard9 platform

## Installation

```bash
npm install @orchard9ai/performance
# or
pnpm add @orchard9ai/performance
# or
yarn add @orchard9ai/performance
```

## Usage

```typescript
import {} from /* exports */ '@orchard9ai/performance';

// Usage examples coming soon
```

## Features

Coming soon...

## License

MIT © Orchard9
npm package: @orchard9ai/realtime
Description: Real-time collaboration utilities for Orchard9 platform
Author: Orchard9
Latest version: 0.0.0

# @orchard9ai/realtime

Real-time collaboration utilities for Orchard9 platform

## Installation

```bash
npm install @orchard9ai/realtime
# or
pnpm add @orchard9ai/realtime
# or
yarn add @orchard9ai/realtime
```

## Usage

```typescript
import {} from /* exports */ '@orchard9ai/realtime';

// Usage examples coming soon
```

## Features

Coming soon...

## License

MIT © Orchard9
npm package: @orchard9ai/seo
Description: SEO utilities for Orchard9 platform
Author: Orchard9
Latest version: 0.0.0

# @orchard9ai/seo

SEO utilities for Orchard9 platform

## Installation

```bash
npm install @orchard9ai/seo
# or
pnpm add @orchard9ai/seo
# or
yarn add @orchard9ai/seo
```

## Usage

```typescript
import {} from /* exports */ '@orchard9ai/seo';

// Usage examples coming soon
```

## Features

Coming soon...

## License

MIT © Orchard9
npm package: @orchard9ai/types
Description: Shared TypeScript types for Orchard9 platform
Author: Orchard9
Latest version: 0.1.0

# @orchard9ai/types

Shared TypeScript types for Orchard9 platform

## Installation

```bash
npm install @orchard9ai/types
# or
pnpm add @orchard9ai/types
# or
yarn add @orchard9ai/types
```

## Usage

```typescript
import {} from /* exports */ '@orchard9ai/types';

// Usage examples coming soon
```

## Features

Coming soon...

## License

MIT © Orchard9
npm package: @orchard9ai/websocket
Description: WebSocket client for Orchard9 platform
Author: Orchard9
Latest version: 0.0.0

# @orchard9ai/websocket

WebSocket client for Orchard9 platform

## Installation

```bash
npm install @orchard9ai/websocket
# or
pnpm add @orchard9ai/websocket
# or
yarn add @orchard9ai/websocket
```

## Usage

```typescript
import {} from /* exports */ '@orchard9ai/websocket';

// Usage examples coming soon
```

## Features

Coming soon...

## License

MIT © Orchard9
npm package: @orchardapp/sdk
Description: Core SDK for Orchard apps
Latest version: 0.1.4

# @orchard/sdk

Core JavaScript SDK for building apps that run inside the **Orchard** platform.

The SDK provides a simple, framework-agnostic API for **persistent state** inside sandboxed iframes, without exposing any platform internals.

---

## Features

- Persistent state via Orchard (no direct DB access)
- Framework-agnostic (works with vanilla JS, React, Vue, etc.)
- Local dev mode fallback (uses `localStorage`)
- Tiny, dependency-free core
- Secure by design (sandboxed iframe friendly)

---

## Installation

```bash
npm install @orchard/sdk
```

The SDK is intended to be bundled into your app (Vite, Webpack, etc.).
It is not meant to be loaded dynamically at runtime.

---

## Quick Start

### Create a persistent store

```javascript
import { createStore } from "@orchard/sdk";

const store = createStore("state", { count: 0 });

store.subscribe((state) => {
  console.log("Current state:", state);
});

store.update((s) => ({ count: s.count + 1 }));
```

That's it.

- Inside Orchard → state persists via the platform
- Outside Orchard → state persists via localStorage

---

## Concepts

### Stores

A store represents a persistent JSON value scoped to:

- the current app instance
- a namespace you choose

```javascript
const store = createStore(namespace, initialState);
```

- `namespace` must be a stable string (e.g. `"state"`, `"settings"`)
- `initialState` is used until persisted data is loaded

---

## API

### `createStore(namespace, initialState?)`

Creates (or returns) a store for the given namespace.

```javascript
const store = createStore("state", { count: 0 });
```

Only one store exists per namespace.

### `store.get()`

Returns the current state synchronously.

```javascript
const state = store.get();
```

### `store.set(value)`

Replace the entire state.

```javascript
store.set({ count: 10 });
```

### `store.update(fn)`

Update state based on the previous value.

```javascript
store.update((prev) => ({
  ...prev,
  count: prev.count + 1,
}));
```

This is the recommended way to mutate state.

### `store.subscribe(fn)`

Subscribe to state changes.

```javascript
const unsubscribe = store.subscribe((state) => {
  console.log(state);
});
```

- The callback is called immediately with the current state
- Returns an unsubscribe function

---

## Local Development Mode

When your app is not running inside Orchard, the SDK automatically falls back to `localStorage`.

You'll see a warning once:

```
[Orchard SDK] Running outside Orchard — using localStorage fallback.
```

This allows you to:

- develop apps locally
- preview behavior without Orchard
- reload without losing state

No code changes required.
npm package: @orchata-ai/cli
Description: Orchata CLI - API-first management for Spaces, Documents, and Queries
Author: Eddie Hudson
Latest version: 1.4.0

# @orchata-ai/cli

Command-line interface for managing Orchata Spaces, Documents, and Queries.

## Installation

```bash
npm install -g @orchata-ai/cli
# or
bun add -g @orchata-ai/cli
```

## Quick Start

```bash
# Set up your cloud configuration
orchata init

# Authenticate with your API key
orchata login

# List your spaces
orchata spaces list

# Upload a document to a space
orchata documents upload ./docs/handbook.md --space space_123

# Query a space
orchata query "How do I authenticate?" --space space_123
```

## Commands

### `orchata init`

Configure the CLI to connect to the Orchata cloud API.

```bash
orchata init
orchata init --api-base https://api.orchata.ai --app-base https://app.orchata.ai
```

### `orchata login`

Opens the signup page (if needed) and stores your API key.

```bash
orchata login
orchata login --api-key oai_...
orchata login --profile production
```

Options:

- `--api-key <key>` — Provide API key non-interactively
- `--profile <name>` — Use a named profile
- `--host <url>` — Override API base URL
- `--no-open` — Don't open the signup page in browser

### `orchata configure`

Update saved settings like profile, API base, and app base.

```bash
orchata configure --api-base https://api.orchata.ai
orchata configure --profile staging --set-default
```

### `orchata spaces`

Manage spaces.

```bash
orchata spaces list
orchata spaces create --name "Docs" --description "Product docs" --icon book
orchata spaces get space_123
orchata spaces update space_123 --name "Updated"
orchata spaces delete space_123
```

### `orchata documents`

Manage documents in a space.

```bash
orchata documents list --space space_123
orchata documents upload ./file.md --space space_123
orchata documents upload --space space_123 --content "# Title"
orchata documents get document_123 --space space_123
orchata documents content document_123 --space space_123
orchata documents append document_123 --space space_123 --content "- New item"
orchata documents batch ./docs/ --space space_123
```

### `orchata query`

Query one or more spaces.

```bash
orchata query "authentication flow" --space space_123
orchata query smart "what is orchata"
orchata query "onboarding" --space space_123 --top-k 5
```

## Global Options

These options can be used with any command:

- `--profile <name>` — Use a named profile
- `--api-base <url>` — Override API base URL
- `--app-base <url>` — Override app base URL
- `--api-key <key>` — Override API key for this run
- `--json` — Output raw JSON

## Configuration

Config is stored in `~/.orchata/config.json` with restricted permissions.

You can also set configuration via environment variables:

```bash
ORCHATA_API_BASE=https://api.orchata.ai
ORCHATA_API_KEY=oai_...
ORCHATA_PROFILE=cloud
```

## License

MIT
npm package: @orchatect/ensemble
Description: ## Development / Styleguide
Latest version: 0.1.15

# @orchatect/ensemble

## Development / Styleguide

Install dependencies.

```sh
yarn
```

Start the styleguide.

```sh
yarn docz dev
```

Run the tests.

```sh
yarn test
```

## Components

### Button

### Badge

### FileTree

### Menu

### Panel

### Pill

### ShadowRoot

### Spinner

### Switch

### Table

### Icon

### List

### Heading

### Text

### Link

### Image

### Video

### Box

### Radio

### Checkbox

### Select

### Modal

### Alert

### Toast

### Input

### Textarea

## Utilities

### router
npm package: @orchatect/standards
Description: Distributable configurations for maintaining code standards across multiple projects.
Latest version: 0.0.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# standards

Distributable configurations for maintaining code standards across multiple projects.

## Basic Usage

Add the following to the `package.json` of any Orchatect project.

```json
{
  "prettier": "@orchatect/standards/prettier.config",
  "babel": {
    "extends": "@orchatect/standards/babel.config"
  }
}
```

## Ill-Advised Usage

```js
import { prettierConfig, babelConfig } from '@orchatect/standards'

// ... Do stuff with the configs.
// But really... please don't.
```