open-index/open-npm huggingface dataset:
npm package: @ftaadarsh06/demo-lib
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.1.0.
Latest version: 0.0.1

# DemoLib

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.1.0.

## Code scaffolding

Run `ng generate component component-name --project demo-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project demo-lib`.
> Note: Don't forget to add `--project demo-lib` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build demo-lib` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build demo-lib`, go to the dist folder `cd dist/demo-lib` and run `npm publish`.

## Running unit tests

Run `ng test demo-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @ftai/openclaw-ftai
Description: OpenClaw FTAI bridge channel plugin
Latest version: 0.1.2

# @ftai/openclaw-ftai

OpenClaw plugin that registers the `ftai` bridge-backed messaging channel.

Configure it under `plugins.entries.openclaw-ftai.config`:

```json
{
  "plugins": {
    "entries": {
      "openclaw-ftai": {
        "enabled": true,
        "config": {
          "baseUrl": "<baseUrl>",
          "apiKey": "<apiKey>"
        }
      }
    }
  }
}
```

The channel bridge uses the same origin and connects to:

```text
wss://<baseUrl-path>/api/v1/openclaw-bridge/ws
```

Example: `https://ftai.chat/v1` becomes `wss://ftai.chat/v1/api/v1/openclaw-bridge/ws`.

The bridge protocol is intentionally small:

```json
{ "type": "hello", "protocol": "openclaw-bridge", "version": 1, "channel": "ftai", "capabilities": ["text", "image", "file"] }
```

```json
{
  "type": "message",
  "message": {
    "id": "msg_123",
    "chatId": "chat_456",
    "chatType": "direct",
    "chatName": "Alice",
    "senderId": "user_42",
    "senderName": "Alice",
    "senderUsername": "alice",
    "text": "hello",
    "replyToId": "msg_122",
    "timestamp": 1712400000000,
    "attachments": [
      {
        "type": "image",
        "name": "photo.png",
        "mimeType": "image/png",
        "dataBase64": "<base64>"
      }
    ]
  }
}
```

```json
{
  "type": "send",
  "requestId": "req_123",
  "message": {
    "target": "chat_456",
    "replyToId": "msg_123",
    "threadId": "thread_1",
    "parts": [
      { "type": "text", "text": "hi" },
      {
        "type": "file",
        "name": "report.pdf",
        "mimeType": "application/pdf",
        "dataBase64": "<base64>"
      }
    ]
  }
}
```

```json
{ "type": "send.result", "requestId": "req_123", "ok": true, "messageId": "msg_124", "chatId": "chat_456" }
```

```json
{ "type": "send.error", "requestId": "req_123", "error": "delivery failed" }
```

Agent replies stream back to the server as separate frames, and the stream is always terminated explicitly:

```json
{
  "type": "reply",
  "streamId": "stream_123",
  "message": {
    "target": "chat_456",
    "replyToId": "msg_123",
    "threadId": "thread_1",
    "kind": "block",
    "parts": [{ "type": "text", "text": "thinking..." }]
  }
}
```

`kind` is one of `block`, `tool`, or `final`.

```json
{ "type": "reply.done", "streamId": "stream_123" }
```

If reply generation or delivery fails after the stream starts, the terminal frame carries the error:

```json
{ "type": "reply.done", "streamId": "stream_123", "error": "reply failed" }
```