open-index/open-npm huggingface dataset:
npm package: @syntropiq/py-regex
Description: Python-compatible regular expressions for TypeScript/JavaScript, mirroring Python's re/regex API.
Author: Syntropiq
Latest version: 1.0.0

# py-regex

Python-compatible regular expressions for TypeScript/JavaScript, powered by [@syntropiq/libpcre-ts](https://www.npmjs.com/package/@syntropiq/libpcre-ts).  
Provides a Pythonic API mirroring Python's `re` and `regex` modules, including named groups, escaping, and familiar match methods.

## Installation

```sh
npm install @syntropiq/py-regex
```

## Usage

```typescript
import { regex } from '@syntropiq/py-regex';

const pattern = regex.compile('(?P<volume>\\d+) (?P<page>\\d+)', 'i');
const m = pattern.fullmatch('123 456');
console.log(m?.group('volume')); // '123'
console.log(m?.groups); // { volume: '123', page: '456' }

const escaped = regex.escape('Ala. Admin. Code');
console.log(escaped); // 'Ala\\. Admin\\. Code'
```

## API

- `regex.compile(pattern: string, flags?: string): Pattern`
- `regex.escape(text: string): string`
- `Pattern.fullmatch(text: string): Match | null`
- `Pattern.match(text: string): Match | null`
- `Pattern.search(text: string): Match | null`
- `Match.group(nameOrIndex: string | number): string | undefined`
- `Match.groups: Record<string, string>`

## Features

- Python-style named groups: `(?P<name>...)`
- Full support for Python/PCRE regex syntax
- Familiar API for Python developers
- 100% test coverage for Python compatibility


## Migrating from xtrax

All PCRE/Python regex logic has moved from `xtrax` to this package.  
For Python-compatible regex, use `@syntropiq/py-regex`.

## License

MIT
npm package: @syntropiq/pyrex
Description: A TypeScript library providing a Python-like regex interface with automatic backend selection
Author: Syntropiq
Latest version: 0.1.0

# Pythonic Regex API in TypeScript

A TypeScript library providing a Python-like `re` interface for regex operations, targeting evergreen browsers. The API closely mirrors Python’s `re` module, with seamless support for both JavaScript and Python-only regex features.

---

## Features

- Pythonic API: `re.match`, `re.search`, `re.compile`, `re.sub`, `re.split`, `re.findall`, `re.fullmatch`, `re.escape`
- Automatic backend selection:
  - Uses Pyodide and Python’s `regex` package for Python-only features
  - Uses latest JS RegExp and core-js polyfill for JS-compatible patterns
- Written in modern TypeScript, targeting evergreen browsers
- Zero technical debt: Bun for scripts, Vite for build/test/bundle, ESLint + Prettier for code quality

---

## Installation

```sh
bun install @syntropiq/pyrex
```

---

## Usage

```typescript
import * as re from '@syntropiq/pyrex';

const result = re.match('a(b+)', 'abbb');
if (result) {
  console.log(result.group(1)); // 'bbb'
}
```

---

## Development

- **Build:** `bun run build`
- **Test:** `bun run test`
- **Lint:** `bun run lint`
- **Format:** `bun run format`

---

## Project Structure

- `src/` — TypeScript source code
- `test/` — Unit tests
- `PLAN.md` — Architecture and implementation plan
- `TODO.md` — Task breakdown and progress tracking

---

## Contributing

Contributions are welcome! Please see `PLAN.md` and `TODO.md` for project direction and open tasks.

---

## License

MIT
npm package: @syntropy/mongoose-document-versioner
Description: Force version to increment every time you update or save a mongoose document
Author: Good Eggs Inc.
Latest version: 2.0.2

# Mongoose Document Versioner

This module sets a document `version` key that is incremented
any time you save or update a document. This is useful for
detecting version conflicts.

Increments `version` on the following `pre` hooks:

* `findOneAndUpdate`
* `updateOne`
* `updateMany`
* `update`
* `save`

Note: `Model.findByIdAndUpdate()` calls the `findOneAndUpdate` hook.

## Usage

```js
const versionerPlugin = require('mongoose-document-versioner');

const schema = new mongoose.Schema({ /* .... */ });
schema.plugin(versionerPlugin);
const Model = mongoose.model('Model', schema);

/* EXAMPLES */

Model.update({attr: 'foo'}, {attr: 'bar'}, {multi: true});
/*
 * mongo query:
 * model.update(
 *   { attr: 'foo' },
 *   { '$inc': { version: 1 }, '$set': { attr: 'bar' } },
 *   { multi: true }
 * )
 */

Model.findOneAndUpdate({attr: 'foo'}, {attr: 'bar'});
/*
 * mongo query:
 * model.findAndModify(
 *   { attr: 'foo' },
 *   { '$inc': { version: 1 }, '$set': { attr: 'bar' } },
 *   { new: false, upsert: false }
 * )
 */
```
npm package: @syntropyai/node
Description: Universal AI Observability and Security Agent — trace, guard, and govern LLM calls across every provider.
Latest version: 0.2.0

# @syntropyai/node

Syntropy AI Observability SDK for Node.js — trace, guard, and govern your AI agents.

## Installation

```bash
npm install @syntropyai/node
```

## Quick Start

```typescript
import { Syntropy } from "@syntropyai/node";

const client = new Syntropy({
  apiKey: "syn_your_key_here",
  baseUrl: "https://ingest.syntropy.dev",
  agentId: "my-agent",
});

// Buffered trace (non-blocking)
client.trace({
  prompt: "What is the capital of France?",
  response: "The capital of France is Paris.",
  model: "gpt-4o",
  tokensIn: 12,
  tokensOut: 8,
  latencyMs: 340,
});

// Synchronous trace (awaitable)
const result = await client.traceSync({
  prompt: "Hello",
  response: "Hi there!",
  model: "gpt-4o-mini",
});
console.log(result.success, result.traceId);
```

## OpenAI Integration

Auto-trace all `chat.completions.create()` calls:

```typescript
import OpenAI from "openai";
import { Syntropy, wrapOpenAI } from "@syntropyai/node";

const syn = new Syntropy({ apiKey: "syn_...", agentId: "my-agent" });
const openai = wrapOpenAI(new OpenAI(), { syntropy: syn });

// Auto-traced:
const response = await openai.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "Hello!" }],
});
```

## Batch Tracing

```typescript
await client.traceBatch([
  { prompt: "Q1", response: "A1", model: "gpt-4o", agentId: "agent-1" },
  { prompt: "Q2", response: "A2", model: "gpt-4o", agentId: "agent-2" },
]);
```

## Configuration

| Option | Default | Description |
|--------|---------|-------------|
| `apiKey` | required | Your Syntropy API key |
| `baseUrl` | `http://localhost:4000` | Ingestion service URL |
| `agentId` | `""` | Default agent ID |
| `flushIntervalMs` | `2000` | Ms between buffer flushes |
| `batchSize` | `50` | Max traces per batch |
| `maxQueueSize` | `10000` | Max buffered traces |
| `enabled` | `true` | Set `false` to disable tracing |