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
46 changes: 46 additions & 0 deletions .github/workflows/publish-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish plugin to NPM

permissions:
id-token: write
contents: read

on:
workflow_dispatch:
inputs:
package:
description: "Package to publish"
required: true
type: choice
options:
- claw-plugin

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 9.15.4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
cache: pnpm
cache-dependency-path: "pnpm-lock.yaml"

- name: Install npm 11.6.4
run: npm install -g npm@11.6.4

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run package checks
working-directory: ./packages/${{ inputs.package }}
run: pnpm run ci

- name: Publish package
working-directory: ./packages/${{ inputs.package }}
run: pnpm publish --access public
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ curl -fsSL https://openui.com/openclaw-os/install.sh | bash

The installer downloads the source, builds the workspace UI, registers it as an OpenClaw plugin, restarts the gateway, and opens the dashboard in your browser.

To uninstall:

```bash
curl -fsSL https://openui.com/openclaw-os/install.sh | bash -s -- uninstall
```

> The workspace runs at `http://localhost:18789/plugins/openclawos`; run **`openclaw os url`** for the pre-authenticated URL.
>
> Don't have OpenClaw yet? Install it first from [openclaw.ai](https://openclaw.ai/install.sh), then run the command above.
>
> Installing from a local clone: see [`CONTRIBUTING.md`](./CONTRIBUTING.md).
Expand Down
23 changes: 10 additions & 13 deletions packages/claw-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,17 @@ The plugin teaches OpenUI Lang in two pieces, split by how often a turn needs ea
For end users, install OpenClaw OS via the installer script from the [root README](../../README.md#quick-start):

```sh
# Install
curl -fsSL https://openui.com/openclaw-os/install.sh | bash

# Uninstall
curl -fsSL https://openui.com/openclaw-os/install.sh | bash -s -- uninstall
```

### Opening the workspace

The workspace is served from your gateway — most likely `http://localhost:18789/plugins/openclawos`. For the pre-authenticated URL, run `openclaw os url`.

### From a local clone

```sh
Expand All @@ -44,25 +52,14 @@ pnpm build
# install scanner, and the bundled dist/ has no runtime deps to install.
rm -rf node_modules

# Install + reload
# Install + reload, then open it
openclaw plugins install ./packages/claw-plugin --force
openclaw gateway restart
openclaw os url
```

If `~/.openclaw/openclaw.json` has a non-empty `plugins.allow` list, add `openclaw-os-plugin` to it. With an empty `plugins.allow` (allow-all) no action is needed; without pinning when an allow list is set, the gateway lazy-reloads the plugin on every tool lookup and `app_create` fails intermittently.

Open the workspace at `http://localhost:18789/plugins/openclawos`. Paste the gateway URL (`ws://localhost:18789`) and the auth token from `~/.openclaw/openclaw.json` into the Settings dialog on first load.

### Skipping the settings dialog

To skip the dialog and get a pre-authenticated URL (token in the fragment, mirrors `openclaw dashboard`), use the CLI subcommand the plugin registers:

```sh
openclaw os url # prints the setup URL with auth to stdout
```

This reads the gateway-validated config directly, so it survives `--dev` / `--profile` flags and is the recommended path for installers and onboarding scripts.

## Scripts

```sh
Expand Down
12 changes: 11 additions & 1 deletion packages/claw-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
{
"name": "@openuidev/openclaw-os-plugin",
"version": "0.1.1",
"version": "0.1.3",
"type": "module",
"description": "OpenClaw plugin that turns agent responses into Generative UI and serves the claw-client at /plugins/openclawos.",
"keywords": [
"openclaw",
"openclaw web ui",
"openclaw-plugin",
"openclaw-os",
"openui",
"openui-lang",
"generative-ui",
"agent-ui"
],
"license": "MIT",
"homepage": "https://openui.com",
"repository": {
Expand Down
7 changes: 6 additions & 1 deletion packages/claw-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,13 @@ export default definePluginEntry({
return true;
},
});
const uiPort = api.config.gateway?.port ?? 18789;
const uiHost =
api.config.gateway?.bind === "custom" && api.config.gateway?.customBindHost
? api.config.gateway.customBindHost
: "127.0.0.1";
api.logger.info(
`[openclaw-os-plugin] static UI route at ${ROUTE_PREFIX} (root=${STATIC_ROOT})`,
`[openclaw-os-plugin] workspace UI mounted at http://${uiHost}:${uiPort}${ROUTE_PREFIX}/ (root ${STATIC_ROOT})`,
);

// ── CLI: `openclaw os url` ──────────────────────────────────────────────
Expand Down
Loading