Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ hex = "0.4"
json5 = "1.3.1"
rand = "0.10.0"
reqwest = { version = "0.13.2", default-features = false, features = ["json", "rustls-no-provider"] }
ring = "0.17"
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
sha2 = "0.11"
tokio = { version = "1.50.0", features = ["rt-multi-thread", "macros"] }
tiktoken-rs = "0.7.0"
tokio = { version = "1.50.0", features = ["rt-multi-thread", "macros", "net", "io-util", "time"] }
zip = { version = "8", default-features = false, features = ["deflate"] }
1 change: 1 addition & 0 deletions plugins/corall-polling/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
37 changes: 37 additions & 0 deletions plugins/corall-polling/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Corall Polling Plugin

Native OpenClaw plugin that long-polls the Corall resident eventbus and forwards each event's `hook` payload to the local OpenClaw `/hooks/agent` endpoint. This preserves the existing Corall skill flow without requiring public inbound webhooks.

## Install

```bash
corall openclaw setup --eventbus-url http://127.0.0.1:8080
openclaw gateway restart
```

The released `corall` CLI embeds the compiled plugin files and installs them
with `openclaw plugins install --force`. For local plugin development, run
`npm ci && npm run build` before compiling the CLI so the embedded `dist/`
files are current. OpenClaw loads the compiled ESM entry at `dist/index.js`.

## Config

Add this under `plugins.entries.corall-polling` in `~/.openclaw/openclaw.json`:

```json
{
"enabled": true,
"config": {
"baseUrl": "http://127.0.0.1:8080",
"waitSeconds": 30
}
}
```

Notes:

- `agentId` defaults to `~/.corall/credentials/provider.json` and `agentToken` defaults to `hooks.token`, so the minimal config only needs `baseUrl`.
- If you use a different Corall credential profile, set `credentialProfile`.
- Event polling uses `Authorization: Bearer <agentToken>`, so create/update the Corall agent with the same token you keep in `hooks.token` via `--webhook-token`.
- If `hookUrl` is omitted, the plugin forwards to `http://127.0.0.1:<gateway.port>/hooks/agent`.
- Local forwarding uses `hooks.token` from the active OpenClaw config, so `corall openclaw setup` still supplies the hook auth expected by the Corall skill flow.
2 changes: 2 additions & 0 deletions plugins/corall-polling/dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare const _default: import("openclaw/plugin-sdk/plugin-entry").PluginEntry;
export default _default;
18 changes: 18 additions & 0 deletions plugins/corall-polling/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions plugins/corall-polling/dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions plugins/corall-polling/dist/src/config.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import type { OpenClawConfig, PluginConfig, RuntimeConfig } from "./types.js";
export declare function resolvePluginConfig(rawValue: unknown): PluginConfig;
export declare function materializeRuntimeConfig(pluginConfig: PluginConfig, openclawConfig: OpenClawConfig): RuntimeConfig;
export declare function resolveHookUrl(openclawConfig: OpenClawConfig, pluginConfig: PluginConfig): string;
export declare function resolveHooksToken(openclawConfig: OpenClawConfig): string | undefined;
export declare function validateRuntimeConfig(runtimeConfig: RuntimeConfig, openclawConfig: OpenClawConfig): string[];
100 changes: 100 additions & 0 deletions plugins/corall-polling/dist/src/config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions plugins/corall-polling/dist/src/config.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions plugins/corall-polling/dist/src/http.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export declare function isAbortError(error: unknown): boolean;
export declare function sleep(ms: number, signal?: AbortSignal): Promise<void>;
interface FetchWithTimeoutOptions extends RequestInit {
timeoutMs: number;
signal?: AbortSignal;
}
export declare function fetchWithTimeout(url: URL, options: FetchWithTimeoutOptions): Promise<Response>;
export declare function fetchJson(url: URL, options: FetchWithTimeoutOptions): Promise<unknown>;
export declare function fetchOk(url: URL, options: FetchWithTimeoutOptions): Promise<void>;
export {};
Loading
Loading