mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 22:40:43 +00:00
fix: address clawsweeper hook cleanup findings
This commit is contained in:
@@ -406,8 +406,9 @@ do not run in live chat traffic, check these first:
|
||||
containers, PID 1 may only be a supervisor; restart or signal the child
|
||||
`openclaw gateway run` process.
|
||||
- Use `openclaw plugins inspect <id> --runtime --json` to confirm hook registrations and
|
||||
diagnostics. Non-bundled conversation hooks such as `llm_input`,
|
||||
`llm_output`, `before_agent_finalize`, and `agent_end` need
|
||||
diagnostics. Non-bundled conversation hooks such as `before_model_resolve`,
|
||||
`before_agent_reply`, `before_agent_run`, `llm_input`, `llm_output`,
|
||||
`before_agent_finalize`, and `agent_end` need
|
||||
`plugins.entries.<id>.hooks.allowConversationAccess=true`.
|
||||
- For model switching, prefer `before_model_resolve`. It runs before model
|
||||
resolution for agent turns; `llm_output` only runs after a model attempt
|
||||
|
||||
@@ -2766,11 +2766,6 @@ export async function runEmbeddedAttempt(
|
||||
? ""
|
||||
: buildCurrentTurnPromptContextSuffix(params.currentTurnContext);
|
||||
const promptForModel = promptSubmission.prompt + currentTurnPromptContextSuffix;
|
||||
const blockedTranscriptPrompt =
|
||||
effectiveTranscriptPrompt ??
|
||||
(isRawModelRun
|
||||
? params.prompt
|
||||
: annotateInterSessionPromptText(params.prompt, params.inputProvenance));
|
||||
const runtimeSystemContext = promptSubmission.runtimeSystemContext?.trim();
|
||||
if (promptSubmission.runtimeOnly && runtimeSystemContext) {
|
||||
const runtimeSystemPrompt = composeSystemPromptWithHookContext({
|
||||
|
||||
@@ -79,7 +79,7 @@ import {
|
||||
cleanupManagedOutgoingImageRecords,
|
||||
createManagedOutgoingImageBlocks,
|
||||
} from "../managed-image-attachments.js";
|
||||
import { ADMIN_SCOPE, TALK_SECRETS_SCOPE } from "../method-scopes.js";
|
||||
import { ADMIN_SCOPE } from "../method-scopes.js";
|
||||
import {
|
||||
GATEWAY_CLIENT_CAPS,
|
||||
GATEWAY_CLIENT_MODES,
|
||||
@@ -1714,7 +1714,7 @@ function broadcastChatError(params: {
|
||||
}
|
||||
|
||||
export const chatHandlers: GatewayRequestHandlers = {
|
||||
"chat.history": async ({ params, respond, context, client }) => {
|
||||
"chat.history": async ({ params, respond, context }) => {
|
||||
if (!validateChatHistoryParams(params)) {
|
||||
respond(
|
||||
false,
|
||||
|
||||
Reference in New Issue
Block a user