open-index/open-npm huggingface dataset:
npm package: @sprucelabs/mercury-client
Description: The simple way to interact with the Spruce Experience Platform
Latest version: 46.1.19

<img src="https://raw.githubusercontent.com/sprucelabsai/mercury-workspace/master/docs/images/hero.jpg">

<h1 align="center">
Spruce XP Documentation
</h1>
<h3 align="center">Spruce XP is an Experience Platform built to create unforgettable experiences and long-lasting relationships.
</h3>
<p align="center">
<img align="center" width="80%" src="https://raw.githubusercontent.com/sprucelabsai/mercury-workspace/master/docs/images/bullets.jpg">
</p>
<img src="https://raw.githubusercontent.com/sprucelabsai/mercury-workspace/master/docs/images/spacer.png">
<br />
<p align="center">
<img align="center" width="80%" src="https://raw.githubusercontent.com/sprucelabsai/mercury-workspace/master/docs/images/sprucebot-message.png">
</p>

<br />
<p align="center">
<a href="https://developer.spruce.ai/"><img width="250" src="https://raw.githubusercontent.com/sprucelabsai/mercury-workspace/master/docs/images/read-full-docs.png" /></a>
</p>
npm package: @sprucelabs/mercury-core-events
Description: Events Mercury provides out of the box.
Latest version: 29.1.21

<img src="https://raw.githubusercontent.com/sprucelabsai/mercury-core-events/master/docs/images/hero.jpg">

<h1 align="center">
Spruce XP Documentation
</h1>
<h3 align="center">Spruce XP is an Experience Platform built to create unforgettable experiences and long-lasting relationships.
</h3>
<p align="center">
<img align="center" width="80%" src="https://raw.githubusercontent.com/sprucelabsai/mercury-core-events/master/docs/images/bullets.jpg">
</p>
<img src="https://raw.githubusercontent.com/sprucelabsai/mercury-core-events/master/docs/images/spacer.png">
<br />
<p align="center">
<img align="center" width="80%" src="https://raw.githubusercontent.com/sprucelabsai/mercury-core-events/master/docs/images/sprucebot-message.png">
</p>
<br />
<p align="center">
<a href="https://developer.spruce.ai/"><img width="250" src="https://raw.githubusercontent.com/sprucelabsai/mercury-core-events/master/docs/images/read-full-docs.png" /></a>
</p>
npm package: @sprucelabs/mercury-event-emitter
Description: Types for Mercury!
Latest version: 46.1.19

<img src="https://raw.githubusercontent.com/sprucelabsai/mercury-workspace/master/docs/images/hero.jpg">

<h1 align="center">
Spruce XP Documentation
</h1>
<h3 align="center">Spruce XP is an Experience Platform built to create unforgettable experiences and long-lasting relationships.
</h3>
<p align="center">
<img align="center" width="80%" src="https://raw.githubusercontent.com/sprucelabsai/mercury-workspace/master/docs/images/bullets.jpg">
</p>
<img src="https://raw.githubusercontent.com/sprucelabsai/mercury-workspace/master/docs/images/spacer.png">
<br />
<p align="center">
<img align="center" width="80%" src="https://raw.githubusercontent.com/sprucelabsai/mercury-workspace/master/docs/images/sprucebot-message.png">
</p>

<br />
<p align="center">
<a href="https://developer.spruce.ai/"><img width="250" src="https://raw.githubusercontent.com/sprucelabsai/mercury-workspace/master/docs/images/read-full-docs.png" /></a>
</p>
npm package: @sprucelabs/mercury-types
Description: Types for Mercury!
Latest version: 49.1.20

<img src="https://raw.githubusercontent.com/sprucelabsai/mercury-types/master/docs/images/hero.jpg">

<h1 align="center">
Spruce XP Documentation
</h1>
<h3 align="center">Spruce XP is an Experience Platform built to create unforgettable experiences and long-lasting relationships.
</h3>
<p align="center">
<img align="center" width="80%" src="https://raw.githubusercontent.com/sprucelabsai/mercury-types/master/docs/images/bullets.jpg">
</p>
<img src="https://raw.githubusercontent.com/sprucelabsai/mercury-types/master/docs/images/spacer.png">
<br />
<p align="center">
<img align="center" width="80%" src="https://raw.githubusercontent.com/sprucelabsai/mercury-types/master/docs/images/sprucebot-message.png">
</p>

<br />
<p align="center">
<a href="https://developer.spruce.ai/"><img width="250" src="https://raw.githubusercontent.com/sprucelabsai/mercury-types/master/docs/images/read-full-docs.png" /></a>
</p>
npm package: @sprucelabs/mercury-utils
Description: Support for working with Mercury. 📈
Latest version: 60.25.9

<img src="./docs/images/hero.jpeg" />

# Mercury API

[![AI TDD Contributor](https://regressionproof.ai/badge.svg)](https://regressionproof.ai)

The backend API powering the Spruce Experience Platform. A real-time messaging and event coordination system built on Node.js.

## Features

### Event System
- Core event emission, listening, and dispatching
- Event contracts and validation
- Event-driven architecture with ingress controllers

### Real-time Communication
- Socket.io-based bidirectional communication
- Live updates between clients and API

### Messaging
- Multi-channel delivery (SMS, push notifications, email)
- Twilio SMS integration
- Firebase/APNs push notifications
- Email via Nodemailer
- Message queuing and templating

### Conversations
- Conversational state management
- Topic coordination
- LLM integration support

### Authentication & Authorization
- Phone-based auth with PIN verification
- JWT tokens
- Role-based permissions
- Organization-level access controls

### Data Management
- Multi-store architecture
- People, organizations, locations, skills, roles, permissions
- Message history

### Skill Management
- Register and install third-party skills
- Skill coordination framework

## Architecture

<img src="./docs/images/event-arch.jpeg" />

- Modular plugin-based system
- Server factory pattern
- Store-based data layer with pluggable backends
- Multi-mode bootstrapping

## Development

```bash
# Install dependencies
yarn

# Build
yarn build.dev

# Run tests
yarn test
```

## Documentation

For comprehensive documentation, visit [developer.spruce.bot](https://developer.spruce.bot).
npm package: @sprucelabs/path-resolver
Description: Enables support for paths in the compiler options of your tsconfig file.
Latest version: 1.3.4

# @sprucelabs/path-resolver

Add runtime support for the `compilerOptions.paths` of your `tsconfig.json`.

## Installation

```bash
yarn install @sprucelabs/path-resolver
```

or

```bash
npm install @sprucelabs/path-resolver
```

And include this line at the top of your app:

```js
import "@sprucelabs/path-resolver/register";
```

That's all!

### Options

- `cwd:string` - Where to start looking for your tsconfig.json. Will look up one directory at a time until it finds one or throws an Error. _NOTE:_ Make sure your tsconfig.json is being bundled with your project when building/deploying.
- `extensions:string[]` - Extensions you want to load, defaults to Module.extensions, must have dot in them `.js`, `.ts`.

### Example tsconfig.json

```json
{
	"compilerOptions": {
		"baseUrl": "",
		"outDir": "build",
		"paths": {
			"#alias": ["new/path/relative/to/baseUrl"],
			"#aliasWithWildcard/*": ["new/path/one/*", "new/path/two/*"]
		}
	}
}
```

### Example import

```js
import path from "path";
import "@sprucelabs/path-resolver/register";

import MyThing from "#alias";
import { somethingElse } from "#aliasWithWildcard/path/passed/through";
```

## Why not use [tspaths-config](https://github.com/dividab/tsconfig-paths#readme)?

This module works almost exactly the same, but when resolving modules it checks the `outDir` first, then falls back to checking the local directory. It also checks for all file extensions.

In other words, `path-resolver` works with `ts-node` and without and with built projects and without, all with one line of code.
npm package: @sprucelabs/postgres-data-store
Description: Postgres production and test adapters for @sprucelabs/data-stores
Latest version: 11.0.20

<img src="https://raw.githubusercontent.com/sprucelabsai/mercury-types/master/docs/images/hero.jpg">

<h1 align="center">
Spruce XP Documentation
</h1>
<h3 align="center">Spruce XP is an Experience Platform built to create unforgettable experiences and long-lasting relationships.
</h3>
<p align="center">
<img align="center" width="80%" src="https://raw.githubusercontent.com/sprucelabsai/mercury-types/master/docs/images/bullets.jpg">
</p>
<img src="https://raw.githubusercontent.com/sprucelabsai/mercury-types/master/docs/images/spacer.png">
<br />
<p align="center">
<img align="center" width="80%" src="https://raw.githubusercontent.com/sprucelabsai/mercury-types/master/docs/images/sprucebot-message.png">
</p>

<br />
<p align="center">
<a href="https://developer.spruce.ai/"><img width="250" src="https://raw.githubusercontent.com/sprucelabsai/mercury-types/master/docs/images/read-full-docs.png" /></a>
</p>