mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix: forward resolved session key in agent delivery (follow-up #27584 by @qualiobra)
Co-authored-by: Lucas Teixeira Campos Araujo <lucas@MacBook-Pro-de-Lucas.local>
This commit is contained in:
@@ -19,7 +19,7 @@ Docs: https://docs.openclaw.ai
|
||||
|
||||
- Agents/Canvas default node resolution: when multiple connected canvas-capable nodes exist and no single `mac-*` candidate is selected, default to the first connected candidate instead of failing with `node required` for implicit-node canvas tool calls. Landed from contributor PR #27444 by @carbaj03. Thanks @carbaj03.
|
||||
- TUI/stream assembly: preserve streamed text across real tool-boundary drops without keeping stale streamed text when non-text blocks appear only in the final payload. Landed from contributor PR #27711 by @scz2011. (#27674)
|
||||
- Hooks/Internal `message:sent`: forward `sessionKey` on outbound sends from agent delivery, cron isolated delivery, gateway receipt acks, heartbeat sends, session-maintenance warnings, and restart-sentinel recovery so internal `message:sent` hooks consistently dispatch with session context. Landed from contributor PR #27584 by @qualiobra. Thanks @qualiobra.
|
||||
- Hooks/Internal `message:sent`: forward `sessionKey` on outbound sends from agent delivery, cron isolated delivery, gateway receipt acks, heartbeat sends, session-maintenance warnings, and restart-sentinel recovery so internal `message:sent` hooks consistently dispatch with session context, including `openclaw agent --deliver` runs resumed via `--session-id` (without explicit `--session-key`). Landed from contributor PR #27584 by @qualiobra. Thanks @qualiobra.
|
||||
- Models/MiniMax auth header defaults: set `authHeader: true` for both onboarding-generated MiniMax API providers and implicit built-in MiniMax (`minimax`, `minimax-portal`) provider templates so first requests no longer fail with MiniMax `401 authentication_error` due to missing `Authorization` header. Landed from contributor PRs #27622 by @riccoyuanft and #27631 by @kevinWangSheng. (#27600, #15303)
|
||||
- Pi image-token usage: stop re-injecting history image blocks each turn, process image references from the current prompt only, and prune already-answered user-image blocks in stored history to prevent runaway token growth. (#27602)
|
||||
- BlueBubbles/SSRF: auto-allowlist the configured `serverUrl` hostname for attachment fetches so localhost/private-IP BlueBubbles setups are no longer false-blocked by default SSRF checks. Landed from contributor PR #27648 by @lailoo. (#27599) Thanks @taylorhou for reporting.
|
||||
|
||||
@@ -27,9 +27,9 @@ type RunResult = Awaited<
|
||||
|
||||
const NESTED_LOG_PREFIX = "[agent:nested]";
|
||||
|
||||
function formatNestedLogPrefix(opts: AgentCommandOpts): string {
|
||||
function formatNestedLogPrefix(opts: AgentCommandOpts, sessionKey?: string): string {
|
||||
const parts = [NESTED_LOG_PREFIX];
|
||||
const session = opts.sessionKey ?? opts.sessionId;
|
||||
const session = sessionKey ?? opts.sessionKey ?? opts.sessionId;
|
||||
if (session) {
|
||||
parts.push(`session=${session}`);
|
||||
}
|
||||
@@ -49,8 +49,13 @@ function formatNestedLogPrefix(opts: AgentCommandOpts): string {
|
||||
return parts.join(" ");
|
||||
}
|
||||
|
||||
function logNestedOutput(runtime: RuntimeEnv, opts: AgentCommandOpts, output: string) {
|
||||
const prefix = formatNestedLogPrefix(opts);
|
||||
function logNestedOutput(
|
||||
runtime: RuntimeEnv,
|
||||
opts: AgentCommandOpts,
|
||||
output: string,
|
||||
sessionKey?: string,
|
||||
) {
|
||||
const prefix = formatNestedLogPrefix(opts, sessionKey);
|
||||
for (const line of output.split(/\r?\n/)) {
|
||||
if (!line) {
|
||||
continue;
|
||||
@@ -70,6 +75,7 @@ export async function deliverAgentCommandResult(params: {
|
||||
payloads: RunResult["payloads"];
|
||||
}) {
|
||||
const { cfg, deps, runtime, opts, outboundSession, sessionEntry, payloads, result } = params;
|
||||
const effectiveSessionKey = outboundSession?.key ?? opts.sessionKey;
|
||||
const deliver = opts.deliver === true;
|
||||
const bestEffortDeliver = opts.bestEffortDeliver === true;
|
||||
const turnSourceChannel = opts.runContext?.messageChannel ?? opts.messageChannel;
|
||||
@@ -201,7 +207,7 @@ export async function deliverAgentCommandResult(params: {
|
||||
return;
|
||||
}
|
||||
if (opts.lane === AGENT_LANE_NESTED) {
|
||||
logNestedOutput(runtime, opts, output);
|
||||
logNestedOutput(runtime, opts, output, effectiveSessionKey);
|
||||
return;
|
||||
}
|
||||
runtime.log(output);
|
||||
|
||||
Reference in New Issue
Block a user