chore(sync): mirror docs from openclaw/openclaw@66add9fcd9
This commit is contained in:
parent
ee3ff85378
commit
a96a51645a
@ -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"
|
||||
}
|
||||
|
||||
@ -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.
|
||||
|
||||
<Tip>
|
||||
**Looking for a walkthrough?** See [Channel Plugins](/plugins/sdk-channel-plugins)
|
||||
or [Provider Plugins](/plugins/sdk-provider-plugins) for step-by-step guides.
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user