mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-11 12:18:59 +00:00
docs(hooks): document script context injection
This commit is contained in:
1 parent
03a196e613
commit
b428baf70b
1 file changed
+12
@@ -87,6 +87,18 @@ Hooks resolve in priority order, highest first. A single `block` decision short-
|
||||
```
|
||||
- Non-JSON 2xx → allow.
|
||||
|
||||
### script
|
||||
|
||||
Custom ES5.1 scripts may return `additionalContext` with an `allow` decision.
|
||||
For `user_prompt_submit`, GoClaw appends that text to the current run's extra
|
||||
system prompt without changing the original user message.
|
||||
|
||||
```javascript
|
||||
function handle(event) {
|
||||
return { decision: "allow", additionalContext: "Call the required tool before answering." };
|
||||
}
|
||||
```
|
||||
|
||||
### prompt
|
||||
|
||||
```json
|
||||
|
||||
Reference in new issue
Block a user