mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-26 16:06:16 +00:00
fix(hooks): harden workspace hook loading
This commit is contained in:
@@ -21,7 +21,7 @@ Related:
|
||||
openclaw hooks list
|
||||
```
|
||||
|
||||
List all discovered hooks from workspace, managed, and bundled directories.
|
||||
List all discovered hooks from workspace, managed, extra, and bundled directories.
|
||||
|
||||
**Options:**
|
||||
|
||||
@@ -127,8 +127,7 @@ openclaw hooks enable <name>
|
||||
|
||||
Enable a specific hook by adding it to your config (`~/.openclaw/config.json`).
|
||||
|
||||
**Note:** Hooks managed by plugins show `plugin:<id>` in `openclaw hooks list` and
|
||||
can’t be enabled/disabled here. Enable/disable the plugin instead.
|
||||
**Note:** Workspace hooks are disabled by default until enabled here or in config. Hooks managed by plugins show `plugin:<id>` in `openclaw hooks list` and can’t be enabled/disabled here. Enable/disable the plugin instead.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
@@ -152,6 +151,9 @@ openclaw hooks enable session-memory
|
||||
- Updates `hooks.internal.entries.<name>.enabled = true` in your config
|
||||
- Saves config to disk
|
||||
|
||||
If the hook came from `<workspace>/hooks/`, this opt-in step is required before
|
||||
the Gateway will load it.
|
||||
|
||||
**After enabling:**
|
||||
|
||||
- Restart the gateway so hooks reload (menu bar app restart on macOS, or restart your gateway process in dev).
|
||||
@@ -230,6 +232,9 @@ openclaw hooks install @openclaw/my-hook-pack
|
||||
openclaw hooks install -l ./my-hook-pack
|
||||
```
|
||||
|
||||
Linked hook packs are treated as managed hooks from an operator-configured
|
||||
directory, not as workspace hooks.
|
||||
|
||||
## Update Hooks
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user