open-index/open-npm huggingface dataset:
npm package: @hoge1e3/util
Description: Node.js's util module for all engines(solving undefined process issue from orignal Joyent version)
Author: hoge1e3
Latest version: 0.12.6

# util [![Build Status](https://travis-ci.org/browserify/node-util.png?branch=master)](https://travis-ci.org/browserify/node-util)

> Node.js's [util][util] module for all engines.

This implements the Node.js [`util`][util] module for environments that do not have it, like browsers.

## Install

You usually do not have to install `util` yourself. If your code runs in Node.js, `util` is built in. If your code runs in the browser, bundlers like [browserify](https://github.com/browserify/browserify) or [webpack](https://github.com/webpack/webpack) (up to version 4 -- [see this documentation](https://webpack.js.org/configuration/resolve/#resolvefallback) for how to include polyfills like `util` in webpack 5+) also include the `util` module.

But if none of those apply, with npm do:

```shell
npm install util
```

## Usage

```javascript
var util = require('util')
var EventEmitter = require('events')

function MyClass() { EventEmitter.call(this) }
util.inherits(MyClass, EventEmitter)
```

## Browser Support

The `util` module uses ES5 features. If you need to support very old browsers like IE8, use a shim like [`es5-shim`](https://www.npmjs.com/package/es5-shim). You need both the shim and the sham versions of `es5-shim`.

To use `util.promisify` and `util.callbackify`, Promises must already be available. If you need to support browsers like IE11 that do not support Promises, use a shim. [es6-promise](https://github.com/stefanpenner/es6-promise) is a popular one but there are many others available on npm.

## API

See the [Node.js util docs][util].  `util` currently supports the Node 8 LTS API. However, some of the methods are outdated. The `inspect` and `format` methods included in this module are a lot more simple and barebones than the ones in Node.js.

## Contributing

PRs are very welcome! The main way to contribute to `util` is by porting features, bugfixes and tests from Node.js. Ideally, code contributions to this module are copy-pasted from Node.js and transpiled to ES5, rather than reimplemented from scratch. Matching the Node.js code as closely as possible makes maintenance simpler when new changes land in Node.js.
This module intends to provide exactly the same API as Node.js, so features that are not available in the core `util` module will not be accepted. Feature requests should instead be directed at [nodejs/node](https://github.com/nodejs/node) and will be added to this module once they are implemented in Node.js.

If there is a difference in behaviour between Node.js's `util` module and this module, please open an issue!

## License

[MIT](./LICENSE)

[util]: https://nodejs.org/docs/latest-v8.x/api/util.html
npm package: @hohaha/openclaw-event-bus-plugin
Description: OpenClaw Event Bus Plugin - Integrates event-driven architecture into OpenClaw Gateway
Author: hohaha
Latest version: 0.1.1

# @hohaha/openclaw-event-bus-plugin

OpenClaw Event Bus Plugin - Integrates event-driven architecture into OpenClaw Gateway.

## Features

- 🎯 **Event-First Architecture** - Capture all OpenClaw events
- 🔌 **Plugin Integration** - Seamlessly integrates with OpenClaw Gateway
- 📊 **Event Monitoring** - Query and analyze events
- 🔗 **HTTP API** - REST endpoint for event access
- 🛠️ **Agent Tool** - Tool for event inspection

## Installation

```bash
# Install plugin
openclaw plugins install @hohaha/openclaw-event-bus-plugin

# Or from local
openclaw plugins install ./openclaw-event-bus-plugin

# Restart gateway
openclaw gateway restart
```

## Configuration

Add to your OpenClaw config file:

```json5
{
  plugins: {
    entries: {
      "event-bus": {
        enabled: true,
        config: {
          persistence: {
            enabled: true,
            provider: "memory"  // or "sqlite"
          },
          debug: false
        }
      }
    }
  }
}
```

## Events Captured

| Event Type | OpenClaw Hook | Description |
|------------|---------------|-------------|
| `TOOL_INVOKED` | `before_tool_call` | Tool execution started |
| `TOOL_COMPLETED` | `after_tool_call` | Tool execution finished |
| `SESSION_STARTED` | `session_created` | New session created |
| `SESSION_ENDED` | `session_ended` | Session terminated |
| `ERROR_OCCURRED` | `error_occurred` | Error happened |

## HTTP API

### GET /api/events

Query events from the Event Bus.

```bash
curl http://localhost:8080/api/events
```

## Agent Tool

### event_bus_query

Query events from within agent sessions.

```text
/event_bus_query {"sessionId": "sess-123"}
```

## Architecture

```
OpenClaw Gateway
    │
    ├── Hooks (before_tool_call, after_tool_call, ...)
    │   │
    │   └─► Event Bus Plugin
    │       │
    │       ├── OpenClawEventBus
    │       │   ├── Event Queue
    │       │   ├── Event Store
    │       │   └── Subscribers
    │       │
    │       ├── HTTP Route (/api/events)
    │       └── Agent Tool (event_bus_query)
    │
    └── Sessions, Tools, Channels
```

## Development

```bash
# Build
npm run build

# Test
npm test

# Install locally for development
openclaw plugins install -l .
```

## License

MIT

## Related

- [@hohaha/event-bus](https://www.npmjs.com/package/@hohaha/event-bus) - Core Event Bus library
- [OpenClaw Plugin SDK](https://docs.openclaw.ai/plugins/sdk-overview) - Plugin development guide
npm package: @hohp/http-client
Description: Http client module
Author: quyennt
Latest version: 1.0.1

## Description

Http client module for [Nest](https://github.com/nestjs/nest) based on the [axios](https://github.com/axios/axios)
package.

## Installation

```bash
$ npm i --save axios
```

## Usage

Import `HttpClientModule`:

```typescript
@Module({
  imports: [HttpClientModule.register({ baseUrl: 'http://localhost:3000' })],
  providers: []
})
export class CatModule {}
```

Inject `HttpClientService`:

```typescript
@Injectable()
export class CatService {
  constructor(private readonly httpClientService: HttpClientService) {}
}
```

## Async options

Quite often you might want to asynchronously pass your module options instead of passing them beforehand. In such case, use `registerAsync()` method, that provides a couple of various ways to deal with async data.

**1. Use factory**

```typescript
HttpClientModule.registerAsync({
  useFactory: () => ({
    baseUrl: 'http://localhost:3000'
  })
});
```

Obviously, our factory behaves like every other one (might be `async` and is able to inject dependencies through `inject`).

```typescript
HttpClientModule.registerAsync({
  imports: [ConfigModule],
  useFactory: async (configService: ConfigService) => ({
    baseUrl: configService.get<string>('BASE_URL'),
  }),
  inject: [ConfigService],
})
```

**2. Use class**

```typescript
HttpClientModule.registerAsync({
  useClass: HttpClientConfigService
});
```

Above construction will instantiate `HttpClientConfigService` inside `HttpClientModule` and will leverage it to create options object.

```typescript
class HttpClientConfigService implements HttpClientModuleOptionsFactory {
  createHttpClientOptions(): HttpClientModuleOptions {
    return {
      baseUrl: 'http://localhost:3000'
    };
  }
}
```

**3. Use existing**

```typescript
HttpClientModule.registerAsync({
  imports: [ConfigModule],
  useExisting: ConfigService,
})
```

It works the same as `useClass` with one critical difference - `HttpClientModule` will look up imported modules to
reuse already created `ConfigService`, instead of instantiating it on its own.

## API Spec

The `HttpClientService` uses [axios](https://github.com/axios/axios) underneath.