From a96a51645a89db8d98e51c4fb73687cb7eb21c42 Mon Sep 17 00:00:00 2001 From: "openclaw-docs-sync[bot]" Date: Tue, 21 Apr 2026 22:18:07 +0000 Subject: [PATCH] chore(sync): mirror docs from openclaw/openclaw@66add9fcd96a7262914107c7aac8c69d8c0392ab --- .openclaw-sync/source.json | 4 ++-- docs/plugins/sdk-entrypoints.md | 21 +++++++++++++++++++++ docs/tools/clawhub.md | 8 +++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index 19822d38b..28f06c202 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "475e6ff1d15f401e7aae336c47e6451b1bb2570f", - "syncedAt": "2026-04-21T21:40:00.154Z" + "sha": "66add9fcd96a7262914107c7aac8c69d8c0392ab", + "syncedAt": "2026-04-21T22:18:06.496Z" } diff --git a/docs/plugins/sdk-entrypoints.md b/docs/plugins/sdk-entrypoints.md index 3cd11df08..1797245ec 100644 --- a/docs/plugins/sdk-entrypoints.md +++ b/docs/plugins/sdk-entrypoints.md @@ -13,6 +13,27 @@ read_when: Every plugin exports a default entry object. The SDK provides three helpers for creating them. +For installed plugins, `package.json` should point runtime loading at built +JavaScript when available: + +```json +{ + "openclaw": { + "extensions": ["./src/index.ts"], + "runtimeExtensions": ["./dist/index.js"], + "setupEntry": "./src/setup-entry.ts", + "runtimeSetupEntry": "./dist/setup-entry.js" + } +} +``` + +`extensions` and `setupEntry` remain valid source entries for workspace and git +checkout development. `runtimeExtensions` and `runtimeSetupEntry` are preferred +when OpenClaw loads an installed package and let npm packages avoid runtime +TypeScript compilation. If an installed package only declares a TypeScript +source entry, OpenClaw will use a matching built `dist/*.js` peer when one +exists, then fall back to the TypeScript source. + **Looking for a walkthrough?** See [Channel Plugins](/plugins/sdk-channel-plugins) or [Provider Plugins](/plugins/sdk-provider-plugins) for step-by-step guides. diff --git a/docs/tools/clawhub.md b/docs/tools/clawhub.md index 728beb5a5..ef6f7478e 100644 --- a/docs/tools/clawhub.md +++ b/docs/tools/clawhub.md @@ -297,7 +297,8 @@ Code plugins must include the required OpenClaw metadata in `package.json`: "version": "1.0.0", "type": "module", "openclaw": { - "extensions": ["./index.ts"], + "extensions": ["./src/index.ts"], + "runtimeExtensions": ["./dist/index.js"], "compat": { "pluginApi": ">=2026.3.24-beta.2", "minGatewayVersion": "2026.3.24-beta.2" @@ -310,6 +311,11 @@ Code plugins must include the required OpenClaw metadata in `package.json`: } ``` +Published packages should ship built JavaScript and point `runtimeExtensions` +at that output. Git checkout installs can still fall back to TypeScript source +when no built files exist, but built runtime entries avoid runtime TypeScript +compilation in startup, doctor, and plugin loading paths. + ## Advanced details (technical) ### Versioning and tags