open-index/open-npm huggingface dataset:
npm package: @ficuslabs/react-native-opsqlite-websql
Description: Fast WebSQL-compatible OP-SQLite driver for React Native
Author: Arturo GARCIA-VARGAS / Takuya Matsuyama
Latest version: 0.1.0

<h1 align="center">React Native Quick WebSQL</h1>

![cover](https://repository-images.githubusercontent.com/486860084/27ea3b8e-30c4-4acb-9c2c-691b37d9e2a2)

This library provides a [WebSQL](http://www.w3.org/TR/webdatabase/)-compatible API to store data in a react native app, by using a fast [JSI](https://formidable.com/blog/2019/jsi-jsc-part-2/) implementation of the SQLite driver [react-native-quick-sqlite](https://github.com/ospfranco/react-native-quick-sqlite).

## Installation

```sh
yarn add react-native-quick-websql react-native-quick-sqlite
npx pod-install
```

## Usage

See [an example project](./example/src/App.tsx) for more detail.

```js
import WebSQLite from "react-native-quick-websql";

const db = WebSQLite.openDatabase('mydb.db')
db.transaction(
  (txn) => {
    console.log('Running transaction')
    txn.executeSql('DROP TABLE IF EXISTS Users', [])
    txn.executeSql(
      'CREATE TABLE IF NOT EXISTS Users(user_id INTEGER PRIMARY KEY NOT NULL, name VARCHAR(30))',
      []
    )
    txn.executeSql('INSERT INTO Users (name) VALUES (:name)', [
      'nora',
    ])
    txn.executeSql('INSERT INTO Users (name) VALUES (:name)', ['takuya'])
    txn.executeSql('SELECT * FROM `users`', [], function (_tx, res) {
      for (let i = 0; i < (res.rows?.length || 0); ++i) {
        console.log('item:', res.rows?.item(i))
      }
    })
  },
  (e) => {
    console.error(e)
  }
)
```


## Limitations & Debugging

As the library uses JSI for synchronous native methods access, remote debugging (e.g. with Chrome) is no longer possible.
Instead, you should use [Flipper](https://github.com/facebook/flipper).

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT by Takuya Matsuyama
npm package: @fidbak/widget
Description: Framework-free feedback FAB + modal (UMD for CDN, ESM for npm)
Latest version: 0.4.1

# fidbak (Widget)

Lightweight, framework‑free, feedback Widget with zero dependencies. Collect feedback from your users from any site with ease.

# Usage
* Open the [Fidbak dashboard](https://fidbak.dev/dashboard) and create a site. The dashboard will:
    * Return your `siteId`.
    * Let you add Allowed Origins (CORS).
    * Optionally add per‑site Webhooks (Slack or any URL).
    * Copy the generated code snippet and paste it before `</body>` of your site:

## CDN usage (recommended)

```html
<script src="https://unpkg.com/@fidbak/widget@latest/dist/fidbak.min.global.js"></script>
<script>
  // UMD global
  window.fidbak('init', {
    siteId: 'your-site-id',
    theme: 'auto',
    position: 'br'
  });
</script>
```

## ESM usage

```html
<script type="module">
  import fidbak from 'fidbak/widget';
  fidbak('init', {
    siteId: 'your-site-id',
    theme: 'auto',
    position: 'br'
  });
</script>
```

## Options

- `siteId` string – your site identifier (create via dashboard).
- `theme` 'light' | 'dark' | 'auto' (default 'auto').
- `debounceMs` number (default 600000) – reduce duplicate sends.

Find more options in the [Fidbak docs](https://github.com/kenny-io/fidbak?tab=readme-ov-file#configuration-options).

## Webhooks

Configure webhooks per site in the dashboard. We support Slack Incoming Webhooks and generic JSON endpoints. Generic endpoints receive 

```json 
{
  "type": "fidbak.feedback.v1",
  "data": {
    // feedback data
    }
}
```

The data may include `x-fidbak-signature` (HMAC‑SHA256 of raw body) if you set a webhook secret.

# How to use with Next.js

* Open the [Fidbak dashboard](https://fidbak.dev/dashboard) and create a site to get your `siteId`. While creating the site, ensure `http://localhost:3000` or whichever port your Next.js app runs on is in Allowed Origins.
    
* Create a FidbakWidget component: 

```tsx
// app/components/FidbakWidget.tsx
"use client";
import { useEffect } from "react";
import { fidbak } from "@fidbak/widget";

export default function FidbakWidget() {
  useEffect(() => {
    fidbak("init", {
      siteId: "your-site-id", // real Site ID from your dashboard/API
      theme: "auto",
      position: "br",
    });
  }, []);
  return null;
}

```

Then and add it to your Next.js root layout file `app/layout.tsx`:

```tsx
import FidbakWidget from '@/components/FidbakWidget'
import { Inter } from 'next/font/google'
import './globals.css'

const inter = Inter({ subsets: ['latin'] })

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="en">
      <body className={inter.className}>
        <FidbakWidget />
        {children}
      </body>
    </html>
  )
}
```

* Run your app and confirm the FAB shows. Submit a feedback and check your [Fidbak dashboard](https://fidbak.dev/dashboard) for results and analytics.

## License

MIT
npm package: @fiddle-digital/string-analytics
Description: A comprehensive JavaScript library for integrating and managing Google Analytics and Facebook Pixel in web applications. Supports initialization, event tracking, and dynamic management of analytics scripts with easy setup and teardown capabilities. Ideal 
Latest version: 0.0.1


![Alpha](https://img.shields.io/badge/Status-Alpha-red)
  
# StringAnalytics Library

## Overview

StringAnalytics is a versatile JavaScript library designed to facilitate the integration and management of popular analytics frameworks like Google Analytics and Facebook Pixel within web applications. It provides developers with tools to initialize, track events, and dynamically manage analytics scripts, enhancing control over data collection and privacy.

## Features

- **Easy Integration**: Simplifies the setup of Google Analytics and Facebook Pixel.
- **Event Tracking**: Allows developers to send custom event tracking information to analytics platforms.
- **Dynamic Script Management**: Offers capabilities to dynamically add or remove analytics scripts, enabling performance optimization and compliance with privacy regulations.
- **Robust Configuration**: Supports detailed configuration of tracking parameters and conditions.

## Installation

Install StringAnalytics using npm:

```sh
npm install @fiddle-digital/string-analytics
```

##Usage
###Importing
```
import StringAnalytics from '@fiddle-digital/string-analytics';
Initialization
Initialize Google Analytics and Facebook Pixel:
```
```javascript
const analytics = StringAnalytics.getInstance();
analytics.google.init('GA_MEASUREMENT_ID');
analytics.meta.init('FB_PIXEL_ID');
```
###Tracking Events
Track custom events in Google Analytics:

```javascript
analytics.google.track('GA_MEASUREMENT_ID', 'eventName', { param: 'value' });
```
Track custom events in Facebook Pixel:

```javascript
analytics.meta.track('FB_PIXEL_ID', 'eventName', { param: 'value' });
```
###Disabling Analytics

Disable Google Analytics tracking:
```javascript
analytics.google.disable('GA_MEASUREMENT_ID');
```
Disable Facebook Pixel tracking:
```javascript
analytics.meta.disable('FB_PIXEL_ID');
```
npm package: @fiddle-digital/string-responsive
Description: StringResponsive is a comprehensive JavaScript library for responsive design management in web applications. It enables dynamic handling of device-specific media queries and events, allowing developers to programmatically adjust UI and functionality based
Latest version: 0.0.2


![Alpha](https://img.shields.io/badge/Status-Alpha-red)
  
# StringResponsive Library

## Overview

StringResponsive is a powerful JavaScript library designed to manage responsive design across mobile, tablet, laptop, and desktop devices. It enables developers to dynamically handle media queries and respond to device-specific conditions, enhancing the user experience by adapting the user interface and functionality based on the user's device.

## Features

- **Dynamic Media Queries**: Manage CSS media queries dynamically based on device specifications.
- **Event-Driven Responses**: Trigger events when a device type matches or mismatches specified criteria.
- **Extensive Device Support**: Includes built-in configurations for mobile, tablet, laptop, and desktop.
- **Customizable Device Settings**: Easily adjust settings like screen width ranges for each device type.

## Installation

Install StringResponsive using npm:

```sh
npm install @fiddle-digital/string-responsive
```

##Usage
**Initializing the Library**
Import and initialize StringResponsive in your project:

```javascript
import StringResponsive from '@fiddle-digital/string-responsive';
```
```javascript
const responsive = StringResponsive.getInstance();
```

##Configuring Device Queries
**Set up device-specific queries:**

```javascript
responsive.setQuery({
    mobile: { min: 0, max: 359, enable: true },
    tablet: { min: 360, max: 1079, enable: true },
    laptop: { min: 1080, max: 1365, enable: true },
    desktop: { min: 1366, max: undefined, enable: true }
});
```

##Handling Device-Specific Events
**Add event listeners for specific device states:**

```javascript
responsive.mobile.addIn(() => {
    console.log('Now viewing on mobile device');
});

responsive.desktop.addOut(() => {
    console.log('No longer viewing on desktop');
});
```

**Responding to Device Changes**
```javascript
responsive.tablet.on('accept', () => {
    console.log('Tablet specific changes accepted');
});
```
npm package: @fiddle-digital/string-storage
Description: A lightweight and versatile JavaScript library for managing local and session storage in web applications. Offers automatic data persistence with expiry, seamless integration with form elements, and support for complex data structures. Ideal for enhancing
Latest version: 0.0.1

![Status](https://img.shields.io/badge/Status-Alpha-red)

## Overview

StringStorage is a TypeScript-based library that simplifies working with Web Storage (localStorage and sessionStorage), providing automatic handling of data persistence with expiration, seamless integration with HTML form elements, and support for complex data structures. It's crafted to enhance user experience by persisting form inputs and application states across sessions with minimal setup.

## Features

- **Automatic Persistence:** Effortlessly saves and restores form inputs and application state across page reloads and sessions.
- **Expiration Support:** Allows setting expiration times for stored data, automatically removing expired data.
- **Easy Integration:** Works out of the box with form elements for saving and restoring their values without additional coding.
- **Complex Data Handling:** Supports saving not just string values but also complex data structures in a JSON-compatible format.
- **Session and Local Storage Management:** Provides a unified API to interact with both localStorage and sessionStorage, simplifying their use.

## Installation

```sh
npm install @fiddle-digital/string-storage
```

#### Then, import it in your project:

```javascript
import StringStorage from '@fiddle-digital/string-storage';
```

#### Initialization
To start using StringStorage:

```javascript
const storage = StringStorage.getInstance();
```

#### Working with Form Elements
StringStorage can automatically save and restore the values of form elements. Simply add the data-string-storage attribute to your form:

```xml
<form data-string-storage>
  <input type="text" data-string-id="username" />
  <textarea data-string-id="bio"></textarea>
  <select data-string-id="country">
    <option value="us">United States</option>
    <option value="ca">Canada</option>
  </select>
  <button type="submit">Submit</button>
</form>
```

#### Saving Data
To save data to localStorage:
```javascript
storage.local.set('key', 'value', {days: 1});
```

To save data to sessionStorage:
```javascript
storage.session.set('key', 'value');
```

#### Retrieving Data
To retrieve data from localStorage:
```javascript
const value = storage.local.get('key', 'default');
```

#### Checking for Data Existence
```javascript
const exists = storage.local.has('key');
```

#### Removing Data
To remove data from localStorage:
```javascript
storage.local.delete('key');
```

#### Data Expiration
StringStorage allows setting expiration for stored data, which is automatically respected and cleaned up:
```javascript
storage.local.set('temporary', 'data', {hours: 1});
```
After 1 hour, temporary will be automatically removed from storage.
npm package: @fiddle-digital/string-validation
Description: A versatile, TypeScript-driven validation library for web forms, offering dynamic, client-side validation through HTML data attributes. Supports various validation types including email, phone numbers, numeric and textual inputs, required fields, and cust
Latest version: 0.0.1


![Alpha](https://img.shields.io/badge/Status-Alpha-red)
  
## Overview

StringValidation is a dynamic, client-side form validation library crafted with TypeScript, facilitating the integration of validation directly through HTML data attributes. It enables the development of interactive, user-friendly forms by providing instant feedback on the data entered by users. With support for standard validation rules like email, phone numbers, and custom patterns, as well as input restriction based on these validations, it stands as a robust solution for enhancing form interactivity and ensuring data integrity.

## Installation

To include StringValidation in your project, use a package manager:
```sh
npm install @fiddle-digital/string-validation
```
Then, import it in your project:
```javascript
import { StringValidation } from '@fiddle-digital/string-validation';
```

## Usage

To apply validation, attach data attributes for desired validation rules to your form elements:
```xml
<form action="" data-string-validation-form="signup">
  <input type="text" data-string-id="email" data-string-validation="email|Email not formatted correctly;required|Field is required">
  <div data-string-validation-error="email"></div>
  <button type="submit">Submit</button>
</form>
```
Initialize the validation:
```javascript
const validation = StringValidation.getInstance();
```

## Validation Rules

StringValidation supports a wide array of validation rules, easily configured via data attributes:

| HTML attribute | Description  |
|--|--|
| ``data-string-validation`` | Specifies the validation rules and error messages for the input. |
| ``data-string-id`` | A unique identifier for connecting input fields with their error display elements. |
| ``data-string-validation-error`` | Indicates where to display the error message for a specific input. |

### Supported Validation Types:

``email``: Validates email formats.
``phone``: Validates phone numbers with support for country-specific formats.
``number``: Ensures only numerical input is accepted.
``text``: Allows only textual input, excluding numbers.
``enum``: Validates input against a predefined set of values.
``required``: Marks a field as mandatory.
npm package: @fidec/authsdk
Description: This sdk is a framework for websites to install and integrate login into the authentication page using the Fidec application.
Author: manhvu
Latest version: 1.1.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Fidec Authentication SDK

The Fidec Authentication SDK is a framework for websites to integrate login functionality through the Fidec application’s authentication page.

## Installation

To install the SDK, use npm:

```bash
npm install @fidec/authsdk

```

## Cloud
Go to [Fidec Cloud](https://fidec.io/cloud), log in, and generate your key there.


## Example Usage

```bash
import FidecAuth from "@fidec/authsdk";

// Initialize the FidecAuth instance with your configuration
const auth = new FidecAuth({
  key: "your_key",
  rpc: "your_auth_url",
  app_name: "your_app_name",
});

// Function to handle login and fetch user information
(async () => {
  try {
    // Open QR code login and get the authentication ID
    const result = await auth.openQRCodeLogin();

    // Retrieve user information using the authentication ID
    const user = await auth.getUserInfo(result.authId);

    // Log the user information
    console.log({ user });

    // Example user object structure
    // {
    //   user_account: string,
    //   user_avatar: string,
    //   user_cardId: string,
    //   user_email: string,
    //   user_firstName: string,
    //   user_fullName: string,
    //   user_gender: string,
    //   user_lastName: string,
    //   user_localAddress: string,
    //   user_role: string,
    //   user_telephone: string,
    // }
  } catch (error) {
    console.error("Error during authentication:", error);
  }
})();

```

## Contributing
If you would like to contribute to this project, please feel free to submit a pull request.

## License
This project is licensed under the MIT License.

This format ensures each code section is properly closed and clearly separated. Let me know if this is what you were aiming for!
npm package: @fidecauth/sdk
Description: This sdk is a framework for websites to install and integrate login into the authentication page using the Fidec application.
Author: manhvu
Latest version: 1.0.10-beta

# Fidec Authentication SDK

The Fidec Authentication SDK is a framework for websites to integrate login functionality through the Fidec application’s authentication page.

## Installation

To install the SDK, use npm:

```bash
npm install @fidec/authsdk

```

## Cloud
Go to [Fidec Cloud](https://fidec.io/cloud), log in, and generate your key there.


## Example Usage

```bash
import FidecAuth from "@fidec/authsdk";

// Initialize the FidecAuth instance with your configuration
const auth = new FidecAuth({
  key: "your_key",
  rpc: "your_auth_url",
  app_name: "your_app_name",
});

// Function to handle login and fetch user information
(async () => {
  try {
    // Open QR code login and get the authentication ID
    const result = await auth.openQRCodeLogin();

    // Retrieve user information using the authentication ID
    const user = await auth.getUserInfo(result.authId);

    // Log the user information
    console.log({ user });

    // Example user object structure
    // {
    //   user_account: string,
    //   user_avatar: string,
    //   user_cardId: string,
    //   user_email: string,
    //   user_firstName: string,
    //   user_fullName: string,
    //   user_gender: string,
    //   user_lastName: string,
    //   user_localAddress: string,
    //   user_role: string,
    //   user_telephone: string,
    // }
  } catch (error) {
    console.error("Error during authentication:", error);
  }
})();

```

## Contributing
If you would like to contribute to this project, please feel free to submit a pull request.

## License
This project is licensed under the MIT License.

This format ensures each code section is properly closed and clearly separated. Let me know if this is what you were aiming for!
npm package: @fidel_wole/sdk
Description: 🛠 An SDK for building applications on top of Uniswap.
Latest version: 1.0.4

# Uniswap SDK

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Actions Status](https://github.com/Uniswap/uniswap-sdk/workflows/CI/badge.svg)](https://github.com/Uniswap/uniswap-sdk)
[![npm version](https://img.shields.io/npm/v/@uniswap/sdk/latest.svg)](https://www.npmjs.com/package/@uniswap/sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/Uniswap/uniswap-sdk.git
```

Move into the uniswap-sdk working directory

```sh
cd uniswap-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @fidelcastro95/tiny
Description: a tiny package, that removes all spaces from a string
Author: @fidelcastro95
Latest version: 2.0.0

# @fidelcastro95/tiny

![npm (scoped)](https://img.shields.io/npm/v/@fidelcastro95/tiny)

Removes all spaces from a string

## Install

```
$ npm install @fidelcastro95/tiny
```

## Usage

```js
const tiny = require("@fidelcastro95/tiny");

tiny("So much space!");
//=> "Somuchspace!"

tiny(1337);
//=> Uncaught TypeError: Tiny wants a string!
//    at tiny (<anonymous>:2:41)
//    at <anonymous>:1:1
```
npm package: @fidelios/adapter-openclaw-gateway
Description: This document describes how `@fidelios/adapter-openclaw-gateway` invokes OpenClaw over the Gateway protocol.
Latest version: 0.0.3

# OpenClaw Gateway Adapter

This document describes how `@fidelios/adapter-openclaw-gateway` invokes OpenClaw over the Gateway protocol.

## Transport

This adapter always uses WebSocket gateway transport.

- URL must be `ws://` or `wss://`
- Connect flow follows gateway protocol:
1. receive `connect.challenge`
2. send `req connect` (protocol/client/auth/device payload)
3. send `req agent`
4. wait for completion via `req agent.wait`
5. stream `event agent` frames into FideliOS logs/transcript parsing

## Auth Modes

Gateway credentials can be provided in any of these ways:

- `authToken` / `token` in adapter config
- `headers.x-openclaw-token`
- `headers.x-openclaw-auth` (legacy)
- `password` (shared password mode)

When a token is present and `authorization` header is missing, the adapter derives `Authorization: Bearer <token>`.

## Device Auth

By default the adapter sends a signed `device` payload in `connect` params.

- set `disableDeviceAuth=true` to omit device signing
- set `devicePrivateKeyPem` to pin a stable signing key
- without `devicePrivateKeyPem`, the adapter generates an ephemeral Ed25519 keypair per run
- when `autoPairOnFirstConnect` is enabled (default), the adapter handles one initial `pairing required` by calling `device.pair.list` + `device.pair.approve` over shared auth, then retries once.

## Session Strategy

The adapter supports the same session routing model as HTTP OpenClaw mode:

- `sessionKeyStrategy=issue|fixed|run`
- `sessionKey` is used when strategy is `fixed`

Resolved session key is sent as `agent.sessionKey`.

## Payload Mapping

The agent request is built as:

- required fields:
  - `message` (wake text plus optional `payloadTemplate.message`/`payloadTemplate.text` prefix)
  - `idempotencyKey` (FideliOS `runId`)
  - `sessionKey` (resolved strategy)
- optional additions:
  - all `payloadTemplate` fields merged in
  - `agentId` from config if set and not already in template

## Timeouts

- `timeoutSec` controls adapter-level request budget
- `waitTimeoutMs` controls `agent.wait.timeoutMs`

If `agent.wait` returns `timeout`, adapter returns `openclaw_gateway_wait_timeout`.

## Log Format

Structured gateway event logs use:

- `[openclaw-gateway] ...` for lifecycle/system logs
- `[openclaw-gateway:event] run=<id> stream=<stream> data=<json>` for `event agent` frames

UI/CLI parsers consume these lines to render transcript updates.
npm package: @fidelios/create-fidelios-plugin
Description: Scaffolding tool for creating new FideliOS plugins.
Latest version: 0.0.3

# @fidelios/create-fidelios-plugin

Scaffolding tool for creating new FideliOS plugins.

```bash
npx @fidelios/create-fidelios-plugin my-plugin
```

Or with options:

```bash
npx @fidelios/create-fidelios-plugin @acme/my-plugin \
  --template connector \
  --category connector \
  --display-name "Acme Connector" \
  --description "Syncs Acme data into FideliOS" \
  --author "Acme Inc"
```

Supported templates: `default`, `connector`, `workspace`  
Supported categories: `connector`, `workspace`, `automation`, `ui`

Generates:
- typed manifest + worker entrypoint
- example UI widget using the supported `@fidelios/plugin-sdk/ui` hooks
- test file using `@fidelios/plugin-sdk/testing`
- `esbuild` and `rollup` config files using SDK bundler presets
- dev server script for hot-reload (`fidelios-plugin-dev-server`)

The scaffold intentionally uses plain React elements rather than host-provided UI kit components, because the current plugin runtime does not ship a stable shared component library yet.

Inside this repo, the generated package uses `@fidelios/plugin-sdk` via `workspace:*`.

Outside this repo, the scaffold snapshots `@fidelios/plugin-sdk` from your local FideliOS checkout into a `.fidelios-sdk/` tarball and points the generated package at that local file by default. You can override the SDK source explicitly:

```bash
node packages/plugins/create-fidelios-plugin/dist/index.js @acme/my-plugin \
  --output /absolute/path/to/plugins \
  --sdk-path /absolute/path/to/fidelios/packages/plugins/sdk
```

That gives you an outside-repo local development path before the SDK is published to npm.

## Workflow after scaffolding

```bash
cd my-plugin
pnpm install
pnpm dev       # watch worker + manifest + ui bundles
pnpm dev:ui    # local UI preview server with hot-reload events
pnpm test
```
npm package: @fidelios/ui
Description: Prebuilt FideliOS board UI assets.
Latest version: 0.0.3

# @fidelios/ui

Published static assets for the FideliOS board UI.

## What gets published

The npm package contains the production build under `dist/`. It does not ship the UI source tree or workspace-only dependencies.

## Typical use

Install the package, then serve or copy the built files from `node_modules/@fidelios/ui/dist`.
npm package: @fideliosai/adapter-openclaw-gateway
Description: This document describes how `@fideliosai/adapter-openclaw-gateway` invokes OpenClaw over the Gateway protocol.
Latest version: 0.0.27

# OpenClaw Gateway Adapter

This document describes how `@fideliosai/adapter-openclaw-gateway` invokes OpenClaw over the Gateway protocol.

## Transport

This adapter always uses WebSocket gateway transport.

- URL must be `ws://` or `wss://`
- Connect flow follows gateway protocol:
1. receive `connect.challenge`
2. send `req connect` (protocol/client/auth/device payload)
3. send `req agent`
4. wait for completion via `req agent.wait`
5. stream `event agent` frames into FideliOS logs/transcript parsing

## Auth Modes

Gateway credentials can be provided in any of these ways:

- `authToken` / `token` in adapter config
- `headers.x-openclaw-token`
- `headers.x-openclaw-auth` (legacy)
- `password` (shared password mode)

When a token is present and `authorization` header is missing, the adapter derives `Authorization: Bearer <token>`.

## Device Auth

By default the adapter sends a signed `device` payload in `connect` params.

- set `disableDeviceAuth=true` to omit device signing
- set `devicePrivateKeyPem` to pin a stable signing key
- without `devicePrivateKeyPem`, the adapter generates an ephemeral Ed25519 keypair per run
- when `autoPairOnFirstConnect` is enabled (default), the adapter handles one initial `pairing required` by calling `device.pair.list` + `device.pair.approve` over shared auth, then retries once.

## Session Strategy

The adapter supports the same session routing model as HTTP OpenClaw mode:

- `sessionKeyStrategy=issue|fixed|run`
- `sessionKey` is used when strategy is `fixed`

Resolved session key is sent as `agent.sessionKey`.

## Payload Mapping

The agent request is built as:

- required fields:
  - `message` (wake text plus optional `payloadTemplate.message`/`payloadTemplate.text` prefix)
  - `idempotencyKey` (FideliOS `runId`)
  - `sessionKey` (resolved strategy)
- optional additions:
  - all `payloadTemplate` fields merged in
  - `agentId` from config if set and not already in template

## Timeouts

- `timeoutSec` controls adapter-level request budget
- `waitTimeoutMs` controls `agent.wait.timeoutMs`

If `agent.wait` returns `timeout`, adapter returns `openclaw_gateway_wait_timeout`.

## Log Format

Structured gateway event logs use:

- `[openclaw-gateway] ...` for lifecycle/system logs
- `[openclaw-gateway:event] run=<id> stream=<stream> data=<json>` for `event agent` frames

UI/CLI parsers consume these lines to render transcript updates.
npm package: @fideliosai/create-fidelios-plugin
Description: Scaffolding tool for creating new FideliOS plugins.
Latest version: 0.0.27

# @fideliosai/create-fidelios-plugin

Scaffolding tool for creating new FideliOS plugins.

```bash
npx @fideliosai/create-fidelios-plugin my-plugin
```

Or with options:

```bash
npx @fideliosai/create-fidelios-plugin @acme/my-plugin \
  --template connector \
  --category connector \
  --display-name "Acme Connector" \
  --description "Syncs Acme data into FideliOS" \
  --author "Acme Inc"
```

Supported templates: `default`, `connector`, `workspace`  
Supported categories: `connector`, `workspace`, `automation`, `ui`

Generates:
- typed manifest + worker entrypoint
- example UI widget using the supported `@fideliosai/plugin-sdk/ui` hooks
- test file using `@fideliosai/plugin-sdk/testing`
- `esbuild` and `rollup` config files using SDK bundler presets
- dev server script for hot-reload (`fidelios-plugin-dev-server`)

The scaffold intentionally uses plain React elements rather than host-provided UI kit components, because the current plugin runtime does not ship a stable shared component library yet.

Inside this repo, the generated package uses `@fideliosai/plugin-sdk` via `workspace:*`.

Outside this repo, the scaffold snapshots `@fideliosai/plugin-sdk` from your local FideliOS checkout into a `.fidelios-sdk/` tarball and points the generated package at that local file by default. You can override the SDK source explicitly:

```bash
node packages/plugins/create-fidelios-plugin/dist/index.js @acme/my-plugin \
  --output /absolute/path/to/plugins \
  --sdk-path /absolute/path/to/fidelios/packages/plugins/sdk
```

That gives you an outside-repo local development path before the SDK is published to npm.

## Workflow after scaffolding

```bash
cd my-plugin
pnpm install
pnpm dev       # watch worker + manifest + ui bundles
pnpm dev:ui    # local UI preview server with hot-reload events
pnpm test
```
npm package: @fideliosai/ui
Description: Prebuilt FideliOS board UI assets.
Latest version: 0.0.27

# @fideliosai/ui

Published static assets for the FideliOS board UI.

## What gets published

The npm package contains the production build under `dist/`. It does not ship the UI source tree or workspace-only dependencies.

## Typical use

Install the package, then serve or copy the built files from `node_modules/@fideliosai/ui/dist`.