chore(sync): upstream intake rollup#127
Conversation
- Pass gfm:true + breaks:true explicitly to marked.parse() so table support is guaranteed even if global setOptions() is bypassed or reset by a future refactor (defense-in-depth) - Add display:block + overflow-x:auto to .chat-text table so wide multi-column tables scroll horizontally instead of being clipped by the parent overflow-x:hidden chat container - Add regression tests for GFM table rendering in markdown.test.ts
Take the safe, tested subset from openclaw#32367:\n- per-channel startup connect grace in health monitor\n- tool-context channel-provider fallback for message actions\n\nCo-authored-by: Munem Hashmi <[email protected]>
…w#32360) * Plugin SDK: add run and tool call fields to tool hooks * Agents: propagate runId and toolCallId in before_tool_call * Agents: thread runId through tool wrapper context * Runner: pass runId into tool hook context * Compaction: pass runId into tool hook context * Agents: scope after_tool_call start data by run * Tests: cover run and tool IDs in before_tool_call hooks * Tests: add run-scoped after_tool_call collision coverage * Hooks: scope adjusted tool params by run * Tests: cover run-scoped adjusted param collisions * Hooks: preserve active tool start metadata until end * Changelog: add tool-hook correlation note
…gins ## Overview This PR enables external channel plugins (loaded via Plugin SDK) to access advanced runtime features like AI response dispatching, which were previously only available to built-in channels. ## Changes ### src/gateway/server-channels.ts - Import PluginRuntime type - Add optional channelRuntime parameter to ChannelManagerOptions - Pass channelRuntime to channel startAccount calls via conditional spread - Ensures backward compatibility (field is optional) ### src/gateway/server.impl.ts - Import createPluginRuntime from plugins/runtime - Create and pass channelRuntime to channel manager ### src/channels/plugins/types.adapters.ts - Import PluginRuntime type - Add comprehensive documentation for channelRuntime field - Document available features, use cases, and examples - Improve type safety (use imported PluginRuntime type vs inline import) ## Benefits External channel plugins can now: - Generate AI-powered responses using dispatchReplyWithBufferedBlockDispatcher - Access routing, text processing, and session management utilities - Use command authorization and group policy resolution - Maintain feature parity with built-in channels ## Backward Compatibility - channelRuntime field is optional in ChannelGatewayContext - Conditional spread ensures it's only passed when explicitly provided - Existing channels without channelRuntime support continue to work unchanged - No breaking changes to channel plugin API ## Testing - Email channel plugin successfully uses channelRuntime for AI responses - All existing built-in channels (slack, discord, telegram, etc.) work unchanged - Gateway loads and runs without errors when channelRuntime is provided
* Feishu: cache failing probes * Changelog: add Feishu probe failure backoff note --------- Co-authored-by: bmendonca3 <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…penclaw#28623) * feat(hooks): add trigger and channelId to plugin hook agent context Adds `trigger` and `channelId` fields to `PluginHookAgentContext` so plugins can determine what initiated the agent run and which channel it originated from, without session-key parsing or Redis bridging. trigger values: "user", "heartbeat", "cron", "memory" channelId values: "telegram", "discord", "whatsapp", etc. Both fields are threaded through run.ts and attempt.ts hookCtx so all hook phases receive them (before_model_resolve, before_prompt_build, before_agent_start, llm_input, llm_output, agent_end). channelId falls back from messageChannel to messageProvider when the former is not set. followup-runner passes originatingChannel so queued followup runs also carry channel context. * docs(changelog): note hook context parity fix for openclaw#28623 --------- Co-authored-by: Vincent Koc <[email protected]>
…aw#27613) Merged via squash. Prepared head SHA: 31ddd43 Co-authored-by: dorukardahan <[email protected]> Co-authored-by: grp06 <[email protected]> Reviewed-by: @grp06
…claw#32206) Merged via squash. Prepared head SHA: d7f0914 Co-authored-by: hydro13 <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
…penclaw#32490) Merged via squash. Prepared head SHA: 233aa03 Co-authored-by: scoootscooob <[email protected]> Co-authored-by: joshavant <[email protected]> Reviewed-by: @joshavant
openclaw#32831) Merged via squash. Prepared head SHA: 2aa58f6 Co-authored-by: Sid-Qin <[email protected]> Co-authored-by: shakkernerd <[email protected]> Reviewed-by: @shakkernerd
Merged via squash. Prepared head SHA: 5d6d4dd Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
…w#25970) Merged via squash. Prepared head SHA: 3012326 Co-authored-by: openperf <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
…penclaw#30356) Merged via squash. Prepared head SHA: b14f9ad Co-authored-by: 13otKmdr <[email protected]> Co-authored-by: grp06 <[email protected]> Reviewed-by: @grp06
Co-authored-by: Copilot <[email protected]> (cherry picked from commit 6da593a) (cherry picked from commit 8f9e7f9)
Co-authored-by: Copilot <[email protected]> (cherry picked from commit 811fc2d) (cherry picked from commit 632a4dc)
Co-authored-by: Copilot <[email protected]> (cherry picked from commit d55fa6f)
|
Too many files changed for review. ( |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (40)
📝 WalkthroughWalkthroughThis pull request introduces a comprehensive bootstrap budget and truncation warning system. It adds a new bootstrap-budget module for analyzing file injection statistics and truncation, configuration options for controlling warning visibility modes, system prompt integration to display warnings, and updates various agent runners to track and propagate warning signatures across runs. Changes
Sequence DiagramsequenceDiagram
participant Config
participant AgentRunner as Agent Runner
participant BootstrapBudget as Bootstrap Budget
participant SystemPrompt as System Prompt
participant Agent
AgentRunner->>Config: Resolve bootstrap limits & warning mode
Config-->>AgentRunner: bootstrapMaxChars, bootstrapTotalMaxChars, warningMode
AgentRunner->>BootstrapBudget: analyzeBootstrapBudget(files, limits)
BootstrapBudget->>BootstrapBudget: Calculate injection stats
BootstrapBudget->>BootstrapBudget: Detect per-file & total truncation
BootstrapBudget-->>AgentRunner: BootstrapBudgetAnalysis
AgentRunner->>BootstrapBudget: buildBootstrapPromptWarning(analysis, mode, seen)
BootstrapBudget->>BootstrapBudget: Generate warning signature
BootstrapBudget->>BootstrapBudget: Format warning lines
BootstrapBudget-->>AgentRunner: BootstrapPromptWarning
AgentRunner->>SystemPrompt: buildAgentSystemPrompt(bootstrapTruncationWarningLines)
SystemPrompt->>SystemPrompt: Render Project Context section
SystemPrompt->>SystemPrompt: Include truncation warning block
SystemPrompt-->>AgentRunner: System Prompt with warnings
AgentRunner->>Agent: Run with system prompt
Agent-->>AgentRunner: Result with signature tracking
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates a series of upstream changes primarily focused on enhancing the agent's context management, improving logging consistency, and bolstering security. Key updates include the introduction of configurable warnings for truncated bootstrap files, ensuring all console timestamps are displayed in the local timezone, and adding a crucial security header to media responses. These changes aim to provide clearer feedback to users regarding context limitations, offer a more user-friendly logging experience, and improve the overall security posture of the application. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request is an automated upstream sync, bringing in a large number of changes including new features, bug fixes, and documentation updates. Key improvements include refactoring UI components for better code reuse, enhancing thread safety in iOS/macOS code with proper locking, and migrating webhook handling in several plugins to a more robust, standardized pipeline. I've reviewed the changes and they are generally high quality. I have one minor suggestion in extensions/feishu/src/bot.ts to improve the mention normalization logic by adjusting how whitespace is handled, which will make it more predictable.
Note: Security Review did not run due to the size of the PR.
I am having trouble creating individual review comments. Click here to see my feedback.
extensions/feishu/src/bot.ts (500-503)
Calling .trim() inside the loop for each mention replacement can lead to unintended removal of whitespace, especially between adjacent mentions. It's also slightly inefficient. It would be cleaner and safer to perform all replacements first and then trim the final result once before returning.
result = result.replace(new RegExp(escaped(mention.key), "g"), () => replacement);
}
return result.trim();
Automated upstream intake from upstream/main with curated replay-safe patches (core + infra).
Summary by CodeRabbit
Release Notes
New Features
agents.defaults.bootstrapPromptTruncationWarningcontrols warning behavior (off/once/always; default: once).Bug Fixes
X-Content-Type-Options: nosniffto media responses.Documentation