open-index/open-npm huggingface dataset:
npm package: @gatehub/microkit
Description: Opiniated microservice toolkit
Author: Jaka Hudoklin
Latest version: 0.13.4

# microkit [![NPM version][npm-image]][npm-url]
> Node.js microservice toolkit

Abstraction toolkit for microservices, to make nodejs developers happy again.

## Installation

```sh
$ npm install --save @gatehub/microkit
```

## Usage

```js
var MicroKit = require('microkit');

// Instantiate MicroKit
var microkit = new MicroKit({
  name: 'myAwesomeService',
  environment: 'production',
  logLevel: 'info',
  catchGlobal: true, // catch global errors
  queue: {
    name: 'amqp',
    url: "amqp://localhost",
    queue: 'myAwesomeService'
  }, // queue provider config
  error: {name: 'sentry', url: "https://dd..ba:d8..35@app.getsentry.com/24343"}, // error reporter config
  stats: {name: 'statsd', host: "statsd.example.com"}, // stats reporter config
  api: {
    name: 'swagger',
    services: {
      serviceA: {url: 'http://api.domain.com/swagger.yaml'},
    }
  }
});

/** or for development it will log on stdout
 *  var microkit = new MicroKit({name: 'myAwesomeService'});
 **/

// Logging
microkit.logger.debug('message', {key: 'value'});
microkit.logger.info('message', {key: 'value'});
microkit.logger.warn('message', {key: 'value'});
microkit.logger.fatal(new Error("some error"));
microkit.logger.error('message', {key: 'value', err: new Error("some error")});

var logger = microkit.logger.create('componentName', {some: 'context'});
logger.info('message', {key: 'value'});

// Queue
microkit.queue.publish({key: 'value'}, {some: 'data'});
microkit.queue.publish({key: {key: 'value'}, message: {key: 'value'}});
microkit.queue.subscribe({key: 'value'}, (msg, info) => {
  console.log("message", msg);
  console.log("key", info.key);
});

// Error reporting
microkit.error.capture(new Error('some error'));

// Metrics
microkit.metrics.send('some.metric', 10, {tag1: 'value', tag2: 'value2'});

// Exit handling
microkit.onExit(() => server.close());

// Express integration (logging, error reporting)
app.use(microkit.express.preHandler); // before all middlewares
app.use(microkit.express.postHandler); // after middlewares

// API calling
microkit.api.call('serviceA', 'getUser', {id: '123-456'});

// config
microkit.config.get('key.value');

// common errors
const MyConnectionError = microkit.errors.ConnectionError.extend({
  name: 'MyConnectionError'
});
throw new MyConnectionError({code: 'database_error', error: err});
```

## License

MIT © [GateHubNet](https://www.gatehub.net)

[npm-image]: https://badge.fury.io/js/microkit.svg
[npm-url]: https://npmjs.org/package/@gatehub/microkit
npm package: @gatelab/agent
Description: GateLab self-hosted agent for running containers on your own infrastructure
Author: GateLab
Latest version: 1.0.0

# GateLab Agent

Self-hosted agent for running GateLab containers on your own infrastructure.

## Installation

```bash
npm install -g @gatelab/agent
```

## Quick Start

1. Register your server in the GateLab dashboard
2. Configure the agent with your credentials:

```bash
gatelab-agent configure --server-id YOUR_SERVER_ID --api-key YOUR_API_KEY
```

3. Start the agent:

```bash
gatelab-agent start
```

## Commands

### configure

Configure the agent with GateLab credentials.

```bash
gatelab-agent configure --server-id <id> --api-key <key> [--api-url <url>] [--port <port>]
```

Options:
- `--server-id` (required): Server ID from GateLab registration
- `--api-key` (required): API key from GateLab registration
- `--api-url`: GateLab API URL (default: https://api.gatelab.io)
- `--port`: Local agent port (default: 3001)

### start

Start the GateLab agent.

```bash
gatelab-agent start
```

### status

Check agent and Docker status.

```bash
gatelab-agent status
```

### list

List all managed containers.

```bash
gatelab-agent list
```

### logs

View container logs.

```bash
gatelab-agent logs <container> [-n <lines>]
```

### stop

Stop a container.

```bash
gatelab-agent stop <container>
```

### reset

Reset agent configuration.

```bash
gatelab-agent reset
```

## Environment Variables

You can also configure the agent using environment variables:

- `GATELAB_SERVER_ID`: Server ID
- `GATELAB_API_KEY`: API key
- `GATELAB_API_URL`: API URL (default: https://api.gatelab.io)
- `GATELAB_AGENT_PORT`: Agent port (default: 3001)
- `GATELAB_HEARTBEAT_INTERVAL`: Heartbeat interval in ms (default: 30000)

## Requirements

- Node.js 18+
- Docker

## Configuration File

Configuration is stored at `~/.gatelab/agent.json` with restricted permissions (600).

## License

MIT
npm package: @gateman/js
Description: Official Node.js SDK for Gateman SSO authentication
Author: Gateman
Latest version: 0.0.1

# Gateman JS

Official JavaScript SDK for Gateman SSO.

## Installation

```bash
npm install @gateman/js
```

## Quick Start

```javascript
import { GatemanSSO } from '@gateman/js';

const gateman = new GatemanSSO({
  appID: 'your-app-id'
});

async function handleLogin() {
  try {
    const result = await gateman.login();
    const { accessToken, encryptedData, refreshToken } = result.payload;
    
    console.log('Access Token:', accessToken);
  } catch (error) {
    console.error('Login failed:', error);
  }
}

document.getElementById('login-btn').addEventListener('click', handleLogin);
```

## Examples

### HTML

```html
<!DOCTYPE html>
<html>
<head>
  <title>My App</title>
</head>
<body>
  <button id="login-btn">Login</button>

  <script type="module">
    import { GatemanSSO } from '@gateman/js';

    const gateman = new GatemanSSO({
      appID: 'your-app-id'
    });

    document.getElementById('login-btn').addEventListener('click', async () => {
      try {
        const result = await gateman.login();
        const { accessToken, encryptedData, refreshToken } = result.payload;
        
        console.log('Access Token:', accessToken);
      } catch (error) {
        console.error('Login failed:', error);
      }
    });
  </script>
</body>
</html>
```

### React

```jsx
import { GatemanSSO } from '@gateman/js';

const gateman = new GatemanSSO({
  appID: 'your-app-id'
});

function App() {
  async function handleLogin() {
    try {
      const result = await gateman.login();
      const { accessToken, encryptedData, refreshToken } = result.payload;
      
      console.log('Access Token:', accessToken);
    } catch (error) {
      console.error('Login failed:', error);
    }
  }

  return <button onClick={handleLogin}>Login</button>;
}

export default App;
```

## API Reference

### `GatemanSSO`

#### Constructor

```javascript
new GatemanSSO(config)
```

**Parameters:**
- `config.appID` (string, required) - Your Gateman application ID

#### Methods

##### `login()`

Opens authentication popup and returns tokens.

```javascript
const result = await gateman.login();
```

**Returns:**
```javascript
{
  payload: {
    accessToken: string,
    encryptedData: string,
    refreshToken: string
  }
}
```

## Browser Support

- Chrome 60+
- Firefox 55+
- Safari 11.1+
- Edge 79+

## License

MIT
npm package: @gatesolve/mcp-server
Description: MCP server for CAPTCHA solving - Turnstile, reCAPTCHA, hCaptcha. 100 free solves. AI agent automation.
Latest version: 0.3.1

# GateSolve MCP Server

Model Context Protocol (MCP) server for [GateSolve](https://gatesolve.dev) — CAPTCHA solving for AI agents via x402 micropayments.

## Tools

### `solve_captcha`
Solve a CAPTCHA (Turnstile, reCAPTCHA v2/v3, hCaptcha). Returns payment requirements or solution token.

### `list_captcha_types`
List supported CAPTCHA types with pricing, accuracy, and required fields.

### `check_gatesolve_status`
Check API health and service status.

## Setup

### Claude Desktop / Cursor / Windsurf

Add to your MCP config:

```json
{
  "mcpServers": {
    "gatesolve": {
      "command": "npx",
      "args": ["@gatesolve/mcp-server"]
    }
  }
}
```

### From source

```bash
git clone https://github.com/arsonx-dev/gatesolve-mcp.git
cd gatesolve-mcp
npm install
npm run build
npm start
```

## Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| `GATESOLVE_API_URL` | `https://gatesolve.dev` | GateSolve API base URL |

## How It Works

1. Agent calls `solve_captcha` with the CAPTCHA type, site key, and page URL
2. GateSolve returns a 402 Payment Required with USDC amount
3. Agent pays via x402 (USDC on Base network)
4. Agent calls `solve_captcha` again with the payment token
5. Returns the solved CAPTCHA token

No API keys. No accounts. Just x402.

## License

MIT
npm package: @gatesolve/playwright-plugin
Description: Automatic CAPTCHA solving for Playwright and playwright-extra. Detects and solves Cloudflare Turnstile, reCAPTCHA v2/v3, and hCaptcha via GateSolve API. Free tier included.
Author: Arson
Latest version: 0.2.1

# @gatesolve/playwright-plugin

Automatic CAPTCHA solving for Playwright. Detects Cloudflare Turnstile, reCAPTCHA, and hCaptcha challenges and solves them via [GateSolve](https://gatesolve.dev).

## Install

```bash
npm install @gatesolve/playwright-plugin
```

## Quick Start

### One-shot: Solve CAPTCHA on current page

```typescript
import { chromium } from 'playwright';
import { solveOnPage } from '@gatesolve/playwright-plugin';

const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('https://example.com/login');

// Detect and solve any CAPTCHA on the page
const result = await solveOnPage(page, {
  apiKey: 'gs_your_key_here', // Free at gatesolve.dev
});

if (result?.success) {
  console.log(`Solved ${result.type} in ${result.solveTimeMs}ms`);
  // Token is already injected into the page — submit the form
  await page.click('button[type="submit"]');
}
```

### Auto-solve: Wrap browser context

```typescript
import { chromium } from 'playwright';
import { withGateSolve } from '@gatesolve/playwright-plugin';

const browser = await chromium.launch();
const context = await browser.newContext();

// Every page in this context will auto-solve CAPTCHAs
withGateSolve(context, {
  apiKey: 'gs_your_key_here',
  debug: true,
});

const page = await context.newPage();
await page.goto('https://example.com/protected');
// CAPTCHA is solved automatically on page load
```

### Detect only (no solve)

```typescript
import { detectCaptcha } from '@gatesolve/playwright-plugin';

const detection = await detectCaptcha(page);
if (detection) {
  console.log(`Found ${detection.type} with siteKey ${detection.siteKey}`);
}
```

## API

### `solveOnPage(page, options)`

Detect and solve a CAPTCHA on the current page. Returns `SolveResult | null`.

### `withGateSolve(context, options)`

Wrap a `BrowserContext` to auto-solve CAPTCHAs on every page load. Returns the same context.

### `detectCaptcha(page)`

Detect CAPTCHA type and siteKey without solving. Returns `CaptchaDetection | null`.

## Options

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `apiKey` | `string` | required | GateSolve API key |
| `baseUrl` | `string` | `https://gatesolve.dev` | API base URL |
| `timeout` | `number` | `30000` | Max solve wait (ms) |
| `pollInterval` | `number` | `2000` | Poll frequency (ms) |
| `debug` | `boolean` | `false` | Log debug info |

## Supported CAPTCHAs

- **Cloudflare Turnstile** — $0.02/solve
- **reCAPTCHA v2/v3** — $0.03/solve
- **hCaptcha** — $0.03/solve

## Free Tier

100 free solves per API key. No credit card required. Get your key at [gatesolve.dev](https://gatesolve.dev).

## License

MIT
npm package: @gatesolve/puppeteer-plugin
Description: Automatic CAPTCHA solving for Puppeteer and puppeteer-extra. Detects and solves Cloudflare Turnstile, reCAPTCHA v2/v3, and hCaptcha via GateSolve API. Free tier included.
Author: Arson
Latest version: 0.2.1

# @gatesolve/puppeteer-plugin

Automatic CAPTCHA solving for Puppeteer. Detects Cloudflare Turnstile, reCAPTCHA, and hCaptcha challenges and solves them via [GateSolve](https://gatesolve.dev).

## Install

```bash
npm install @gatesolve/puppeteer-plugin
```

## Quick Start

### One-shot: Solve CAPTCHA on current page

```javascript
const puppeteer = require('puppeteer');
const { solveOnPage } = require('@gatesolve/puppeteer-plugin');

const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://example.com/login');

// Detect and solve any CAPTCHA
const result = await solveOnPage(page, {
  apiKey: 'gs_your_key_here', // Free at gatesolve.dev
});

if (result?.success) {
  console.log(`Solved ${result.type} in ${result.solveTimeMs}ms`);
  await page.click('button[type="submit"]');
}
```

### Auto-solve: Wrap page

```javascript
const { withGateSolve } = require('@gatesolve/puppeteer-plugin');

const page = await browser.newPage();
withGateSolve(page, { apiKey: 'gs_your_key_here', debug: true });

await page.goto('https://example.com/protected');
// CAPTCHAs are solved automatically on every page load
```

### Detect only

```javascript
const { detectCaptcha } = require('@gatesolve/puppeteer-plugin');

const detection = await detectCaptcha(page);
if (detection) {
  console.log(`Found ${detection.type} with siteKey ${detection.siteKey}`);
}
```

## Options

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `apiKey` | `string` | required | GateSolve API key |
| `baseUrl` | `string` | `https://gatesolve.dev` | API base URL |
| `timeout` | `number` | `30000` | Max solve wait (ms) |
| `pollInterval` | `number` | `2000` | Poll frequency (ms) |
| `debug` | `boolean` | `false` | Log debug info |

## Supported CAPTCHAs

- **Cloudflare Turnstile** — $0.02/solve
- **reCAPTCHA v2/v3** — $0.03/solve
- **hCaptcha** — $0.03/solve

## Free Tier

100 free solves per API key. No credit card required. [gatesolve.dev](https://gatesolve.dev)

## License

MIT
npm package: @gatesolve/recaptcha-provider
Description: GateSolve provider for puppeteer-extra-plugin-recaptcha — solve CAPTCHAs using GateSolve as backend
Author: GateSolve
Latest version: 0.1.0

# @gatesolve/recaptcha-provider

Use [GateSolve](https://gatesolve.dev) as the solving backend for [`puppeteer-extra-plugin-recaptcha`](https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-recaptcha).

Drop-in replacement for 2captcha — works with both **puppeteer-extra** and **playwright-extra**.

## Install

```bash
npm install @gatesolve/recaptcha-provider
```

## Usage with Puppeteer

```js
import puppeteer from 'puppeteer-extra'
import RecaptchaPlugin from 'puppeteer-extra-plugin-recaptcha'
import { PROVIDER_ID, getSolutions } from '@gatesolve/recaptcha-provider'

puppeteer.use(RecaptchaPlugin({
  provider: { id: PROVIDER_ID, token: 'gs_your_key', fn: getSolutions }
}))

const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.goto('https://example.com/login')

// Automatically detects and solves reCAPTCHAs using GateSolve
const { solved } = await page.solveRecaptchas()
console.log(`Solved ${solved.length} captcha(s)`)

await page.close()
await browser.close()
```

## Usage with Playwright

```js
import { chromium } from 'playwright-extra'
import RecaptchaPlugin from 'puppeteer-extra-plugin-recaptcha'
import { PROVIDER_ID, getSolutions } from '@gatesolve/recaptcha-provider'

chromium.use(RecaptchaPlugin({
  provider: { id: PROVIDER_ID, token: 'gs_your_key', fn: getSolutions }
}))

const browser = await chromium.launch()
const page = await browser.newPage()
await page.goto('https://example.com/login')

const { solved } = await page.solveRecaptchas()
console.log(`Solved ${solved.length} captcha(s)`)

await page.close()
await browser.close()
```

## Get an API Key

Sign up at [gatesolve.dev](https://gatesolve.dev) to get your API key.

## How It Works

1. `puppeteer-extra-plugin-recaptcha` detects CAPTCHAs on the page
2. This provider sends them to the GateSolve API for solving
3. Solutions are returned and automatically injected into the page

Supports reCAPTCHA v2, v3, and hCaptcha.

## License

MIT
npm package: @gatewatcher/skin
Description: Gatewatcher Design System
Author: Gatewatcher frontend team
Latest version: 1.0.1

# skin

Gatewatcher Design System

## Third-Party Licenses

This project includes third-party resources licensed under their respective terms:

- **IBM Carbon Icons**  
  Icons are from the [IBM Carbon Design System](https://www.carbondesignsystem.com/),  
  licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).  
  © 2024 IBM Corp. — See `https://github.com/carbon-design-system/carbon/blob/main/LICENSE` for details or `licenses/IBM.md`.

- **react-resizable-panels**  
  Some UI functionality is adapted from [react-resizable-panels](https://github.com/bvaughn/react-resizable-panels)  
  by Brian Vaughn, licensed under the MIT License.  
  See `https://github.com/bvaughn/react-resizable-panels/blob/main/LICENSE` or `licenses/BRIAN_VAUGHN.md`.

- **field-form**  
  Some form logic is based on [field-form](https://github.com/react-component/field-form),  
  licensed under the MIT License.  
  See `https://github.com/react-component/field-form/blob/master/LICENSE` or `licenses/REACT_COMPONENT.md`.

## Linters

Fix all linters (ts and scss) : `npm run lint:fix`

## Component generation

```
npx hygen component new
```

1. **Enter the component name.**  
   Separate words will be automatically Pascal-cased.
2. **Enter the component path, starting from `src/`.**  
   Directories will be created if they don't exist.  
    This can be left empty.
3. **Enter the story category or leave it empty.**  
   Storybook will group stories according to this.

## Utils

### Cypress

Location : `./cypress/utils.ts`

- `goTo(group: string, component: string): { goToStory() }` Accept groupName and
  componentName. It returns a function to go withCypress on story, with params
  if necessary.

```ts
const { goToStory } = goTo('typography', 'title');
// Return a function to go on Typography/Title method
it('should match screenshot', () => {
  goToStory();
  // go on Typography/title -> default Story
  cy.matchSnapshot('paragraph');
});

it('should match screenshot with extra markup', () => {
  goToStory('with-extra-markup');
  // go on Typography/title -> with extra markup story
  cy.matchSnapshot('with-extra-markup');
});

it('should match screenshot with extra markup', () => {
  goToStory('heading-level', { as: 'h2' });
  // go on Typography/title -> HeadingLevel story with as params
  // typography-title--heading-level&args=as:h2
  cy.matchSnapshot('with-extra-markup');
});
```

### Storybook

Location : `./.storybook/utils.ts`

- `addSelect(propName: string, choices: string[])` : Add select on storybook
  controls
- `addMultiSelect(propName: string, choices: string[])` : Add MultiSelect on
  storybook controls
- `addInlineRadio(propName: string, choices: string[])` : Add select on
  storybook controls

### Components

Location : `./src/utils/index.ts`