Skip to content

V3 enhancement#98

Merged
linfangw merged 7 commits into
mainfrom
v3_enhancement
Mar 8, 2026
Merged

V3 enhancement#98
linfangw merged 7 commits into
mainfrom
v3_enhancement

Conversation

@linfangw

@linfangw linfangw commented Mar 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Problem: Two independent gaps in the agent layer: (1) there was no in-session natural-language way to switch models — users had to type /model slash commands — and when a model override silently became invalid it reset with no notification; (2) QVeris tools lacked routing discipline, causing agents to call qveris_search for local operations, documentation lookups, and config queries, burning API credits and receiving irrelevant results.
  • Why it matters: Model switching is a frequent interactive action; forcing it through slash commands creates friction and no tool-callable path for agents. QVeris misuse degrades response quality and wastes credits proportional to the number of bad searches per session.
  • What changed:
    • switch_model tool — new agent tool with fuzzy model matching (aliases, partial names, full provider/model refs), ambiguity detection (surfaces candidates list when top scores are within 30 points), model="default" reset, and a system_event emitted on every switch. Silent resets (override removed from allowlist) now also emit a system_event. session_status remains read-only.
    • QVeris routing decision treebuildQverisSection() rewritten as a 6-step decision tree with explicit anti-patterns. qveris_search description and query param updated with negative-boundary text and GOOD/BAD examples.
    • qveris_get_by_ids tool — new tool calling POST /tools/get-by-ids; skips full search for known tool IDs; registered in catalog, policy groups, and coreToolSummaries.
    • Session-scoped Tool Rolodex — records successful qveris_execute calls; annotates search results with previously_used/session_uses; surfaces session_known_tools in search payloads.
    • Docsswitch_model natural-language usage, silent reset notifications, memory hooks, and README improvements.
  • What did NOT change: QVeris API contract/config schema, /model slash command behavior, existing qveris_search/qveris_execute response shapes, session_status read-only semantics.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #
  • Related #

User-visible / Behavior Changes

  • New: Agents can switch the active model via natural language ("use kimi", "switch to sonnet", "reset model"). The switch_model tool handles resolution, ambiguity prompting, and confirmation.
  • New: When a model override becomes invalid and silently resets to default, a system event is now emitted so agents can inform users of the change.
  • New: qveris_get_by_ids tool is available when QVeris is enabled. Existing sessions unaffected — additive only.
  • Changed: System prompt QVeris section is now a 6-step routing decision tree (longer, more prescriptive). Agents with QVeris enabled will receive updated routing guidance on next session start.
  • Changed: qveris_search results may now include session_known_tools, previously_used, and session_uses fields after successful executions in the same session.
  • Changed: AGENTS.md workspace template: "Prioritize qveris" rule replaced with routing-scoped guidance.

Security Impact (required)

  • New permissions/capabilities? Yesswitch_model can write to the session store (sessions.json) and enqueue system events. Scoped to the current session only; no cross-session or remote execution surface.
  • Secrets/tokens handling changed? No
  • New/changed network calls? Yesqveris_get_by_ids adds POST https://qveris.ai/api/v1/tools/get-by-ids, using the existing QVERIS_API_KEY Bearer token, subject to the same timeout config.
  • Command/tool execution surface changed? Yes — two new tools added: switch_model (in coding/messaging profiles, denied in subagents via SUBAGENT_TOOL_DENY_ALWAYS), qveris_get_by_ids (in group:qveris, group:web, group:openclaw).
  • Data access scope changed? No — rolodex is in-memory, session-scoped, never persisted or transmitted.
  • Risk + mitigation: switch_model writes to sessions.json via updateSessionStore — same code path already used by existing session management. qveris_get_by_ids uses the same already-trusted API key and base URL as qveris_search. No new secrets or elevated permissions introduced.

Repro + Verification

Environment

  • OS: macOS 15 (darwin 25.3.0)
  • Runtime/container: Node 22 / Bun
  • Model/provider: Any (changes are model-agnostic)
  • Integration/channel: All channels (changes in core agent layer)
  • Relevant config: tools.qveris.enabled: true, tools.qveris.apiKey: qv_..., allowlist with multiple models configured

Steps

  1. Start a session; say "use kimi" — agent should call switch_model and confirm the switch.
  2. Say "switch to son" (ambiguous between sonnet variants) — agent should surface candidate list and ask for confirmation before switching.
  3. Say "reset model" — agent should call switch_model(model="default").
  4. Remove the active model override from agents.allowedModels, send a message — session silently resets; agent should notify of the change.
  5. Ask "check my OpenClaw config" with QVeris enabled — agent should use session_status or read, NOT qveris_search.
  6. Run a successful QVeris weather query, then ask another weather question — agent should call qveris_get_by_ids with the known tool_id instead of repeating qveris_search.

Expected

  • Steps 1–3: switch_model called with correct resolution; system event emitted; takes effect next message.
  • Step 4: System event emitted noting reset from override to default.
  • Step 5: No qveris_search call.
  • Step 6: qveris_get_by_ids used; session_known_tools visible in second search payload.

Actual

  • Verified via unit tests (all passing).

Evidence

  • Failing test/log before + passing after — src/agents/openclaw-tools.switch-model.test.ts (240 lines, new), src/agents/tools/qveris-tools.test.ts (7 new tests), src/agents/system-prompt.test.ts (2 updated + 1 new). Build clean, pnpm build 0 errors.

Human Verification (required)

  • Verified scenarios: switch_model fuzzy resolution (aliases, partial names, exact provider/model); ambiguity detection at 30-point score gap boundary; model="default" / "reset" path; silent override reset system event; qveris_get_by_ids happy path and empty-IDs error; rolodex recording on successful execute; session_known_tools + previously_used annotation in search results; negative-boundary text in qveris_search description.
  • Edge cases checked: Ambiguity when only one match — no false positive surfacing; rolodex absent from search results when empty; qveris_get_by_ids step omitted from system prompt when tool not in available set; subagent deny list correctly excludes switch_model.
  • What you did NOT verify: Live QVeris get-by-ids endpoint in production (mocked in tests); LLM behavioral improvement in real conversations; switch_model behavior when sessions.json write fails mid-operation.

Compatibility / Migration

  • Backward compatible? Yes — no removed tools, no config schema changes, no changed response shapes (only additive fields and new tools).
  • Config/env changes? No
  • Migration needed? No

Failure Recovery (if this breaks)

  • How to disable/revert quickly: git revert 72f406671 b9da41f4d (two separate reverts, in this order). Alternatively, tools.qveris.enabled: false disables all QVeris tools; switch_model can be removed via tools.deny: ["switch_model"] in config.
  • Files/config to restore: src/agents/tools/switch-model-tool.ts, src/agents/tools/qveris-tools.ts, src/agents/system-prompt.ts, src/auto-reply/reply/model-selection.ts.
  • Known bad symptoms to watch for: switch_model returning ambiguous: true loop if ambiguity threshold is too low for a specific allowlist — increase AMBIGUITY_GAP constant or add explicit aliases. qveris_get_by_ids returning 404 if the endpoint is not live on the target QVeris environment — will surface as error_type: "http_error", agent falls back to qveris_search naturally.

Risks and Mitigations

  • Risk: switch_model ambiguity detection may surface too many candidates for dense allowlists (many models with similar names), making the UX noisy.
    • Mitigation: Top candidates are capped at 5; the 30-point AMBIGUITY_GAP was calibrated against the test suite. Users can reduce noise by configuring explicit model aliases.
  • Risk: POST /tools/get-by-ids may not be available on all QVeris environments (staging, self-hosted).
    • Mitigation: Returns structured QverisErrorResult with error_type: "http_error" on failure; no crash, agent falls back to qveris_search gracefully.
  • Risk: System prompt length increase from the QVeris decision tree may push context-constrained models over budget.
    • Mitigation: Section is gated on !isMinimal and only rendered when qveris_search is in the tool set. Subagent prompts are unaffected.

linfangw added 7 commits March 8, 2026 10:34
… rolodex

- Rewrite buildQverisSection() as a structured 6-step decision tree with
  explicit anti-patterns (local ops, docs/tutorials, non-English queries)
- Update qveris_search description and query param with negative boundaries
  and GOOD/BAD examples to prevent task-goal searches
- Add qveris_get_by_ids tool: calls POST /tools/get-by-ids to verify known
  tools without a full search; registered in tool catalog, policy, and prompt
- Add session-scoped tool rolodex: records successful executes, annotates
  search results with previously_used/session_uses, exposes session_known_tools
- Update coreToolSummaries for all three QVeris tools with boundary-aware text
- Replace over-broad AGENTS.md 'Prioritize qveris' rule with routing-aware guidance
- Add tests: get-by-ids execution, rolodex recording, search annotation, descriptions
@linfangw
linfangw requested review from ax2, chris7iu and vxwork March 8, 2026 06:08
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, 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 significantly enhances the agent's capabilities by introducing natural language model switching and optimizing QVeris tool interactions to improve efficiency and reduce API costs. It also strengthens long-term memory management with new proactive hooks and improves channel integrations, particularly for Discord and Telegram, by enabling persistent ACP bindings and asynchronous message processing. These changes aim to provide a more intuitive, reliable, and performant agent experience across various platforms.

Highlights

  • Agent Model Switching: Introduced a new switch_model tool allowing agents to change the active model using natural language, supporting fuzzy matching, ambiguity detection, and a 'default' model reset. Silent model resets (e.g., due to invalid overrides) now emit a system event for user notification.
  • QVeris Tool Routing Enhancements: Rewrote the buildQverisSection() as a 6-step decision tree with explicit anti-patterns to prevent agents from misusing qveris_search for local operations or documentation. Updated qveris_search descriptions and query parameters with negative-boundary text and examples.
  • New QVeris Tool for Known IDs: Added a qveris_get_by_ids tool that allows agents to re-verify known tool IDs without performing a full search, optimizing API credit usage and response times. This tool is registered in the catalog and relevant policy groups.
  • Session-scoped Tool Rolodex: Implemented a mechanism to record successful qveris_execute calls, annotating future search results with previously_used and session_uses flags, and surfacing session_known_tools in search payloads to encourage tool reuse.
  • Persistent ACP Channel Bindings: Introduced durable storage for Discord channels and Telegram topics to map them to long-lived ACP sessions, enabling stable 'always-on' ACP workspaces in chat surfaces.
  • New Proactive Memory Hooks: Added two new bundled hooks: context-digest for maintaining a rolling cross-session summary injected into the system prompt, and session-importance for automatically archiving important conversations.
  • Discord Asynchronous Inbound Worker: Implemented a Discord-specific asynchronous inbound worker to decouple gateway listeners from long-running agent turns, preventing timeouts and improving reliability for queued Discord runs.
  • Enhanced Feishu Media Handling: Improved Feishu media sending by correctly routing video (mp4) as msg_type: "media" and refining reply logic for group session scopes, ensuring replies are correctly threaded or sent to the root message.
  • Gateway Authentication SecretRef Support: Extended SecretRef support to gateway.auth.token, allowing token authentication to be managed securely via environment variables, files, or external providers, with robust validation during onboarding and daemon installation.
  • Perplexity Search API Integration: Updated web_search to integrate with the Perplexity Search API, providing structured results with new filtering options for country, language, freshness, and domain.
  • iOS Live Activity Widget: Added a new iOS Live Activity widget to display the OpenClaw gateway connection status (connecting, idle, disconnected) directly on the lock screen or Dynamic Island.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .detect-secrets.cfg
    • Removed dist|vendor and .detect-secrets.cfg from exclude-files pattern.
    • Added OPENCLAW_DOCKER_GPG_FINGERPRINT to exclude-lines.
  • .github/actions/ensure-base-commit/action.yml
    • Added a new GitHub Action to ensure shallow checkouts have enough history for diffing.
  • .github/actions/setup-node-env/action.yml
    • Updated Bun version from 1.3.9+cf6cdbbba to 1.3.9.
  • .gitignore
    • Added .vscode directory to ignore list.
  • .pre-commit-config.yaml
    • Updated detect-secrets exclude patterns.
    • Added OPENCLAW_DOCKER_GPG_FINGERPRINT to exclude-lines.
  • .secrets.baseline
    • Updated line numbers for existing entries.
    • Added OPENCLAW_DOCKER_GPG_FINGERPRINT to the allowlist.
  • AGENTS.md
    • Added a note about changelog placement.
  • CHANGELOG.md
    • Added new entries for Web UI/i18n Spanish locale support, Perplexity Search API integration, Telegram topic agent routing, persistent ACP channel bindings, Slack DM typing feedback, Cron job snapshot persistence, TTS OpenAI-compatible endpoints, Plugins before_prompt_build system-context fields, Gateway SecretRef for auth token, Plugins hook policy, Tools Diffs guidance, Telegram ACP topic bindings, Hooks Compaction lifecycle, Agents context engine plugin interface, CLI read-only SecretRef status, Docker/Podman extension dependency baking, Onboarding web search, and Agents compaction post-context configurability.
    • Introduced a breaking change: Gateway auth now requires explicit gateway.auth.mode when both token and password are configured.
    • Included numerous fixes across various components, such as hardening onboarding probes, improving QMD memory search, enhancing Slack and TUI behaviors, updating OpenAI Codex OAuth, refining Feishu streaming card delivery, and addressing security vulnerabilities.
  • CONTRIBUTING.md
    • Updated GitHub and X handles for 'Shadow'.
  • Dockerfile
    • Added multi-stage build for opt-in extension dependencies via OPENCLAW_EXTENSIONS build argument.
  • README.md
    • Updated description of 'Enhanced long-term memory' to include context-digest and session-importance hooks.
    • Updated 'Models (selection + auth)' section to 'Models (selection + switching)' and added details about natural language model switching.
    • Added a new section 'How the agent uses QVeris tools' with a routing decision tree and Tool Rolodex explanation.
    • Updated description of 'OpenClaw + QVeris optimization layer' to include structured tool-routing layer.
    • Added 'QVeris tool routing' to the 'More Resources' section.
  • appcast.xml
    • Added pragma: allowlist secret comments to enclosure URLs.
  • apps/android/app/src/test/java/ai/openclaw/android/voice/TalkModeConfigParsingTest.kt
    • Updated test to use buildJsonObject and added pragma: allowlist secret comment for legacyApiKey.
  • apps/ios/ActivityWidget/Assets.xcassets/Contents.json
    • Added new file for iOS Activity Widget assets configuration.
  • apps/ios/ActivityWidget/Info.plist
    • Added new file for iOS Activity Widget Info.plist, enabling Live Activities.
  • apps/ios/ActivityWidget/OpenClawActivityWidgetBundle.swift
    • Added new file defining the OpenClawActivityWidgetBundle for iOS Live Activities.
  • apps/ios/ActivityWidget/OpenClawLiveActivity.swift
    • Added new file defining the OpenClawLiveActivity widget, displaying connection status.
  • apps/ios/Config/Signing.xcconfig
    • Added OPENCLAW_ACTIVITY_WIDGET_BUNDLE_ID for the new iOS Activity Widget.
  • apps/ios/Sources/Gateway/GatewaySettingsStore.swift
    • Added pragma: allowlist secret comment to talkProviderApiKeyAccountPrefix.
  • apps/ios/Sources/Info.plist
    • Added NSSupportsLiveActivities key to enable Live Activities.
  • apps/ios/Sources/LiveActivity/LiveActivityManager.swift
    • Added new file for managing the lifecycle of iOS Live Activities.
  • apps/ios/Sources/LiveActivity/OpenClawActivityAttributes.swift
    • Added new file defining the attributes and content state for the iOS Live Activity.
  • apps/ios/Sources/Model/NodeAppModel.swift
    • Integrated LiveActivityManager calls to handle disconnect and reconnect events, and to start/update the Live Activity when connecting.
  • apps/ios/SwiftSources.input.xcfilelist
    • Added new Swift source files for Live Activity functionality.
  • apps/ios/Tests/TalkModeConfigParsingTests.swift
    • Added pragma: allowlist secret comment to apiKey in test fixture.
  • apps/ios/project.yml
    • Added OpenClawActivityWidget target as a dependency to the main app.
    • Enabled SUPPORTS_LIVE_ACTIVITIES for the main app and the new widget target.
  • apps/macos/Sources/OpenClawProtocol/GatewayModels.swift
    • Added ConfigSchemaLookupParams and ConfigSchemaLookupResult structs for config schema lookup RPC.
  • apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift
    • Added ConfigSchemaLookupParams and ConfigSchemaLookupResult structs for config schema lookup RPC.
  • changelog/fragments/pr-30356.md
    • Removed file.
  • docker-setup.sh
    • Added OPENCLAW_EXTENSIONS environment variable to be passed as a build argument.
  • docs/automation/cron-jobs.md
    • Added lightContext option to agentTurn payload for lightweight bootstrap mode.
    • Added overloaded to retryOn options for transient errors.
    • Updated CLI examples to include --light-context.
  • docs/automation/hooks.md
    • Updated count of bundled hooks from four to six.
    • Added documentation for context-digest and session-importance hooks.
    • Added session:compact:before and session:compact:after session events.
    • Clarified npm spec requirements for prerelease versions.
    • Added session:end to future events, now used by new memory hooks.
  • docs/automation/poll.md
    • Added Telegram to supported channels.
    • Updated CLI examples to include Telegram polls with specific options like poll-duration-seconds, poll-anonymous, and poll-public.
  • docs/brave-search.md
    • Updated description to reflect Brave Search as a supported provider, not the default.
    • Added detailed tool parameters for web_search including country, language, freshness, and date filters.
  • docs/channels/bluebubbles.md
    • Clarified that mediaMaxMb applies to both inbound and outbound media.
  • docs/channels/discord.md
    • Added a new section for persistent ACP channel bindings with configuration examples and notes.
    • Added inboundWorker.runTimeoutMs configuration for Discord inbound worker timeout.
    • Updated the feature list to include threadBindings and top-level bindings[] for ACP.
  • docs/channels/mattermost.md
    • Added a new section for interactive buttons, including configuration, usage, HMAC token generation, and troubleshooting.
    • Added a new section for the directory adapter.
  • docs/channels/slack.md
    • Added typingReaction configuration for showing temporary reactions during processing.
  • docs/channels/telegram.md
    • Added guidance to prefer dmPolicy: "allowlist" with explicit numeric IDs for one-owner bots.
    • Added sections for per-topic agent routing and persistent ACP topic binding.
    • Added support for /acp spawn --thread here|auto in Telegram topics.
    • Updated channels.telegram.mediaMaxMb default to 100MB for inbound and outbound media.
    • Added CLI examples and flags for Telegram-specific poll options.
    • Updated proxy example to use placeholders for user/password.
    • Added channels.telegram.actions.poll config option.
    • Updated bindings[] to include type: "acp" for access control.
  • docs/channels/whatsapp.md
    • Clarified that mediaMaxMb applies to outbound media sends and auto-replies, with per-account overrides.
  • docs/cli/channels.md
    • Added notes on how openclaw channels status and openclaw channels resolve handle SecretRef-managed credentials, reporting degraded output instead of crashing when secrets are unavailable.
  • docs/cli/configure.md
    • Added notes on how configure handles SecretRef-managed gateway tokens during daemon install, including validation and blocking if unresolved or ambiguous.
  • docs/cli/daemon.md
    • Added notes on how daemon install handles SecretRef-managed gateway tokens, including validation, persistence, and blocking if unresolved or ambiguous.
  • docs/cli/dashboard.md
    • Added notes on how dashboard handles SecretRef-managed gateway tokens, ensuring non-tokenized URLs are printed to avoid exposing secrets.
  • docs/cli/gateway.md
    • Added notes on how gateway status and gateway install handle SecretRef-managed credentials, including probe auth, validation, and blocking if unresolved or ambiguous.
  • docs/cli/hooks.md
    • Clarified npm spec requirements for installing hooks, specifically regarding exact versions, dist-tags, and prereleases.
  • docs/cli/index.md
    • Added --gateway-token-ref-env option for non-interactive SecretRef storage.
  • docs/cli/onboard.md
    • Added detailed documentation for gateway-token-ref-env and how SecretRef-managed gateway tokens are handled during non-interactive onboarding and daemon installation.
  • docs/cli/plugins.md
    • Clarified npm spec requirements for installing plugins, specifically regarding exact versions, dist-tags, and prereleases.
  • docs/cli/qr.md
    • Added notes on how qr command handles SecretRef-managed gateway auth credentials, including resolution and explicit mode setting.
  • docs/cli/status.md
    • Added notes on how status commands handle SecretRef-managed credentials, reporting degraded output instead of crashing when secrets are unavailable.
  • docs/cli/tui.md
    • Added notes on how tui resolves configured gateway auth SecretRefs.
  • docs/concepts/agent-loop.md
    • Updated the description of before_prompt_build hook to include prependSystemContext and appendSystemContext for stable guidance.
  • docs/concepts/context.md
    • Added a note explaining the contextEngine plugin slot and its role in context assembly and compaction.
  • docs/concepts/memory.md
    • Added a new section on 'Proactive memory hooks' detailing context-digest and session-importance.
  • docs/concepts/model-providers.md
    • Updated example OpenAI models to gpt-5.4 and gpt-5.4-pro.
    • Updated example OpenAI Codex model to gpt-5.4.
    • Added serviceTier parameter for OpenAI priority processing.
  • docs/concepts/models.md
    • Renamed 'Switching models in chat (/model)' to 'Switching models in chat'.
    • Added a new subsection 'Natural language switching (switch_model tool)' explaining the new tool's capabilities.
    • Added a new subsection 'Silent model reset notifications' for when model overrides become invalid.
  • docs/experiments/onboarding-config-protocol.md
    • Added config.schema.lookup RPC method and its response shape.
  • docs/experiments/plans/acp-persistent-bindings-discord-channels-telegram-topics.md
    • Added new document detailing the plan for ACP persistent bindings for Discord channels and Telegram topics.
  • docs/experiments/plans/discord-async-inbound-worker.md
    • Added new document detailing the plan for a Discord asynchronous inbound worker.
  • docs/experiments/proposals/acp-bound-command-auth.md
    • Added new document proposing a long-term command authorization model for ACP-bound conversations.
  • docs/gateway/cli-backends.md
    • Updated Codex CLI example model to gpt-5.4.
    • Updated claude-cli args to use --permission-mode bypassPermissions.
  • docs/gateway/configuration-reference.md
    • Updated WhatsApp mediaMaxMb default to 100.
    • Added bindings[] entries for persistent ACP bindings in Telegram and Discord.
    • Added typingReaction for Slack channels.
    • Added lightContext option to heartbeat configuration.
    • Added postCompactionSections to compaction configuration.
    • Added runtime descriptor for per-agent ACP defaults.
  • docs/gateway/doctor.md
    • Updated description of gateway auth checks to include SecretRef handling.
    • Added a new section 'Read-only SecretRef-aware repairs' explaining how doctor handles credentials.
  • docs/gateway/heartbeat.md
    • Added lightContext option to heartbeat configuration for lightweight bootstrap mode.
  • docs/gateway/openresponses-http-api.md
    • Added image/heic and image/heif to allowedMimes for images.
    • Added a note about HEIC/HEIF input_image sources being accepted and normalized to JPEG.
  • docs/gateway/secrets.md
    • Added gateway.auth.token to the list of supported SecretRefs.
    • Added a note about gateway.auth.token SecretRef being inactive if OPENCLAW_GATEWAY_TOKEN is set.
    • Added 'Quickstart reuse path' for gateway.auth.token SecretRef during onboarding.
    • Expanded 'Command-path resolution' to distinguish between strict and read-only command paths for SecretRef handling.
  • docs/help/faq.md
    • Updated Codex auth model to gpt-5.4 in FAQ entries.
  • docs/help/testing.md
    • Updated CLI backend model to gpt-5.4 in testing documentation.
  • docs/index.md
    • Updated image path for whatsapp-openclaw.jpg.
  • docs/install/docker.md
    • Added OPENCLAW_EXTENSIONS environment variable for pre-installing extension dependencies.
    • Added a new section 'Pre-install extension dependencies (optional)' with usage examples.
    • Added a new section 'Storage model' detailing persistent host data, ephemeral sandbox tmpfs, and disk growth hotspots.
    • Updated health check description for /healthz and /readyz.
  • docs/install/podman.md
    • Added OPENCLAW_EXTENSIONS build arg for pre-installing extension dependencies.
    • Added a new section 'Storage model' detailing persistent host data, ephemeral sandbox tmpfs, and disk growth hotspots.
  • docs/ja-JP/index.md
    • Updated image path for whatsapp-openclaw.jpg.
  • docs/perplexity.md
    • Updated summary and title to 'Perplexity Search API'.
    • Removed 'API options' and 'Models' sections, focusing on direct Perplexity Search API.
    • Added detailed tool parameters for web_search with Perplexity, including domain filters and token limits.
  • docs/platforms/raspberry-pi.md
    • Added pragma: allowlist secret comment to NODE_COMPILE_CACHE export.
  • docs/plugins/manifest.md
    • Added context-engine to plugin kinds.
    • Added contextEngine to exclusive plugin slots.
  • docs/providers/kilocode.md
    • Added pragma: allowlist secret comments to API key examples.
  • docs/providers/openai.md
    • Updated default OpenAI model to gpt-5.4.
    • Added note about gpt-5.4 and gpt-5.4-pro models.
    • Updated default OpenAI Codex model to gpt-5.4.
    • Added a new section 'OpenAI priority processing' for serviceTier parameter.
  • docs/providers/venice.md
    • Updated Venice privacy levels and model lists, changing default to kimi-k2-5.
    • Updated usage examples to reflect new default models.
  • docs/qverisbot-from-source.md
    • Added a detailed table for QVeris tools (qveris_search, qveris_execute, qveris_get_by_ids).
    • Added a 'Tool Routing Decision Tree' and 'Session-scoped Tool Rolodex' section.
  • docs/reference/api-usage-costs.md
    • Updated the 'Web search tool' section to list Perplexity Search API, Gemini, Grok, and Kimi as providers.
  • docs/reference/secretref-credential-surface.md
    • Added gateway.auth.token to the list of supported SecretRefs.
    • Removed gateway.auth.token from the list of out-of-scope credentials.
  • docs/reference/secretref-user-supplied-credentials-matrix.json
    • Added gateway.auth.token to the list of supported SecretRefs.
  • docs/reference/templates/AGENTS.md
    • Renamed 'Every Session' to 'Session Startup' and 'Safety' to 'Red Lines'.
    • Updated 'QVeris Tool Routing' guidance to reflect the new decision tree and qveris_get_by_ids tool.
  • docs/reference/wizard.md
    • Added detailed notes on how the Gateway step handles SecretRef-managed tokens and passwords.
    • Added a new 'Web search' step to the wizard documentation.
    • Added notes on how Daemon install handles SecretRef-managed gateway tokens.
  • docs/start/wizard-cli-reference.md
    • Updated Codex model to gpt-5.4.
    • Added detailed notes on how the Gateway step handles SecretRef-managed tokens and passwords.
  • docs/start/wizard.md
    • Updated tip to reflect the new web search step in the onboarding wizard.
    • Added notes on how the Gateway and Daemon steps handle SecretRef-managed tokens and passwords.
  • docs/tools/acp-agents.md
    • Updated read_when to include binding Discord channels or Telegram forum topics to persistent ACP sessions.
    • Updated 'Thread supporting channels' to include Telegram topics.
    • Added a new section 'Channel specific settings' detailing the binding model and runtime defaults for persistent ACP bindings.
    • Added streamTo option for sessions_spawn to stream initial ACP run progress to the parent session.
  • docs/tools/diffs.md
    • Updated description to mention built-in system guidance.
    • Added a new section 'Disable built-in system guidance' with configuration for allowPromptInjection.
  • docs/tools/index.md
    • Updated web_search description to list Perplexity, Brave, Gemini, Grok, and Kimi as providers.
    • Updated web_search notes to mention API key for the chosen provider.
    • Added config.schema.lookup to gateway tool actions.
  • docs/tools/llm-task.md
    • Updated default model to gpt-5.4.
  • docs/tools/plugin.md
    • Clarified npm spec requirements for installing plugins, specifically regarding exact versions, dist-tags, and prereleases.
    • Updated plugin capabilities to include 'Gateway HTTP routes' and 'Context engines'.
    • Added a new section 'Gateway HTTP routes' with details on api.registerHttpRoute(...).
    • Expanded 'Plugin SDK import paths' to include compat and various extension-specific subpaths.
    • Added a new section 'Read-only channel inspection' for plugins implementing inspectAccount(...).
    • Added 'Context engine plugins' section with details on api.registerContextEngine(...).
  • docs/tools/subagents.md
    • Updated announce delivery logic for nested subagent sessions and fallback behavior.
  • docs/tools/web.md
    • Updated summary and web_search description to reflect Perplexity Search API as a provider.
    • Updated 'Choosing a search provider' table to include Perplexity Search API details and parameters.
    • Updated 'Setting up web search' section with instructions for Perplexity Search and Brave Search.
    • Removed OpenRouter details from Perplexity setup.
    • Updated tool parameters table to clarify which parameters work for Brave and Perplexity.
  • docs/tts.md
    • Added openai.baseUrl configuration for OpenAI TTS endpoints, allowing custom OpenAI-compatible TTS servers.
  • docs/web/control-ui.md
    • Added a new section 'Language support' detailing localization features for the Control UI.
  • docs/web/dashboard.md
    • Added notes on how dashboard handles SecretRef-managed gateway.auth.token, ensuring non-tokenized URLs and providing remediation guidance.
  • docs/zh-CN/index.md
    • Updated image path for whatsapp-openclaw.jpg.
  • docs/zh-CN/reference/templates/AGENTS.md
    • Renamed '每次会话' to '会话启动' and '安全' to '红线'.
  • extensions/acpx/index.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/acpx.
  • extensions/acpx/src/config.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/acpx.
  • extensions/acpx/src/ensure.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/acpx.
  • extensions/acpx/src/runtime-internals/events.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/acpx.
  • extensions/acpx/src/runtime-internals/process.test.ts
    • Added tests for waitForExit and spawnAndCollect to handle process exit and abort signals.
  • extensions/acpx/src/runtime-internals/process.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/acpx.
    • Added createAbortError function.
    • Modified waitForExit to handle already exited child processes.
    • Modified spawnAndCollect to handle abort signals, including killing the child process.
  • extensions/acpx/src/runtime-internals/test-fixtures.ts
    • Added sessions new command handling.
    • Added MOCK_ACPX_ENSURE_EMPTY and MOCK_ACPX_NEW_EMPTY environment variables for testing empty session IDs.
    • Added permission-denied exit code handling.
  • extensions/acpx/src/runtime.test.ts
    • Added tests for mapping ACPX permission-denied exits to actionable guidance.
    • Added tests for falling back to sessions new when sessions ensure returns no session IDs.
    • Added test for failing when both ensure and new omit session IDs.
  • extensions/acpx/src/runtime.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/acpx.
    • Added ACPX_EXIT_CODE_PERMISSION_DENIED constant.
    • Added formatPermissionModeGuidance and formatAcpxExitMessage functions for improved error reporting.
    • Modified ensureSession to fall back to sessions new if sessions ensure returns no session identifiers.
    • Modified runControlCommand to use formatAcpxExitMessage for error messages.
    • Added signal parameter to getStatus and runControlCommand for abort handling.
  • extensions/acpx/src/service.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/acpx.
  • extensions/acpx/src/service.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/acpx.
  • extensions/bluebubbles/index.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/account-resolve.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/accounts.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/actions.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/actions.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/attachments.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/attachments.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/channel.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/chat.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/config-schema.test.ts
    • Added pragma: allowlist secret comment to password in test fixture.
  • extensions/bluebubbles/src/config-schema.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/history.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/media-send.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/media-send.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/monitor-debounce.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/monitor-processing.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/monitor-shared.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/monitor.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/monitor.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/monitor.webhook-auth.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/monitor.webhook-route.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/onboarding.secret-input.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/onboarding.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/probe.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/reactions.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/runtime.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/secret-input.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/send.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/send.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/targets.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/bluebubbles/src/types.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/bluebubbles.
  • extensions/copilot-proxy/index.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/copilot-proxy.
  • extensions/device-pair/index.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/device-pair.
  • extensions/device-pair/notify.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/device-pair.
  • extensions/diagnostics-otel/index.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/diagnostics-otel.
  • extensions/diagnostics-otel/src/service.test.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/diagnostics-otel.
  • extensions/diagnostics-otel/src/service.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/diagnostics-otel.
  • extensions/diffs/README.md
    • Updated description to mention system-prompt guidance via before_prompt_build hook.
  • extensions/diffs/index.test.ts
    • Updated test to verify registration of the before_prompt_build hook and its output.
  • extensions/diffs/index.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/diffs.
    • Added DIFFS_AGENT_GUIDANCE constant.
    • Registered a before_prompt_build hook to prepend diffs usage guidance to the system prompt.
  • extensions/diffs/src/browser.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/diffs.
  • extensions/diffs/src/browser.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/diffs.
  • extensions/diffs/src/config.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/diffs.
  • extensions/diffs/src/http.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/diffs.
  • extensions/diffs/src/prompt-guidance.ts
    • Added new file defining DIFFS_AGENT_GUIDANCE for agent system prompts.
  • extensions/diffs/src/store.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/diffs.
  • extensions/diffs/src/tool.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/diffs.
  • extensions/diffs/src/tool.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/diffs.
  • extensions/diffs/src/url.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/diffs.
  • extensions/discord/src/channel.ts
    • Added inspectDiscordAccount to channel config.
    • Added projectCredentialSnapshotFields and resolveConfiguredFromCredentialStatuses for improved credential status reporting.
    • Added cfg parameter to sendText, sendMedia, and sendPoll functions for proper config threading.
  • extensions/feishu/index.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/accounts.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/bitable.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/bot.checkBotMentioned.test.ts
    • Added test case to ensure mentionedBot=true even when bot mention name differs from configured botName.
  • extensions/feishu/src/bot.stripBotMention.test.ts
    • Updated tests to reflect stripping bot mentions in group chats for command detection.
  • extensions/feishu/src/bot.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
    • Added test for normalizing group mention-prefixed slash commands.
    • Added tests for reply behavior in normal and topic-mode groups, ensuring correct replyToMessageId and rootId.
  • extensions/feishu/src/bot.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/feishu.
    • Modified checkBotMentioned to rely solely on Feishu mention IDs.
    • Added normalizeFeishuCommandProbeBody to strip bot mentions from command probe body.
    • Modified parseFeishuMessageEvent to strip bot mentions from content in both p2p and group contexts.
    • Adjusted reply target determination in handleFeishuMessage based on group session scope and replyInThread config.
  • extensions/feishu/src/card-action.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/channel.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/channel.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/chat.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/client.test.ts
    • Added tests for createFeishuClient HTTP timeout configuration, including default, override, config, env, and cache invalidation.
  • extensions/feishu/src/client.ts
    • Added FEISHU_HTTP_TIMEOUT_MS, FEISHU_HTTP_TIMEOUT_MAX_MS, and FEISHU_HTTP_TIMEOUT_ENV_VAR constants.
    • Modified createFeishuClient to include HTTP timeout configuration and caching based on timeout settings.
    • Implemented createTimeoutHttpInstance to inject default timeouts into Lark SDK HTTP requests.
  • extensions/feishu/src/config-schema.test.ts
    • Added test to normalize legacy groupPolicy: "allowall" to "open".
  • extensions/feishu/src/config-schema.ts
    • Modified GroupPolicySchema to transform "allowall" to "open".
    • Added httpTimeoutMs to FeishuSharedConfigShape.
  • extensions/feishu/src/dedup.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/directory.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/docx.account-selection.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/docx.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/drive.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/dynamic-agent.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/media.test.ts
    • Added FEISHU_MEDIA_HTTP_TIMEOUT_MS constant.
    • Added imageCreateMock for image upload tests.
    • Added expectMediaTimeoutClientConfigured helper.
    • Updated tests to use msg_type=media for mp4 video and configure media client timeout.
  • extensions/feishu/src/media.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
    • Added FEISHU_MEDIA_HTTP_TIMEOUT_MS constant.
    • Modified downloadImageFeishu, downloadMessageResourceFeishu, uploadImageFeishu, and uploadFileFeishu to use FEISHU_MEDIA_HTTP_TIMEOUT_MS.
    • Modified sendFileFeishu and sendMediaFeishu to correctly determine msgType for video (mp4) as media.
  • extensions/feishu/src/monitor.account.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
    • Modified BotOpenIdSource to include botName.
    • Modified monitorSingleAccount to fetch and store botName.
  • extensions/feishu/src/monitor.reaction.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
    • Added pragma: allowlist secret comment to appSecret in test fixture.
    • Modified setupDebounceMonitor to accept botOpenId and botName parameters.
    • Added test to pass prefetched botName to handleFeishuMessage.
  • extensions/feishu/src/monitor.startup.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
    • Added pragma: allowlist secret comment to appSecret in test fixture.
  • extensions/feishu/src/monitor.startup.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
    • Added FeishuMonitorBotIdentity type.
    • Modified fetchBotIdentityForMonitor to return both botOpenId and botName.
    • Added fetchBotOpenIdForMonitor as a wrapper around fetchBotIdentityForMonitor.
  • extensions/feishu/src/monitor.state.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
    • Added botNames map to store bot names.
    • Modified stopFeishuMonitorState to clear botNames.
  • extensions/feishu/src/monitor.transport.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
    • Modified monitorWebSocket and monitorWebhook to clear botNames on cleanup.
  • extensions/feishu/src/monitor.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/feishu.
    • Modified monitorFeishuProvider to fetch both botOpenId and botName.
  • extensions/feishu/src/monitor.webhook-security.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/onboarding.status.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/onboarding.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/outbound.test.ts
    • Added tests for feishuOutbound.sendText and feishuOutbound.sendMedia to ensure replyToId and threadId are correctly forwarded.
  • extensions/feishu/src/outbound.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
    • Added resolveReplyToMessageId helper to determine the correct reply target.
    • Modified sendOutboundText and feishuOutbound.sendMedia to use replyToMessageId.
  • extensions/feishu/src/perm.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/policy.test.ts
    • Added tests for isFeishuGroupAllowed to cover open, allowall, and disabled group policies.
  • extensions/feishu/src/policy.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
    • Modified isFeishuGroupAllowed to treat "allowall" as equivalent to "open".
  • extensions/feishu/src/reactions.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/reply-dispatcher.test.ts
    • Added mergeStreamingText mock to handle partial text merging.
    • Added tests for delivering distinct final payloads, skipping duplicate final text, suppressing duplicate final text with media, keeping distinct non-streaming final payloads, and treating block updates as delta chunks.
  • extensions/feishu/src/reply-dispatcher.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
    • Modified createFeishuReplyDispatcher to use mergeStreamingText for streaming updates.
    • Added deliveredFinalTexts set to track and suppress duplicate final text payloads.
    • Modified onReplyStart to clear deliveredFinalTexts.
  • extensions/feishu/src/runtime.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/secret-input.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/send-target.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/send-target.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/send.reply-fallback.test.ts
    • Added tests for reply fallback when SDK errors or AxiosErrors indicate a withdrawn/not-found reply target.
    • Added tests for re-throwing non-withdrawn errors.
  • extensions/feishu/src/send.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/send.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
    • Added isWithdrawnReplyError function to check for withdrawn/not-found reply target errors.
    • Added sendFallbackDirect function for sending direct messages as a fallback.
    • Modified sendMessageFeishu and sendCardFeishu to use isWithdrawnReplyError and sendFallbackDirect for robust reply handling.
  • extensions/feishu/src/streaming-card.test.ts
    • Added tests for mergeStreamingText to handle overlaps.
    • Added tests for resolveStreamingCardSendMode to determine send mode based on reply targets.
  • extensions/feishu/src/streaming-card.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
    • Added StreamingStartOptions type.
    • Modified getToken to check response.ok before parsing JSON.
    • Modified mergeStreamingText to handle partial overlaps more robustly.
    • Added resolveStreamingCardSendMode function.
    • Modified FeishuStreamingSession.start to use StreamingStartOptions and resolveStreamingCardSendMode for dynamic send behavior.
    • Modified FeishuStreamingSession.start to check createRes.ok before parsing JSON.
  • extensions/feishu/src/tool-account-routing.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/tool-account.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/tool-factory-test-harness.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/types.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/typing.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/feishu/src/wiki.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/feishu.
  • extensions/google-gemini-cli-auth/index.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/google-gemini-cli-auth.
  • extensions/google-gemini-cli-auth/oauth.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/google-gemini-cli-auth.
  • extensions/google-gemini-cli-auth/oauth.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/google-gemini-cli-auth.
  • extensions/googlechat/index.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/googlechat.
  • extensions/googlechat/package.json
    • Added peerDependenciesMeta to mark openclaw as optional.
  • extensions/googlechat/src/accounts.test.ts
    • Added new file with tests for resolveGoogleChatAccount to verify inheritance and overrides from accounts.default.
  • extensions/googlechat/src/accounts.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/googlechat.
    • Modified mergeGoogleChatAccountConfig to correctly inherit shared defaults from accounts.default while preserving overrides and not inheriting sensitive fields like credentials or dangerouslyAllowNameMatching.
  • extensions/googlechat/src/actions.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/googlechat.
  • extensions/googlechat/src/api.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/googlechat.
  • extensions/googlechat/src/channel.outbound.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/googlechat.
  • extensions/googlechat/src/channel.startup.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/googlechat.
  • extensions/googlechat/src/channel.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/googlechat.
  • extensions/googlechat/src/monitor-access.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/googlechat.
  • extensions/googlechat/src/monitor-types.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/googlechat.
  • extensions/googlechat/src/monitor-webhook.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/googlechat.
  • extensions/googlechat/src/monitor.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/googlechat.
  • extensions/googlechat/src/monitor.webhook-routing.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/googlechat.
  • extensions/googlechat/src/onboarding.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/googlechat.
  • extensions/googlechat/src/resolve-target.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/googlechat.
    • Added tests for outbound config threading in sendText and sendMedia.
  • extensions/googlechat/src/runtime.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/googlechat.
  • extensions/googlechat/src/types.config.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/googlechat.
  • extensions/imessage/src/channel.ts
    • Added config parameter to sendIMessageOutbound options for proper config threading.
  • extensions/irc/index.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/irc.
  • extensions/irc/src/accounts.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/irc.
  • extensions/irc/src/channel.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/irc.
    • Added cfg parameter to sendText and sendMedia functions for proper config threading.
  • extensions/irc/src/config-schema.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/irc.
  • extensions/irc/src/inbound.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/irc.
  • extensions/irc/src/monitor.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/irc.
  • extensions/irc/src/onboarding.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/irc.
  • extensions/irc/src/onboarding.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/irc.
  • extensions/irc/src/runtime.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/irc.
  • extensions/irc/src/send.test.ts
    • Added new file with tests for sendMessageIrc cfg threading, ensuring cfg is used when provided and falls back to runtime config otherwise.
  • extensions/irc/src/send.ts
    • Added cfg parameter to SendIrcOptions.
    • Modified sendMessageIrc to use provided cfg or fall back to runtime config.
  • extensions/irc/src/types.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/irc.
  • extensions/line/src/channel.sendPayload.test.ts
    • Added cfg parameter to various send functions for proper config threading.
  • extensions/line/src/channel.ts
    • Added cfg parameter to various send functions for proper config threading.
  • extensions/llm-task/index.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/llm-task.
  • extensions/llm-task/src/llm-task-tool.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/llm-task.
    • Modified loadRunEmbeddedPiAgent to import runEmbeddedPiAgent from dist/extensionAPI.js for bundled installs.
  • extensions/lobster/index.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/lobster.
  • extensions/lobster/src/lobster-tool.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/lobster.
  • extensions/lobster/src/lobster-tool.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/lobster.
  • extensions/lobster/src/windows-spawn.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/lobster.
  • extensions/matrix/index.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/actions.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/channel.directory.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/channel.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/config-schema.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/directory-live.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/group-mentions.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/client/config.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/deps.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/monitor/access-policy.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/monitor/allowlist.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/monitor/auto-join.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/monitor/events.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/monitor/events.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/monitor/handler.body-for-agent.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/monitor/handler.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/monitor/index.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/monitor/location.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/monitor/media.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/monitor/replies.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/monitor/replies.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/monitor/rooms.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/monitor/types.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/poll-types.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/probe.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/matrix/send.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
    • Added tests for sendMessageMatrix and resolveMediaMaxBytes cfg threading.
  • extensions/matrix/src/matrix/send.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
    • Added cfg parameter to sendMessageMatrix and sendPollMatrix options for proper config threading.
  • extensions/matrix/src/matrix/send/client.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
    • Modified resolveMediaMaxBytes and resolveMatrixClient to accept an optional cfg parameter for proper config threading.
  • extensions/matrix/src/matrix/send/types.ts
    • Added cfg to MatrixSendOpts.
  • extensions/matrix/src/onboarding.ts
    • Updated plugin-sdk imports to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/outbound.test.ts
    • Added new file with tests for matrixOutbound cfg threading, ensuring cfg is passed to sendMessageMatrix and sendPollMatrix.
  • extensions/matrix/src/outbound.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
    • Added cfg parameter to sendText, sendMedia, and sendPoll functions for proper config threading.
  • extensions/matrix/src/resolve-targets.test.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/resolve-targets.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/runtime.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
  • extensions/matrix/src/secret-input.ts
    • Updated plugin-sdk import path to openclaw/plugin-sdk/matrix.
Ignored Files
  • Ignored by pattern: .github/workflows/** (5)
    • .github/workflows/auto-response.yml
    • .github/workflows/ci.yml
    • .github/workflows/install-smoke.yml
    • .github/workflows/labeler.yml
    • .github/workflows/stale.yml
Activity
  • No human activity detected in this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This is an impressive enhancement, introducing significant new capabilities for model switching and QVeris tool usage. The implementation of the switch_model tool with fuzzy matching and ambiguity detection is well-executed, and the QVeris routing decision tree is a major improvement for agent guidance. The code is well-structured, thoroughly tested, and accompanied by excellent documentation updates. I have one suggestion for a minor refactoring to improve code reuse and maintainability.

Note: Security Review did not run due to the size of the PR.

Comment on lines +140 to +147
const internalKey = resolveInternalSessionKey({ key: sessionKey, alias, mainKey });
const entryByInternal = store[internalKey];
const entryByRaw = store[sessionKey];
const entry = entryByInternal ?? entryByRaw;
const resolvedKey = entryByInternal ? internalKey : sessionKey;
if (!entry) {
throw new Error(`Unknown session: ${sessionKey}`);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The logic here to resolve a session entry from the session store is very similar to the resolveSessionEntry helper function in src/agents/tools/session-status-tool.ts. To reduce code duplication and ensure consistent session resolution behavior, consider extracting resolveSessionEntry into a shared location (like src/agents/tools/sessions-helpers.ts) and using it here. The version in session-status-tool.ts is also more robust as it checks more candidate keys.

@linfangw
linfangw merged commit 3227a28 into main Mar 8, 2026
2 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants