惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
腾讯CDC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
N
Netflix TechBlog - Medium
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
GbyAI
GbyAI
B
Blog
F
Fortinet All Blogs
T
Tailwind CSS Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
Google Developers Blog
A
About on SuperTechFans
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
MyScale Blog
MyScale Blog
B
Blog RSS Feed

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
feat: add user input blocking lifecycle gates (#75035) · ...
jesse-merhi · 2026-05-06 · via Recent Commits to openclaw:main

@@ -104,6 +104,7 @@ observation-only.

104104

- `agent_turn_prepare` - consume queued plugin turn injections and add same-turn context before prompt hooks

105105

- `before_prompt_build` - add dynamic context or system-prompt text before the model call

106106

- `before_agent_start` - compatibility-only combined phase; prefer the two hooks above

107+

- **`before_agent_run`** - inspect the final prompt and session messages before model submission and optionally block the run

107108

- **`before_agent_reply`** - short-circuit the model turn with a synthetic reply or silence

108109

- **`before_agent_finalize`** - inspect the natural final answer and request one more model pass

109110

- `agent_end` - observe final messages, success state, and run duration

@@ -232,6 +233,22 @@ Use the phase-specific hooks for new plugins:

232233

`before_agent_start` remains for compatibility. Prefer the explicit hooks above

233234

so your plugin does not depend on a legacy combined phase.

234235236+

`before_agent_run` runs after prompt construction and before any model input,

237+

including prompt-local image loading and `llm_input` observation. It receives

238+

the current user input as `prompt`, plus loaded session history in `messages`

239+

and the active system prompt. Return `{ outcome: "block", reason, message? }`

240+

to stop the run before the model can read the prompt. `reason` is internal;

241+

`message` is the user-facing replacement. The only supported outcomes are

242+

`pass` and `block`; unsupported decision shapes fail closed.

243+244+

When a run is blocked, OpenClaw stores only the replacement text in

245+

`message.content` plus non-sensitive block metadata such as the blocking plugin

246+

id and timestamp. The original user text is not retained in transcript or future

247+

context. Internal block reasons are treated as sensitive and excluded from

248+

transcript, history, broadcast, log, and diagnostics payloads. Observability

249+

should use sanitized fields such as blocker id, outcome, timestamp, or a safe

250+

category.

251+235252

`before_agent_start` and `agent_end` include `event.runId` when OpenClaw can

236253

identify the active run. The same value is also available on `ctx.runId`.

237254

Cron-driven runs also expose `ctx.jobId` (the originating cron job id) so

@@ -280,8 +297,9 @@ type BeforeAgentFinalizeRetry = {

280297

equivalent finalize decisions, and `maxAttempts` caps how many extra passes the

281298

host will allow before continuing with the natural final answer.

282299283-

Non-bundled plugins that need `llm_input`, `llm_output`,

284-

`before_agent_finalize`, or `agent_end` must set:

300+

Non-bundled plugins that need raw conversation hooks (`before_model_resolve`,

301+

`before_agent_reply`, `llm_input`, `llm_output`, `before_agent_finalize`,

302+

`agent_end`, or `before_agent_run`) must set:

285303286304

```json

287305

{