open-index/open-npm huggingface dataset:
npm package: @lrdcxdes/mineflayer-pvp
Description: hi there
Author: TheDudeFromCI
Latest version: 1.3.36
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

<h1 align="center">mineflayer-pvp</h1>
<p align="center"><i>A lightweight plugin for Mineflayer that makes it easier to manage PVP and PVE actions.</i></p>

<p align="center">
  <img src="https://github.com/TheDudeFromCI/mineflayer-plugin-template/workflows/Build/badge.svg" />
  <img src="https://img.shields.io/npm/v/mineflayer-pvp" />
  <img src="https://img.shields.io/github/repo-size/TheDudeFromCI/mineflayer-pvp" />
  <img src="https://img.shields.io/npm/dm/mineflayer-pvp" />
  <img src="https://img.shields.io/github/contributors/TheDudeFromCI/mineflayer-pvp" />
  <img src="https://img.shields.io/github/license/TheDudeFromCI/mineflayer-pvp" />
</p>

---

### Getting Started

This plugin is built using Node and can be installed using:
```bash
npm install --save mineflayer-pvp
```

**Plugin Dependencies**
These plugins must be loaded using `bot.loadPlugin` in order to use this plugin.

* [**mineflayer-pathfinder**](https://github.com/Karang/mineflayer-pathfinder)

### Simple Bot

The brief description goes here.

```js
const mineflayer = require('mineflayer')
const { pathfinder, Movements, goals } = require('mineflayer-pathfinder')
const pvp = require('mineflayer-pvp').plugin

const bot = mineflayer.createBot({ 'Guard' })

bot.loadPlugin(pathfinder)
bot.loadPlugin(pvp)

bot.on('chat', (username, message) => {
  if (message === 'fight me') {
    const player = bot.players[username]

    if (!player) {
      bot.chat("I can't see you.")
      return
    }

    bot.pvp.attack(player.entity)
  }

  if (message === 'stop') {
    bot.pvp.stop()
  }
})
```

### Documentation

[API](https://github.com/TheDudeFromCI/mineflayer-pvp/blob/master/docs/api.md)

[Examples](https://github.com/TheDudeFromCI/mineflayer-pvp/tree/master/examples)

**Video Tutorial:**

<a href="https://youtu.be/Giu0ADA5uo8"><img src="https://img.youtube.com/vi/Giu0ADA5uo8/hqdefault.jpg" width="256" /></a>

### License

This project uses the [MIT](https://github.com/TheDudeFromCI/mineflayer-pvp/blob/master/LICENSE) license.

### Contributions

This project is accepting PRs and Issues. See something you think can be improved? Go for it! Any and all help is highly appreciated!

For larger changes, it is recommended to discuss these changes in the issues tab before writing any code. It's also preferred to make many smaller PRs than one large one, where applicable.
npm package: @lrddrl/minimax-1008-guard
Description: Intercepts MiniMax 1008 billing errors (context overflow), auto-compacts session, prevents gateway hangs
Author: lrddrl
Latest version: 1.0.1

# minimax-1008-guard

**Author: [lrddrl](https://github.com/lrddrl)**

OpenClaw hook that intercepts MiniMax `insufficient balance (1008)` errors — the ones that usually mean "context window exceeded", not "you're out of money". Auto-compacts the session and prevents gateway hangs.

## The Problem

MiniMax returns HTTP 500 `insufficient balance (1008)` both when:
- Your account has no credits (true billing error — rare)
- Your request exceeded the model's 20M token context window (very common in long conversations)

OpenClaw treats both the same: a fatal billing error that **hangs the gateway indefinitely**, requiring manual SIGTERM to restart. This affects every long-running OpenClaw + MiniMax session.

Related issues: [#24622](https://github.com/openclaw/openclaw/issues/24622), [#30484](https://github.com/openclaw/openclaw/issues/30484)

## Features

- 🦞 Detects 1008 errors via `session:patch` events
- 📊 Checks context utilisation before deciding action
- ⚡ Auto-compacts session via `/compact` (context overflow recovery)
- 💬 Clear Chinese + English notification to user
- 🔒 Never crashes the gateway — always keeps it alive

## Install

```bash
openclaw plugins install @lrddrl/minimax-1008-guard
openclaw gateway restart
```

## Config

```json
{
  "hooks": {
    "internal": {
      "entries": {
        "minimax-1008-guard": {
          "enabled": true,
          "contextThresholdPct": 85,
          "autoAction": "compact"
        }
      }
    }
  }
}
```

| Option | Default | Description |
|--------|---------|-------------|
| `contextThresholdPct` | 85 | % of context window that triggers auto-compact |
| `autoAction` | `compact` | `compact` or `new` (start fresh session) |

## Requirements

- OpenClaw
- Node.js ≥ 18
- MiniMax as your LLM provider

## License

MIT

---

For the full story behind this hook, see [HOOK.md](HOOK.md).
npm package: @lreading/another-ts-express-framework
Description: Just another opinionated ts/express framework
Author: Leo Reading
Latest version: 1.2.3

# another-optinionated-ts-express-framework
Just another opinionated TypeScript / Express Framework

## TODO:
- Document overall usage better
- Document expanding classes
- Document Entity structure
- Document Services
- Document Controllers
- Document Secrets

```typescript
import { getLogger } from '@lreading/typescript-winston-logger';
import express, { Express } from 'express';
import { AllowAnonymous, Controller, ExpressErrorHandler, Get, registerControllers } from '@lreading/another-ts-express-framework';
import http from 'http';


@Controller('/api/unauth')
class UnauthController {
    @Get('/')
    @AllowAnonymous()
    get() {
        return ['foo', 'bar', 'baz'];
    }
}


class Server {
    app: Express;
    server: http.Server;

    constructor() {
        this.app = express();

        const handler = new ExpressErrorHandler();

        registerControllers(this.app, getLogger('test.ts'), [
            UnauthController
        ]);

        this.app.use(handler.notFound.bind(handler));
        this.app.use(handler.catchAll.bind(handler));
    }

    async start() {
        return this.app.listen(3000, () => {
            console.log(`Server started on http://localhost:3000/`);
        });
    }
}

(async () => {
    const server = new Server();
    await server.start();
})();
```
npm package: @lreading/ts-logger
Description: An opinionated logger for TypeScript projects
Author: Leo Reading
Latest version: 1.0.12

# TS-Logger: Another opinionated logger for TypeScript
This is just my preferences for confiruing my logging in my typescript projects.

## Usage
```typescript
import { getLogger, Logger } from '@lreading/ts-logger';

const logger: Logger = getLogger('my-file-name.ts');

logger.silly(string|object); // Disabled by default
logger.debug(string|object); // Disabled by default
logger.info(string|object); // Enabled by default
logger.warn(string|object); // Enabled by default
logger.error(string|object); // Enabled by default
logger.audit(string|object); // Enabled by default
```

## Configuration
There is some default configuration.  The config can be overwritten by using the `configure` function.

```typescript
import { configure } from '@lreading/ts-logger';

configure({
  logLevel: 'debug',
  maxFileSize: 50000,
  silent: false
});
```

### Log Levels
```typescript
// See src/levels.ts
const levels: winston.config.AbstractConfigSetLevels = {
	audit: 0,
	fatal: 1,
	error: 2,
	warn: 3,
	info: 4,
	debug: 5,
	silly: 6
};
```

## Audit Logging
Audit logs are saved to a separate file, aptly named `audit.log`.  Audit logs are logged at the highest level, and will always appear in the console log.
npm package: @lreading/ts-secrets
Description: A typescript library for loading secrets from environment variables or files
Author: Leo Reading
Latest version: 1.0.6

# TSSecrets
Lightweight Typescript library (0 direct dependencies) to abstract away reading secrets from the environment or files.  This works similar to how other libraries and packages work, where you can provide an environment variable as the name, or if you append `__FILE` to the end of the variable name, it will read the file at the path specified in the environment variable.

## Usage
Using your preferred method to load secrets to the environment or filesystem, you can retrieve them using the following methods:
```TypeScript
import secrets from '@lreading/ts-secrets';

const port = secrets.int({ name: 'PORT', required: false, default: 3000 });
const db = secrets.string({ name: 'DB__FILE', required: true });
const config = secrets.json({ name: 'CONFIG', required: true });
const isDev = secrets.bool({ name: 'IS_DEV', required: false, default: false });
const timeout = secrets.float({ name: 'TIMEOUT', required: false, default: 5.0 });
```

## Supported "Types"

Types are in quotes, because a couple of these aren't real types, but I find myself using frequently.  For example, int vs float:  An "int" is useful in the case of defining a port number when configuring a server, whereas it's really just a "number" under the hood.  I made the distinction between ints and floats due to the way the values are parsed.

- string
- int
- float
- bool
- json (parses a string into an object)
npm package: @lreading/typescript-winston-logger
Description: A Typescript Winston logger with some pre-configured options
Author: Leo Reading
Latest version: 1.0.4
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Typescript Winston Logger
Typescript Winston Logger is an abstraction for the [Winston Logger](https://github.com/winstonjs/winston) that has some configuration applied.
Notable configuration:
- Colors by default
- Audit logging (separate file transport)
- File and console logging
- Labels so you can log per service/file

## Is this the right logging lib for you?
Probably not. This is very opinionated and is only intended to speed up bootstrapping my own development.  It's [licensed](LICENSE) under MIT, so feel free to use it or fork it to create your own implementation/configuration.

## Configuration
There is default configuration applied.  If changing from the default configuration, do so before anything else calls the logger.

```typescript
import { getLoggerConfig, LoggerLevels } from '@lreading/typescript-winston-logger';

const config = getLoggerConfig();
config.level = LoggerLevels.debug;
config.silent = true; // Useful for unit testing
config.maxfileSize = 2000;
```

## Usage
```typescript
// Configuration is optional, defaults are applied
import { getLogger } from '@lreading/typescript-winston-logger';

const logger = getLogger();

logger.info('This is info level logging');
logger.info({ foo: 'bar'});
logger.audit('Something important happened, audit logging is important!');
```