open-index/open-npm huggingface dataset:
npm package: @lofa199419/ui-patcher
Description: Apply and restore custom Control UI build artifacts for OpenClaw
Latest version: 0.0.4

# UI Patcher (bundled extension)

This extension applies a prebuilt custom `dist/control-ui` bundle when enabled.

## Behavior

- On gateway start: backs up current `dist/control-ui` to plugin state and applies patched UI.
- On gateway stop: restores original `dist/control-ui` from backup (default behavior).
- WAHA isolation: if `extensions/waha` is detected, UI patch apply is skipped; if a prior patch was active, original UI is restored.
- Runtime UI overrides:
  - Chat watermark URL/opacity/size from plugin config
  - WhatsApp guide button opens a new chat message prompt
  - Extra Shepherd tutorial button with config-driven steps

## Config

```json
{
  "plugins": {
    "entries": {
      "ui-patcher": {
        "enabled": true,
        "config": {
          "enabled": true,
          "autoRestoreOnStop": true,
          "watermarkUrl": "https://finaltouch.whatsynaptic.com/assets/brand-logo-uBqNKeuY.gif",
          "watermarkOpacity": 0.22,
          "watermarkWidth": "220px",
          "guidePrompt": "help me log into WhatsApp",
          "tutorialButtonLabel": "UI Tutorial",
          "tourSteps": [
            {
              "id": "channels",
              "title": "Channels",
              "text": "Manage account linking and channel health here.",
              "selector": "[data-tour-tab=\"channels\"]",
              "position": "bottom"
            },
            {
              "id": "show-qr",
              "title": "Show QR",
              "text": "Click Show QR to generate a pairing code for first-time WhatsApp login.",
              "selector": "[data-tour=\"whatsapp-show-qr\"]",
              "position": "bottom"
            },
            {
              "id": "scan-qr",
              "title": "Scan QR",
              "text": "Scan this QR in WhatsApp on your phone to complete linking.",
              "selector": "[data-tour=\"whatsapp-qr\"]",
              "position": "top"
            }
          ]
        }
      }
    }
  }
}
```

## Quick Install Script

From inside extracted `ui-patcher` directory:

```bash
./scripts/install-ui-patcher.sh
```

Profile/state examples:

```bash
./scripts/install-ui-patcher.sh --profile dev
./scripts/install-ui-patcher.sh --state-dir /data/.openclaw
OPENCLAW_STATE_DIR=/data/.openclaw ./scripts/install-ui-patcher.sh
OPENCLAW_CONFIG_PATH=/data/.openclaw/openclaw.json ./scripts/install-ui-patcher.sh
```

What it does:
- checks for `jq`, installs it if missing
- copies plugin files to `~/.openclaw/extensions/ui-patcher`
- enables `ui-patcher` in `~/.openclaw/openclaw.json`
- prints restart command (`openclaw gateway restart`)

## Notes

- This patches built artifacts directly and is intended for custom/self-hosted workflows.
- If you run `pnpm ui:build` while gateway is running, restart gateway to re-apply patch.
npm package: @lofa199419/waha-v2
Description: OpenClaw WAHA v2 channel plugin — independent WhatsApp HTTP API integration
Latest version: 3.1.1-context.9

# `@lofa199419/waha-v2`

OpenClaw WAHA v2 channel plugin with a packaged local CLI wrapper for WAHA session and messaging operations.

## What ships

- OpenClaw plugin files: `index.ts`, `src/`, `openclaw.plugin.json`
- Skill docs: `skills/waha-v2/SKILL.md`
- Local CLI wrappers:
  - `bin/waha-cli`
  - `bin/wa`
  - `bin/wa-adv`
  - `bin/waha-advanced-entrypoint`
  - `bin/waha_cli.py`

## Install into an OpenClaw state dir

```bash
npm install @lofa199419/waha-v2
node node_modules/@lofa199419/waha-v2/scripts/install-openclaw-extension.mjs --state-dir /data/.openclaw --force
```

Or with `OPENCLAW_STATE_DIR`:

```bash
OPENCLAW_STATE_DIR=/data/.openclaw node node_modules/@lofa199419/waha-v2/scripts/install-openclaw-extension.mjs --force
```

## Runtime configuration

The plugin package does not ship secrets. Provide WAHA configuration through your container or startup flow and render:

```bash
/data/.openclaw/extensions/waha-v2/bin/.env
```

Expected values:

```dotenv
WAHA_URL=https://your-waha-host
WAHA_API_KEY=your-api-key
WAHA_SESSION_DEFAULT=power
```

## Publish checklist

```bash
npm pack --dry-run
npm publish --access public
```