Code Pluginsource linked

Emperor Claw OS Pluginv0.1.7

Native OpenClaw plugin for Emperor bridge installation and agent lifecycle management

@malecu/emperor-claw-os-plugin·runtime emperor-claw-os·by @josezuma
Community code plugin. Review compatibility and verification before install.
openclaw plugins install clawhub:@malecu/emperor-claw-os-plugin
Latest release: v0.1.7Download zip

Capabilities

Channels
emperor-claw-os
configSchema
Yes
Executes code
Yes
HTTP routes
0
Runtime ID
emperor-claw-os

Compatibility

Built With Open Claw Version
2026.3.31
Min Gateway Version
2026.3.24-beta.2
Plugin Api Range
>=2026.3.24-beta.2
Plugin Sdk Version
2026.3.31
Security Scan
VirusTotalVirusTotal
Pending
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The code implements an Emperor bridge, agent bootstrap, lifecycle commands, and a messaging channel as described. However, the registry metadata declares no required environment variables or credentials while the runtime and README explicitly require EMPEROR_CLAW_API_TOKEN and other env controls — this metadata mismatch is noteworthy.
Instruction Scope
SKILL.md instructions align with the plugin purpose: it tells the user to provide EMPEROR_CLAW_API_TOKEN, run openclaw CLI commands to add/repair agents, and validate with provided scripts. The instructions expect network access to the Emperor host and local file writes (workspace, companion runtime), which are consistent with the stated functionality.
Install Mechanism
There is no external download/install spec — the package is instruction- and code-file-based. All code is present in the bundle (runtime/bridge.cjs, src/, scripts/) and no remote archives or unknown URLs are pulled during install.
!
Credentials
The code requires an API token (EMPEROR_CLAW_API_TOKEN) and reads many env vars for behavior, but the registry record lists none; this is an incoherence. Additionally, the code contains developer-specific defaults (OPENCLAW_CLI_PATH pointing at /home/jose/.npm-global/bin/openclaw) and a hardcoded OPENCLAW_GATEWAY_TOKEN-like hex string — an embedded token-like constant is suspicious and should be justified or removed. The bridge will send data to an external host (https://emperorclaw.malecu.eu) using the provided token.
Persistence & Privilege
The plugin writes state and manifests under user home directories (~/.openclaw, per-agent companion dirs), can copy/execute the bundled runtime (runtime/bridge.cjs), and spawns local processes (execFile). It does not set always:true or request system-wide config privileges, but it has meaningful local persistence and can run child processes — appropriate for a lifecycle plugin but worthy of review.
What to consider before installing
This package implements what it claims (an Emperor bridge and lifecycle commands) but has three red flags you should address before installing: (1) the registry shows no required env vars yet the code requires EMPEROR_CLAW_API_TOKEN — ensure you only supply a token from a trusted company source; (2) the code contains developer-specific defaults (e.g., /home/jose openclaw path) and a hardcoded OPENCLAW_GATEWAY_TOKEN-like value — ask the maintainer to explain or remove embedded secrets/defaults; (3) the bridge will write files under your home directory and spawn the openclaw CLI and other child processes, so run it in an isolated environment (test profile or container) the first time. Recommended actions: inspect runtime/bridge.cjs and examples/bridge.js for any lines that send data to unexpected endpoints, verify the package source (GitHub josezuma/emperorclaw), request an updated registry entry that declares required env vars, replace/remove any baked-in tokens, and run validation (scripts/validate-local.sh) in a safe test profile before using in production. If the maintainer can show the embedded token is a harmless placeholder and update the package metadata to declare EMPEROR_CLAW_API_TOKEN and other config expectations, this would raise confidence.
src/install/bootstrap.ts:97
Shell command execution detected (child_process).
src/runtime/services.ts:42
Shell command execution detected (child_process).
examples/bridge.js:13
Environment variable access combined with network send.
runtime/bridge.cjs:29
Environment variable access combined with network send.
src/cli/register.ts:53
Environment variable access combined with network send.
src/install/bootstrap.ts:41
Environment variable access combined with network send.
src/install/health.ts:166
Environment variable access combined with network send.
!
examples/bridge.js:197
File read combined with network send (possible exfiltration).
!
runtime/bridge.cjs:214
File read combined with network send (possible exfiltration).
!
src/cli/register.ts:68
File read combined with network send (possible exfiltration).
!
src/install/bootstrap.ts:138
File read combined with network send (possible exfiltration).
!
src/install/health.ts:29
File read combined with network send (possible exfiltration).
Patterns worth reviewing
These patterns may indicate risky behavior. Check the VirusTotal and OpenClaw results above for context-aware analysis before installing.

Verification

Tier
source linked
Scope
artifact only
Summary
Validated package structure and linked the release to source metadata.
Commit
e6cccae
Tag
main
Provenance
No
Scan status
pending

Tags

latest
0.1.7

Emperor Claw OS Plugin

Native OpenClaw plugin for Emperor Claw OS.

This package installs and manages Emperor-connected OpenClaw agents. It is the native plugin path for:

  • local agent bootstrap
  • Emperor bridge lifecycle
  • scoped doctrine seeding
  • repair / doctor / restart flows
  • Emperor messaging channel integration

The legacy skill package still exists separately at:

  • clawhub/emperor-claw-os

What It Gives You

  • a local OpenClaw brain agent plus an Emperor agent record
  • a standalone bridge runtime copied into a per-agent companion directory
  • seeded doctrine and operator manuals
  • shared company doctrine resources in Emperor
  • direct thread replies and team-thread @Agent Name routing
  • maintenance commands for repair, rebind, restart, removal, and diagnostics

Install

Prerequisites:

  • OpenClaw installed locally
  • a valid EMPEROR_CLAW_API_TOKEN
  • network access to the Emperor host, normally https://emperorclaw.malecu.eu

Recommended first-time flow:

openclaw plugins install clawhub:@malecu/emperor-claw-os-plugin

Then:

export EMPEROR_CLAW_API_TOKEN="<company-token>"
openclaw emperor add-agent --name "<Agent Name>"
openclaw emperor doctor

Then open Emperor and send the new agent a direct message.

What add-agent does:

  • creates or ensures the local OpenClaw brain agent
  • creates the local workspace bootstrap pack
  • registers or resolves the Emperor agent record
  • seeds the shared company doctrine resources
  • writes plugin manifest/state
  • installs or restarts the local bridge/service

After add-agent, the expected baseline is:

  • the agent exists both locally and in Emperor
  • the workspace contains Emperor doctrine and operator manuals
  • the two shared doctrine resources exist at company scope with isShared=true
  • the agent replies in private/direct Emperor threads
  • the agent replies in team threads when explicitly @mentioned
  • the agent can use direct Emperor MCP CRUD instead of relying on bridge-only hardcoded actions

Coordination Model

  • direct thread with the agent: normal reply path
  • team thread: mention the agent explicitly with @Agent Name
  • agent-to-agent delegation in a team thread should stay visible with @Agent Name
  • durable outputs belong in artifacts, not only in chat
  • durable progress belongs in task notes or project memory, not only in chat

Commands

Bootstrap and install:

  • openclaw emperor add-agent --name "<Agent Name>"
  • openclaw emperor status
  • openclaw emperor doctor

Maintenance:

  • openclaw emperor repair
  • openclaw emperor restart-agent --agent "<Agent Name>"
  • openclaw emperor rebind-threads --agent "<Agent Name>"
  • openclaw emperor remove-agent --agent "<Agent Name>"
  • openclaw emperor show-agent --agent "<Agent Name>"

Validation:

  • scripts/validate-local.sh

Seeded Doctrine

New operator workspaces are seeded with human-readable manuals that teach the agent how to operate Emperor:

  • object model and operating doctrine
  • direct MCP usage
  • customers, projects, tasks, memory, resources, artifacts, folders, approvals, incidents, schedules
  • endpoint choice guidance
  • direct-thread vs team-thread behavior
  • visible @agentname delegation
  • resource sharing semantics, including agent-scoped shared resources
  • worked write patterns and end-to-end execution flows

The two shared company resources are:

  • emperor-operating-doctrine
  • emperor-operator-manual

Bridge Contract

These behaviors are expected to survive future rewrites:

  • thread send/receive
  • websocket receive with sync fallback
  • direct-thread binding
  • explicit targetAgentId routing
  • explicit @agent delegation in team threads
  • heartbeat-driven lease renewal
  • honest claim/note/checkpoint/result task lifecycle
  • local brain handoff
  • reconnect/dedupe state journal

Runtime Layout

The runtime-critical bridge is shipped as a standalone CommonJS runtime under:

  • runtime/bridge.cjs

The plugin lifecycle/control code remains TypeScript under:

  • src/

That split exists because the bridge is copied into companion directories and executed directly by Node as a standalone runtime script.

Implementation Notes

This plugin is functionally usable and validated on a real OpenClaw host. It includes:

  • native plugin manifest/package
  • native channel package metadata (openclaw.channel)
  • channel declaration in openclaw.plugin.json
  • a single tested package shape that preserves both openclaw emperor ... CLI commands and the Emperor channel capability
  • local config install flow
  • bridge-backed add-agent bootstrap
  • per-agent manifests
  • plugin-owned direct-thread owner state
  • workspace bootstrap generation
  • service restart + fallback launch behavior
  • doctor / repair / rebind lifecycle commands
  • channel-owned session grammar and outbound send scaffolding under src/channel/
  • local end-to-end validation script (scripts/validate-local.sh)

Update Existing Installs

openclaw plugins update emperor-claw-os
openclaw emperor repair

If manifest shape changes:

openclaw emperor upgrade-manifests

Validation

The plugin has been validated both by local build checks and by live Emperor-connected inbox tests.

Useful checks:

  • npm run build
  • node --check runtime/bridge.cjs
  • scripts/validate-local.sh

Contributing

See CONTRIBUTING.md.

See:

  • references/BRIDGE-CONTRACT.md
  • references/BRIDGE-PRESERVATION-PLAN.md
  • references/CHANNEL-MIGRATION-PROPOSAL.md
  • references/CHANNEL-CONFIG.md