Skip to content

feat: plugin-provided session store adapter#3

Closed
davidrudduck wants to merge 1078 commits intomainfrom
feat/plugin-session-store-adapter
Closed

feat: plugin-provided session store adapter#3
davidrudduck wants to merge 1078 commits intomainfrom
feat/plugin-session-store-adapter

Conversation

@davidrudduck
Copy link
Copy Markdown
Owner

@davidrudduck davidrudduck commented Mar 3, 2026

Summary

  • Extends the plugin API with registerSessionStoreAdapter() for custom session store backends
  • Adds "plugin" option to session.storeAdapter config
  • When active, reads are served from the plugin adapter, writes go to both adapter and filesystem
  • Adapter is activated during gateway boot after plugins load

Motivation

Deployments that need external session storage (Redis, DynamoDB, etc.) can now provide a plugin adapter without modifying core session store logic. The write-through pattern ensures filesystem backup is always maintained.

Changes

  • src/config/sessions/adapter.ts — New file: SessionStoreAdapter interface with optional toRecord() and warmCache()
  • src/plugins/types.ts — Added registerSessionStoreAdapter to OpenClawPluginApi
  • src/plugins/registry.ts — Added adapter registration storage and getPluginSessionStoreAdapter() accessor
  • src/config/sessions/store.ts — Added plugin adapter routing in load/save paths
  • src/config/zod-schema.session.ts — Added "plugin" to storeAdapter enum
  • src/config/types.base.ts — Added storeAdapter field to SessionConfig TypeScript type
  • src/gateway/server.impl.ts — Plugin adapter activation after plugin load
  • src/plugin-sdk/index.ts — Exported SessionStoreAdapter and SessionEntry types
  • extensions/lobster/src/lobster-tool.test.ts — Added as OpenClawPluginApi cast to fix type narrowing with Partial<> spread

Test plan

  • Verify pnpm tsgo passes (only pre-existing extensions/tlon errors remain)
  • Verify existing tests still pass
  • Manual: register mock adapter via plugin, set storeAdapter: "plugin", verify reads/writes route through adapter
  • Manual: verify filesystem fallback when no plugin adapter registered

Summary by CodeRabbit

  • New Features

    • Added Tailscale Serve–based gateway discovery fallback and remote refresh controls.
    • Introduced Gateway actions dialog and unified “glass card”/selectable row UI.
    • Migrated last-connection and TLS pinning to Keychain.
    • New cross-platform camera capture pipeline and helpers.
    • Voice playback auto-falls back to MP3 when PCM is rejected.
    • Docker healthcheck and sandbox setup enhancements.
  • Improvements

    • Smoother UI, centralized helpers (mic refresh, location, JS/WebView, logging).
    • More robust WebSocket/session flows and Base64 image handling.
  • Bug Fixes

    • Permission handling and image scaling reliability; notification/channel stability.
  • Documentation

    • Expanded channel guidance, webhook/automation notes, CLI config validate/file; device-based pairing commands.
  • Version

    • iOS/Android: 2026.3.2.

hclsys and others added 30 commits March 3, 2026 01:09
…allback

The cron delivery path short-circuits with an error when `toCandidate` is
falsy (line 151), before reaching `resolveOutboundTarget()` which provides
the `plugin.config.resolveDefaultTo()` fallback. The direct send path in
`targets.ts` already uses this fallback correctly.

Remove the early `!toCandidate` exit so that `resolveOutboundTarget()`
can attempt the plugin-provided default. Guard the WhatsApp allowFrom
override against falsy `toCandidate` to maintain existing behavior when
a target IS resolved.

Fixes openclaw#32355

Signed-off-by: HCL <[email protected]>
… at lifecycle start

When the Discord gateway completes its READY handshake before
`runDiscordGatewayLifecycle` registers its debug event listener, the
initial "WebSocket connection opened" event is missed. This leaves
`connected` as undefined in the channel runtime, causing the health
monitor to treat the channel as "stuck" and restart it every check
cycle.

Check `gateway.isConnected` immediately after registering the debug
listener and push the initial connected status if the gateway is
already connected.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
When abortSignal is already aborted at lifecycle start, onAbort() fires
synchronously and pushes connected: false. Without a lifecycleStopping
guard, the subsequent gateway.isConnected check could push a spurious
connected: true, contradicting the shutdown.

Adds !lifecycleStopping to the isConnected guard and a test verifying
no connected: true is emitted when the signal is pre-aborted.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
…ication spam (openclaw#31580)

* fix(feishu): skip typing indicator keepalive re-adds to prevent notification spam

The typing keepalive loop calls addTypingIndicator() every 3 seconds,
which creates a new messageReaction.create API call each time. Feishu
treats each re-add as a new reaction event and fires a push notification,
causing users to receive repeated notifications while waiting for a
response.

Unlike Telegram/Discord where typing status expires after a few seconds,
Feishu reactions persist until explicitly removed. Skip the keepalive
re-add when a reaction already exists (reactionId is set) since there
is no need to refresh it.

Closes openclaw#28660

* Changelog: note Feishu typing keepalive suppression

---------

Co-authored-by: yuxh1996 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
- 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]>
Mylszd and others added 25 commits March 3, 2026 11:02
Merged via squash.

Prepared head SHA: 612ecc0
Co-authored-by: Mylszd <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
…ng truncation (openclaw#20076)

Merged via squash.

Prepared head SHA: 6edebf2
Co-authored-by: jlwestsr <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: da2f8f6
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b99ad80
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 9917165
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
…law#33032)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: f77e3d7
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
…eaks (openclaw#33169)

* fix: stabilize telegram draft stream message boundaries

* fix: suppress NO_REPLY lead-fragment leaks

* fix: keep underscore guard for non-NO_REPLY prefixes

* fix: skip assistant-start rotation only after real lane rotation

* fix: preserve finalized state when pre-rotation does not force

* fix: reset finalized preview state on message-start boundary

* fix: document Telegram draft boundary + NO_REPLY reliability updates (openclaw#33169) (thanks @obviyus)
Extends the plugin API with registerSessionStoreAdapter(), allowing
plugins to provide custom session store backends (Redis, DynamoDB, etc.).

When session.storeAdapter is "plugin", reads are served from the plugin
adapter and writes go to both the plugin adapter and filesystem.
The adapter is activated during gateway boot after plugins load.

Adds optional toRecord() and warmCache() to SessionStoreAdapter for
efficient bulk reads and pre-population on activation.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 3, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 81ca309 and 7ede70e.

⛔ Files ignored due to path filters (1)
  • docs/assets/sponsors/vercel.svg is excluded by !**/*.svg
📒 Files selected for processing (299)
  • .dockerignore
  • .github/actionlint.yaml
  • .github/actions/setup-node-env/action.yml
  • .github/actions/setup-pnpm-store-cache/action.yml
  • .github/workflows/ci.yml
  • .github/workflows/docker-release.yml
  • .github/workflows/install-smoke.yml
  • .github/workflows/sandbox-common-smoke.yml
  • .github/workflows/stale.yml
  • .gitignore
  • .pi/extensions/diff.ts
  • .pi/extensions/files.ts
  • .pi/extensions/prompt-url-widget.ts
  • .pi/extensions/ui/paged-select.ts
  • .pi/prompts/landpr.md
  • AGENTS.md
  • CHANGELOG.md
  • Dockerfile
  • README.md
  • SECURITY.md
  • appcast.xml
  • apps/android/README.md
  • apps/android/app/build.gradle.kts
  • apps/android/app/src/main/AndroidManifest.xml
  • apps/android/app/src/main/java/ai/openclaw/android/node/CameraCaptureManager.kt
  • apps/android/app/src/main/java/ai/openclaw/android/node/CanvasController.kt
  • apps/android/app/src/main/java/ai/openclaw/android/node/ContactsHandler.kt
  • apps/android/app/src/main/java/ai/openclaw/android/node/DeviceHandler.kt
  • apps/android/app/src/main/java/ai/openclaw/android/node/DeviceNotificationListenerService.kt
  • apps/android/app/src/main/java/ai/openclaw/android/node/InvokeDispatcher.kt
  • apps/android/app/src/main/java/ai/openclaw/android/node/MotionHandler.kt
  • apps/android/app/src/main/java/ai/openclaw/android/node/NodeUtils.kt
  • apps/android/app/src/main/java/ai/openclaw/android/node/NotificationsHandler.kt
  • apps/android/app/src/main/java/ai/openclaw/android/node/PhotosHandler.kt
  • apps/android/app/src/main/java/ai/openclaw/android/node/ScreenRecordManager.kt
  • apps/android/app/src/main/java/ai/openclaw/android/node/SystemHandler.kt
  • apps/android/app/src/main/java/ai/openclaw/android/ui/OnboardingFlow.kt
  • apps/android/app/src/main/java/ai/openclaw/android/ui/SettingsSheet.kt
  • apps/android/app/src/main/java/ai/openclaw/android/ui/chat/Base64ImageState.kt
  • apps/android/app/src/main/java/ai/openclaw/android/ui/chat/ChatMarkdown.kt
  • apps/android/app/src/main/java/ai/openclaw/android/ui/chat/ChatMessageViews.kt
  • apps/android/app/src/main/java/ai/openclaw/android/voice/TalkModeManager.kt
  • apps/android/app/src/test/java/ai/openclaw/android/gateway/GatewaySessionInvokeTest.kt
  • apps/android/app/src/test/java/ai/openclaw/android/node/CalendarHandlerTest.kt
  • apps/android/app/src/test/java/ai/openclaw/android/node/ContactsHandlerTest.kt
  • apps/android/app/src/test/java/ai/openclaw/android/node/InvokeCommandRegistryTest.kt
  • apps/android/app/src/test/java/ai/openclaw/android/node/MotionHandlerTest.kt
  • apps/android/app/src/test/java/ai/openclaw/android/node/NodeHandlerRobolectricTest.kt
  • apps/android/app/src/test/java/ai/openclaw/android/node/PhotosHandlerTest.kt
  • apps/ios/ShareExtension/Info.plist
  • apps/ios/Sources/Camera/CameraController.swift
  • apps/ios/Sources/Contacts/ContactsService.swift
  • apps/ios/Sources/Device/DeviceInfoHelper.swift
  • apps/ios/Sources/Device/DeviceStatusService.swift
  • apps/ios/Sources/Gateway/GatewayConnectionController.swift
  • apps/ios/Sources/Gateway/GatewayDiscoveryModel.swift
  • apps/ios/Sources/Gateway/GatewayServiceResolver.swift
  • apps/ios/Sources/Gateway/GatewaySettingsStore.swift
  • apps/ios/Sources/Gateway/KeychainStore.swift
  • apps/ios/Sources/Info.plist
  • apps/ios/Sources/Location/LocationService.swift
  • apps/ios/Sources/Model/NodeAppModel+Canvas.swift
  • apps/ios/Sources/Model/NodeAppModel.swift
  • apps/ios/Sources/Onboarding/GatewayOnboardingView.swift
  • apps/ios/Sources/Onboarding/OnboardingWizardView.swift
  • apps/ios/Sources/OpenClawApp.swift
  • apps/ios/Sources/RootCanvas.swift
  • apps/ios/Sources/RootTabs.swift
  • apps/ios/Sources/Screen/ScreenController.swift
  • apps/ios/Sources/Screen/ScreenRecordService.swift
  • apps/ios/Sources/Services/NodeServiceProtocols.swift
  • apps/ios/Sources/Status/GatewayActionsDialog.swift
  • apps/ios/Sources/Status/GatewayStatusBuilder.swift
  • apps/ios/Sources/Status/StatusGlassCard.swift
  • apps/ios/Sources/Status/StatusPill.swift
  • apps/ios/Sources/Status/VoiceWakeToast.swift
  • apps/ios/Sources/Voice/TalkModeManager.swift
  • apps/ios/Sources/Voice/VoiceWakeManager.swift
  • apps/ios/Tests/DeepLinkParserTests.swift
  • apps/ios/Tests/GatewayConnectionControllerTests.swift
  • apps/ios/Tests/GatewayConnectionSecurityTests.swift
  • apps/ios/Tests/GatewaySettingsStoreTests.swift
  • apps/ios/Tests/Info.plist
  • apps/ios/Tests/NodeAppModelInvokeTests.swift
  • apps/ios/Tests/TalkModeConfigParsingTests.swift
  • apps/ios/Tests/TestDefaultsSupport.swift
  • apps/ios/Tests/VoiceWakeManagerExtractCommandTests.swift
  • apps/ios/WatchApp/Info.plist
  • apps/ios/WatchExtension/Info.plist
  • apps/ios/project.yml
  • apps/macos/Sources/OpenClaw/AgentWorkspaceConfig.swift
  • apps/macos/Sources/OpenClaw/AudioInputDeviceObserver.swift
  • apps/macos/Sources/OpenClaw/CameraCaptureService.swift
  • apps/macos/Sources/OpenClaw/CanvasA2UIActionMessageHandler.swift
  • apps/macos/Sources/OpenClaw/CanvasFileWatcher.swift
  • apps/macos/Sources/OpenClaw/CanvasWindowController+Testing.swift
  • apps/macos/Sources/OpenClaw/CanvasWindowController.swift
  • apps/macos/Sources/OpenClaw/ChannelsSettings+ChannelState.swift
  • apps/macos/Sources/OpenClaw/ChannelsSettings+View.swift
  • apps/macos/Sources/OpenClaw/ColorHexSupport.swift
  • apps/macos/Sources/OpenClaw/ConfigFileWatcher.swift
  • apps/macos/Sources/OpenClaw/ConfigSettings.swift
  • apps/macos/Sources/OpenClaw/ContextMenuCardView.swift
  • apps/macos/Sources/OpenClaw/ControlChannel.swift
  • apps/macos/Sources/OpenClaw/CronJobEditor+Helpers.swift
  • apps/macos/Sources/OpenClaw/CronJobsStore.swift
  • apps/macos/Sources/OpenClaw/CronSettings+Helpers.swift
  • apps/macos/Sources/OpenClaw/DevicePairingApprovalPrompter.swift
  • apps/macos/Sources/OpenClaw/DurationFormattingSupport.swift
  • apps/macos/Sources/OpenClaw/ExecApprovals.swift
  • apps/macos/Sources/OpenClaw/ExecApprovalsGatewayPrompter.swift
  • apps/macos/Sources/OpenClaw/ExecApprovalsSocket.swift
  • apps/macos/Sources/OpenClaw/ExecEnvInvocationUnwrapper.swift
  • apps/macos/Sources/OpenClaw/ExecEnvOptions.swift
  • apps/macos/Sources/OpenClaw/ExecSystemRunCommandValidator.swift
  • apps/macos/Sources/OpenClaw/GatewayDiscoveryMenu.swift
  • apps/macos/Sources/OpenClaw/GatewayDiscoverySelectionSupport.swift
  • apps/macos/Sources/OpenClaw/GatewayEndpointStore.swift
  • apps/macos/Sources/OpenClaw/GatewayLaunchAgentManager.swift
  • apps/macos/Sources/OpenClaw/GatewayPushSubscription.swift
  • apps/macos/Sources/OpenClaw/GatewayRemoteConfig.swift
  • apps/macos/Sources/OpenClaw/GeneralSettings.swift
  • apps/macos/Sources/OpenClaw/HostEnvSecurityPolicy.generated.swift
  • apps/macos/Sources/OpenClaw/HoverHUD.swift
  • apps/macos/Sources/OpenClaw/InstancesSettings.swift
  • apps/macos/Sources/OpenClaw/InstancesStore.swift
  • apps/macos/Sources/OpenClaw/JSONObjectExtractionSupport.swift
  • apps/macos/Sources/OpenClaw/Logging/OpenClawLogging.swift
  • apps/macos/Sources/OpenClaw/MenuBar.swift
  • apps/macos/Sources/OpenClaw/MenuContentView.swift
  • apps/macos/Sources/OpenClaw/MenuHeaderCard.swift
  • apps/macos/Sources/OpenClaw/MenuHighlightedHostView.swift
  • apps/macos/Sources/OpenClaw/MenuItemHighlightColors.swift
  • apps/macos/Sources/OpenClaw/MenuSessionsHeaderView.swift
  • apps/macos/Sources/OpenClaw/MenuUsageHeaderView.swift
  • apps/macos/Sources/OpenClaw/MicRefreshSupport.swift
  • apps/macos/Sources/OpenClaw/NodeMode/MacNodeLocationService.swift
  • apps/macos/Sources/OpenClaw/NodePairingApprovalPrompter.swift
  • apps/macos/Sources/OpenClaw/NodeServiceManager.swift
  • apps/macos/Sources/OpenClaw/NodesMenu.swift
  • apps/macos/Sources/OpenClaw/NodesStore.swift
  • apps/macos/Sources/OpenClaw/NotifyOverlay.swift
  • apps/macos/Sources/OpenClaw/OnboardingView+Actions.swift
  • apps/macos/Sources/OpenClaw/OnboardingView+Layout.swift
  • apps/macos/Sources/OpenClaw/OnboardingView+Monitoring.swift
  • apps/macos/Sources/OpenClaw/OnboardingView+Pages.swift
  • apps/macos/Sources/OpenClaw/OnboardingView+Workspace.swift
  • apps/macos/Sources/OpenClaw/OpenClawConfigFile.swift
  • apps/macos/Sources/OpenClaw/OverlayPanelFactory.swift
  • apps/macos/Sources/OpenClaw/PairingAlertSupport.swift
  • apps/macos/Sources/OpenClaw/PeekabooBridgeHostCoordinator.swift
  • apps/macos/Sources/OpenClaw/PermissionManager.swift
  • apps/macos/Sources/OpenClaw/PermissionMonitoringSupport.swift
  • apps/macos/Sources/OpenClaw/PlatformLabelFormatter.swift
  • apps/macos/Sources/OpenClaw/RemotePortTunnel.swift
  • apps/macos/Sources/OpenClaw/Resources/Info.plist
  • apps/macos/Sources/OpenClaw/ScreenRecordService.swift
  • apps/macos/Sources/OpenClaw/SelectableRow.swift
  • apps/macos/Sources/OpenClaw/SessionMenuLabelView.swift
  • apps/macos/Sources/OpenClaw/SessionsSettings.swift
  • apps/macos/Sources/OpenClaw/SettingsRefreshButton.swift
  • apps/macos/Sources/OpenClaw/SettingsRootView.swift
  • apps/macos/Sources/OpenClaw/SettingsSidebarCard.swift
  • apps/macos/Sources/OpenClaw/SettingsSidebarScroll.swift
  • apps/macos/Sources/OpenClaw/SimpleFileWatcher.swift
  • apps/macos/Sources/OpenClaw/SimpleFileWatcherOwner.swift
  • apps/macos/Sources/OpenClaw/SimpleTaskSupport.swift
  • apps/macos/Sources/OpenClaw/SystemSettingsURLSupport.swift
  • apps/macos/Sources/OpenClaw/TalkOverlay.swift
  • apps/macos/Sources/OpenClaw/TalkOverlayView.swift
  • apps/macos/Sources/OpenClaw/TextSummarySupport.swift
  • apps/macos/Sources/OpenClaw/TrackingAreaSupport.swift
  • apps/macos/Sources/OpenClaw/UsageCostData.swift
  • apps/macos/Sources/OpenClaw/UsageMenuLabelView.swift
  • apps/macos/Sources/OpenClaw/VoiceOverlayTextFormatting.swift
  • apps/macos/Sources/OpenClaw/VoicePushToTalk.swift
  • apps/macos/Sources/OpenClaw/VoiceWakeGlobalSettingsSync.swift
  • apps/macos/Sources/OpenClaw/VoiceWakeOverlayController+Window.swift
  • apps/macos/Sources/OpenClaw/VoiceWakeRecognitionDebugSupport.swift
  • apps/macos/Sources/OpenClaw/VoiceWakeRuntime.swift
  • apps/macos/Sources/OpenClaw/VoiceWakeSettings.swift
  • apps/macos/Sources/OpenClaw/VoiceWakeTester.swift
  • apps/macos/Sources/OpenClaw/WebChatManager.swift
  • apps/macos/Sources/OpenClaw/WebChatSwiftUI.swift
  • apps/macos/Sources/OpenClaw/WorkActivityStore.swift
  • apps/macos/Sources/OpenClawDiscovery/GatewayDiscoveryModel.swift
  • apps/macos/Sources/OpenClawDiscovery/TailscaleNetwork.swift
  • apps/macos/Sources/OpenClawDiscovery/TailscaleServeGatewayDiscovery.swift
  • apps/macos/Sources/OpenClawMacCLI/CLIArgParsingSupport.swift
  • apps/macos/Sources/OpenClawMacCLI/ConnectCommand.swift
  • apps/macos/Sources/OpenClawMacCLI/WizardCommand.swift
  • apps/macos/Sources/OpenClawProtocol/GatewayModels.swift
  • apps/macos/Tests/OpenClawIPCTests/AgentEventStoreTests.swift
  • apps/macos/Tests/OpenClawIPCTests/AnyCodableEncodingTests.swift
  • apps/macos/Tests/OpenClawIPCTests/CameraCaptureServiceTests.swift
  • apps/macos/Tests/OpenClawIPCTests/CameraIPCTests.swift
  • apps/macos/Tests/OpenClawIPCTests/CanvasIPCTests.swift
  • apps/macos/Tests/OpenClawIPCTests/CanvasWindowSmokeTests.swift
  • apps/macos/Tests/OpenClawIPCTests/ChannelsSettingsSmokeTests.swift
  • apps/macos/Tests/OpenClawIPCTests/CommandResolverTests.swift
  • apps/macos/Tests/OpenClawIPCTests/CronJobEditorSmokeTests.swift
  • apps/macos/Tests/OpenClawIPCTests/CronModelsTests.swift
  • apps/macos/Tests/OpenClawIPCTests/ExecAllowlistTests.swift
  • apps/macos/Tests/OpenClawIPCTests/ExecApprovalHelpersTests.swift
  • apps/macos/Tests/OpenClawIPCTests/ExecApprovalsStoreRefactorTests.swift
  • apps/macos/Tests/OpenClawIPCTests/ExecHostRequestEvaluatorTests.swift
  • apps/macos/Tests/OpenClawIPCTests/ExecSystemRunCommandValidatorTests.swift
  • apps/macos/Tests/OpenClawIPCTests/GatewayChannelConfigureTests.swift
  • apps/macos/Tests/OpenClawIPCTests/GatewayChannelConnectTests.swift
  • apps/macos/Tests/OpenClawIPCTests/GatewayChannelRequestTests.swift
  • apps/macos/Tests/OpenClawIPCTests/GatewayChannelShutdownTests.swift
  • apps/macos/Tests/OpenClawIPCTests/GatewayConnectionControlTests.swift
  • apps/macos/Tests/OpenClawIPCTests/GatewayDiscoveryHelpersTests.swift
  • apps/macos/Tests/OpenClawIPCTests/GatewayDiscoveryModelTests.swift
  • apps/macos/Tests/OpenClawIPCTests/GatewayEndpointStoreTests.swift
  • apps/macos/Tests/OpenClawIPCTests/GatewayFrameDecodeTests.swift
  • apps/macos/Tests/OpenClawIPCTests/GatewayProcessManagerTests.swift
  • apps/macos/Tests/OpenClawIPCTests/GatewayWebSocketTestSupport.swift
  • apps/macos/Tests/OpenClawIPCTests/HealthDecodeTests.swift
  • apps/macos/Tests/OpenClawIPCTests/HealthStoreStateTests.swift
  • apps/macos/Tests/OpenClawIPCTests/LogLocatorTests.swift
  • apps/macos/Tests/OpenClawIPCTests/LowCoverageHelperTests.swift
  • apps/macos/Tests/OpenClawIPCTests/LowCoverageViewSmokeTests.swift
  • apps/macos/Tests/OpenClawIPCTests/MacNodeRuntimeTests.swift
  • apps/macos/Tests/OpenClawIPCTests/NixModeStableSuiteTests.swift
  • apps/macos/Tests/OpenClawIPCTests/NodeManagerPathsTests.swift
  • apps/macos/Tests/OpenClawIPCTests/OpenClawConfigFileTests.swift
  • apps/macos/Tests/OpenClawIPCTests/PermissionManagerLocationTests.swift
  • apps/macos/Tests/OpenClawIPCTests/PermissionManagerTests.swift
  • apps/macos/Tests/OpenClawIPCTests/SkillsSettingsSmokeTests.swift
  • apps/macos/Tests/OpenClawIPCTests/TailscaleServeGatewayDiscoveryTests.swift
  • apps/macos/Tests/OpenClawIPCTests/TalkModeConfigParsingTests.swift
  • apps/macos/Tests/OpenClawIPCTests/TestFSHelpers.swift
  • apps/macos/Tests/OpenClawIPCTests/TestIsolation.swift
  • apps/macos/Tests/OpenClawIPCTests/UtilitiesTests.swift
  • apps/macos/Tests/OpenClawIPCTests/VoicePushToTalkHotkeyTests.swift
  • apps/macos/Tests/OpenClawIPCTests/VoiceWakeGlobalSettingsSyncTests.swift
  • apps/macos/Tests/OpenClawIPCTests/VoiceWakeRuntimeTests.swift
  • apps/macos/Tests/OpenClawIPCTests/VoiceWakeTestSupport.swift
  • apps/macos/Tests/OpenClawIPCTests/VoiceWakeTesterTests.swift
  • apps/macos/Tests/OpenClawIPCTests/WebChatSwiftUISmokeTests.swift
  • apps/macos/Tests/OpenClawIPCTests/WorkActivityStoreTests.swift
  • apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMessageViews.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/BonjourServiceResolverSupport.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/CalendarCommands.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/CameraAuthorization.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/CameraCapturePipelineSupport.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/CameraSessionConfiguration.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/CaptureRateLimits.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/DeepLinks.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/DeviceAuthPayload.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayChannel.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayConnectChallengeSupport.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayDiscoveryBrowserSupport.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayNodeSession.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayTLSPinning.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/GenericPasswordKeychainStore.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/LocalNetworkURLSupport.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/LocationCurrentRequest.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/LocationServiceSupport.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/LoopbackHost.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/MotionCommands.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/NetworkInterfaceIPv4.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/NetworkInterfaces.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/OpenClawDateRangeLimitParams.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/ThrowingContinuationSupport.swift
  • apps/shared/OpenClawKit/Sources/OpenClawKit/WebViewJavaScriptSupport.swift
  • apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift
  • apps/shared/OpenClawKit/Tests/OpenClawKitTests/ChatViewModelTests.swift
  • apps/shared/OpenClawKit/Tests/OpenClawKitTests/GatewayNodeSessionTests.swift
  • apps/shared/OpenClawKit/Tests/OpenClawKitTests/TestAsyncHelpers.swift
  • assets/chrome-extension/background.js
  • changelog/fragments/README.md
  • changelog/fragments/pr-5080.md
  • changelog/fragments/pr-5343.md
  • docker-compose.yml
  • docker-setup.sh
  • docs/automation/hooks.md
  • docs/automation/webhook.md
  • docs/brave-search.md
  • docs/channels/bluebubbles.md
  • docs/channels/broadcast-groups.md
  • docs/channels/channel-routing.md
  • docs/channels/discord.md
  • docs/channels/feishu.md
  • docs/channels/googlechat.md
  • docs/channels/index.md
  • docs/channels/line.md
  • docs/channels/mattermost.md
  • docs/channels/telegram.md
  • docs/channels/tlon.md
  • docs/channels/zalouser.md
  • docs/ci.md
  • docs/cli/acp.md
  • docs/cli/config.md
  • docs/cli/index.md
  • docs/cli/memory.md
  • docs/cli/models.md
  • docs/cli/node.md

📝 Walkthrough

Walkthrough

Broad multi-platform refactor adding OpenClawKit utilities and migrating platform code to shared helpers; expands gateway discovery (incl. Tailscale Serve), keychain migrations, UI componentization, CI/workflow/cache tuning, Docker/compose enhancements with healthchecks and sandbox wiring, extensive Android/iOS/macOS app updates, and wide documentation refresh.

Changes

Cohort / File(s) Summary
Ignore/Config
.dockerignore, .gitignore
Adjust docker build context to include OpenClawKit sources; ignore Android Kotlin and entire .claude directory.
GitHub Actions: Runners/Caching
.github/actionlint.yaml, .github/actions/setup-node-env/action.yml, .github/actions/setup-pnpm-store-cache/action.yml, .github/workflows/ci.yml, .github/workflows/docker-release.yml, .github/workflows/install-smoke.yml, .github/workflows/sandbox-common-smoke.yml, .github/workflows/stale.yml
Add Windows 32 vCPU runner; introduce sticky-disk/actions-cache toggles; rework scope detection; revamp Windows CI; switch Docker builder/actions; add OCI labels; introduce stale/lock workflows.
Docker/Compose/Scripts
Dockerfile, docker-compose.yml, docker-setup.sh
Add OCI labels, corepack enable, optional Docker CLI install, HEALTHCHECK; compose healthcheck/security/env defaults; setup script gains sandbox flow, truthy parsing, gateway sync, socket handling.
PI TUI Simplification
.pi/extensions/diff.ts, .pi/extensions/files.ts, .pi/extensions/ui/paged-select.ts, .pi/extensions/prompt-url-widget.ts
Replace custom UI with shared paged-select; centralize prompt URL widget rendering.
Android: Permissions/Parsing/Tests
apps/android/... (multiple Kotlin files), apps/android/app/build.gradle.kts, apps/android/app/src/main/AndroidManifest.xml, apps/android/app/src/test/...
Unify JSON parsing helpers; adjust permission/version guards; image scaling helpers; notification JSON; refactor tests to base class; version bump; add READ_MEDIA_VISUAL_USER_SELECTED.
iOS: Camera/Discovery/Keychain/Status/UI
apps/ios/Sources/... (CameraController, Discovery, Gateway*, Device*, Screen*, Services, Status*), apps/ios/Sources/OpenClawApp.swift, apps/ios/Sources/Info.plist, apps/ios/ShareExtension/Info.plist, apps/ios/project.yml
Adopt CameraCapturePipelineSupport; browser/resolver helpers; Keychain-backed settings; main-actor annotations; status builders/dialog; local network helpers; capture rate limits; version updates and build settings.
iOS: Voice/Talk
apps/ios/Sources/Voice/...
Stream failure box and PCM→MP3 fallback; permission APIs via AVAudioApplication; debug helpers and formatting centralization.
iOS: Tests
apps/ios/Tests/...
Refactor deep link, gateway settings/security tests to Keychain; add PCM rejection tests; add defaults snapshot helper; adjust signatures and helpers.
macOS App: UI Components/Helpers
apps/macos/Sources/OpenClaw/... (Menu*, Status*, SelectableRow, Settings*, OverlayPanelFactory, MenuHeaderCard, MenuItemHighlightColors, StatusGlassCard)
Introduce reusable UI modifiers/components; centralize highlight colors, glass cards, selectable rows; panel animation factory; header cards; sidebar layout containers.
macOS App: Gateway/Discovery/Push
apps/macos/Sources/OpenClaw/Gateway*, .../OpenClawDiscovery/*
Add Tailscale Serve discovery and remote fallback orchestration; NWBrowser factory; push subscription helper; endpoint/tunnel/direct URL resolution improvements; legacy socket symlinks.
macOS App: Pairing/Alerts/Tasks
apps/macos/Sources/OpenClaw/PairingAlertSupport.swift, DevicePairingApprovalPrompter.swift, NodePairingApprovalPrompter.swift, SimpleTaskSupport.swift
Centralize pairing alert state/presentation and push lifecycle; simplify task management.
macOS App: File Watching
SimpleFileWatcher.swift, SimpleFileWatcherOwner.swift, CanvasFileWatcher.swift, ConfigFileWatcher.swift
Wrap/coalesce file watcher API; adopt owner protocol; remove explicit lifecycle methods.
macOS App: Location/Voice/Mic
NodeMode/MacNodeLocationService.swift, MicRefreshSupport.swift, Voice*
Adopt shared location service/current request; mic refresh helpers; voice overlay text formatting and debug support.
macOS App: Logging/Parsing/Exec
Logging/OpenClawLogging.swift, JSONObjectExtractionSupport.swift, TextSummarySupport.swift, Exec*
Centralize log metadata stringification; JSON/text extractors; exec env options/constants and validators refactor.
macOS Protocol/Models
apps/macos/Sources/OpenClawProtocol/GatewayModels.swift
Add Secrets* models; rename ExecApprovalRequestParams field to systemrunplan.
macOS Tests: WebSocket/Test Harness
apps/macos/Tests/OpenClawIPCTests/Gateway*Tests.swift, GatewayWebSocketTestSupport.swift
Replace bespoke fakes with testable WebSocket session/task; helpers for frames/IDs; adjust tests to new harness.
macOS Tests: Helpers/Refactors
.../TestFSHelpers.swift, .../TestIsolation.swift, multiple test files
Add FS helpers; refactor to shared builders/snapshots; minor signature/order cleanups.
Shared OpenClawKit: New Utilities
apps/shared/OpenClawKit/Sources/OpenClawKit/* (Camera*, CaptureRateLimits, Location*, LoopbackHost, NetworkInterface*, WebViewJavaScriptSupport, GatewaySupport, GenericPasswordKeychainStore, LocalNetworkURLSupport, OpenClawDateRangeLimitParams, ThrowingContinuationSupport, BonjourSupport)
Add numerous shared APIs: camera pipeline/session config, capture limits, location service/current request, loopback/local network, network interfaces, webview JS helpers, gateway connect/challenge helpers, keychain store, discovery helpers, date-range params, continuation support.
Shared OpenClawKit: Integrations/Refactors
GatewayChannel.swift, GatewayNodeSession.swift, GatewayTLSPinning.swift, DeepLinks.swift, CalendarCommands.swift, MotionCommands.swift
Adopt new signing/nonce helpers; waiter draining; migrate TLS pinning to Keychain; swap to LoopbackHost; convert params structs to typealiases; model tweaks.
Shared Chat UI
apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatMessageViews.swift
Streamline chat bubble pathing and container styling via helpers.
Chrome Extension
assets/chrome-extension/background.js
Harden relay/debugger flows; relay state handling; longer reattach retries; UI state adjustments during relay outages.
Docs
docs/**
Add channel config clarifications, new events, security notes, CLI commands (config file/validate), CI docs updates, channel pages overhauls. Remove old changelog fragments.
Changelog
changelog/fragments/*
Remove obsolete fragment files.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor App as macOS App
  participant GDM as GatewayDiscoveryModel
  participant TS as TailscaleServeGatewayDiscovery
  participant TSCLI as Tailscale CLI
  participant Host as Candidate Host

  App->>GDM: refreshRemoteFallbackNow()
  GDM->>TS: discover(timeout)
  TS->>TSCLI: tailscale status (exec)
  TSCLI-->>TS: JSON status
  loop candidates
    TS->>Host: WS probe (timeout)
    Host-->>TS: connect.challenge or timeout
  end
  TS-->>GDM: Beacons (reachable)
  GDM->>GDM: Map/Dedupe/Combine results
  GDM-->>App: Updated discovered gateways
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~150 minutes

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/plugin-session-store-adapter

@davidrudduck
Copy link
Copy Markdown
Owner Author

Recreating — base branch was out of sync

@davidrudduck davidrudduck deleted the feat/plugin-session-store-adapter branch March 3, 2026 22:41
davidrudduck pushed a commit that referenced this pull request Mar 31, 2026
* feat: add QQ Bot channel extension

* fix(qqbot): add setupWizard to runtime plugin for onboard re-entry

* fix: fix review

* fix: fix review

* chore: sync lockfile and config-docs baseline for qqbot extension

* refactor: 移除图床服务器相关代码

* fix

* docs: 新增 QQ Bot 插件文档并修正链接路径

* refactor: remove credential backup functionality and update setup logic

- Deleted the credential backup module to streamline the codebase.
- Updated the setup surface to handle client secrets more robustly, allowing for configured secret inputs.
- Simplified slash commands by removing unused hot upgrade compatibility checks and related functions.
- Adjusted types to use SecretInput for client secrets in QQBot configuration.
- Modified bundled plugin metadata to allow additional properties in the config schema.

* feat: 添加本地媒体路径解析功能,修正 QQBot 媒体路径处理

* feat: 添加本地媒体路径解析功能,修正 QQBot 媒体路径处理

* feat: remove qqbot-media and qqbot-remind skills, add tests for config and setup

- Deleted the qqbot-media and qqbot-remind skills documentation files.
- Added unit tests for qqbot configuration and setup processes, ensuring proper handling of SecretRef-backed credentials and account configurations.
- Implemented tests for local media path remapping, verifying correct resolution of media file paths.
- Removed obsolete channel and remind tools, streamlining the codebase.

* feat: 更新 QQBot 配置模式,添加音频格式和账户定义

* feat: 添加 QQBot 频道管理和定时提醒技能,更新媒体路径解析功能

* fix

* feat: 添加 /bot-upgrade 指令以查看 QQBot 插件升级指引

* feat: update reminder and qq channel skills

* feat: 更新remind工具投递目标地址格式

* feat: Refactor QQBot payload handling and improve code documentation

- Simplified and clarified the structure of payload interfaces for Cron reminders and media messages.
- Enhanced the parsing function to provide clearer error messages and improved validation.
- Updated platform utility functions for better cross-platform compatibility and clearer documentation.
- Improved text parsing utilities for better readability and consistency in emoji representation.
- Optimized upload cache management with clearer comments and reduced redundancy.
- Integrated QQBot plugin into the bundled channel plugins and updated metadata for installation.

* OK apps/macos/Sources/OpenClaw/HostEnvSecurityPolicy.generated.swift

> [email protected] check:bundled-channel-config-metadata /Users/yuehuali/code/PR/openclaw
> node --import tsx scripts/generate-bundled-channel-config-metadata.ts --check

[bundled-channel-config-metadata] stale generated output at src/config/bundled-channel-config-metadata.generated.ts
 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Command failed with exit code 1.

* feat: 添加 QQBot 渠道配置及相关账户设置

* fix(qqbot): resolve 14 high-priority bugs from PR openclaw#52986 review

DM routing (7 fixes):
- #1: DM slash-command replies use sendDmMessage(guildId) instead of sendC2CMessage(senderId)
- #2: DM qualifiedTarget uses qqbot:dm:${guildId} instead of qqbot:c2c:${senderId}
- #3: sendTextChunks adds DM branch
- #4: sendMarkdownReply adds DM branch for text and Base64 images
- #5: parseAndSendMediaTags maps DM to targetType:dm + guildId
- #6: sendTextToTarget DM branch uses sendDmMessage; MessageTarget adds guildId field
- #7: handleImage/Audio/Video/FilePayload add DM branches

Other high-priority fixes:
- #8: Fix sendC2CVoiceMessage/sendGroupVoiceMessage parameter misalignment
- #9: broadcastMessage uses groupOpenid instead of member_openid for group users
- #10: Unify KnownUser storage - proactive.ts delegates to known-users.ts
- #11: Remove invalid recordKnownUser calls for guild/DM users
- #12: sendGroupMessage uses sendAndNotify to trigger onMessageSent hook
- #13: sendPhoto channel unsupported returns error field
- #14: sendTextAfterMedia adds channel and dm branches

Type fixes:
- DeliverEventContext adds guildId field
- MediaTargetContext.targetType adds dm variant
- sendPlainTextReply imgMediaTarget adds DM branch

* fix(qqbot): resolve 2 blockers + 7 medium-priority bugs from PR openclaw#52986 review

Blocker-1: Remove unused dmPolicy config knob
- dmPolicy was declared in schema/types/plugin.json but never consumed at runtime
- Removed from config-schema.ts, types.ts, and openclaw.plugin.json
- allowFrom remains active (already wired into framework command-auth)

Blocker-2: Gate sensitive slash commands with allowFrom authorization
- SlashCommand interface adds requireAuth?: boolean
- SlashCommandContext adds commandAuthorized: boolean
- /bot-logs set to requireAuth: true (reads local log files)
- matchSlashCommand rejects unauthorized senders for requireAuth commands
- trySlashCommandOrEnqueue computes commandAuthorized from allowFrom config

Medium-priority fixes:
- #15: Strip non-HTTP/non-local markdown image tags to prevent path leakage
- openclaw#16: applyQQBotAccountConfig clears clientSecret when setting clientSecretFile and vice versa
- openclaw#17: getAdminMarkerFile sanitizes accountId to prevent path traversal
- openclaw#18: URGENT_COMMANDS uses exact match instead of startsWith prefix match
- openclaw#19: isCronExpression validates each token starts with a cron-valid character
- openclaw#20: --token format validation rejects malformed input without colon separator
- openclaw#21: resolveDefaultQQBotAccountId checks QQBOT_APP_ID environment variable

* test(qqbot): add focused tests for slash command authorization path

- Unauthorized sender rejected for /bot-logs (requireAuth: true)
- Authorized sender allowed for /bot-logs
- Non-requireAuth commands (/bot-ping, /bot-help, /bot-version) work for all senders
- Unknown slash commands return null (passthrough)
- Non-slash messages return null
- Usage query (/bot-logs ?) also gated by auth check

* fix(qqbot): align global TTS fallback with framework config resolution

- Extract isGlobalTTSAvailable to utils/audio-convert.ts, mirroring core
  resolveTtsConfig logic: check auto !== 'off', fall back to legacy
  enabled boolean, default to off when neither is set.
- Add pre-check in reply-dispatcher before calling globalTextToSpeech to
  avoid unnecessary TTS calls and noisy error logs when TTS is not
  configured.
- Remove inline as any casts; use OpenClawConfig type throughout.
- Refactor handleAudioPayload into flat early-return structure with
  unified send path (plugin TTS → global fallback → send).

* fix(qqbot): break ESM circular dependency causing multi-account startup crash

The bundled gateway chunk had a circular static import on the channel
chunk (gateway -> outbound-deliver -> channel, while channel dynamically
imports gateway). When two accounts start concurrently via Promise.all,
the first dynamic import triggers module graph evaluation; the circular
reference causes api exports (including runDiagnostics) to resolve as
undefined before the module finishes evaluating.

Fix: extract chunkText and TEXT_CHUNK_LIMIT from channel.ts into a new
text-utils.ts leaf module. outbound-deliver.ts now imports from
text-utils.ts, breaking the cycle. channel.ts re-exports for backward
compatibility.

* fix(qqbot): serialize gateway module import to prevent multi-account startup race

When multiple accounts start concurrently via Promise.all, each calls
await import('./gateway.js') independently. Due to ESM circular
dependencies in the bundled output, the first import can resolve
transitive exports as undefined before module evaluation completes.

Fix: cache the dynamic import promise in a module-level variable so all
concurrent startAccount calls share the same import, ensuring the
gateway module is fully evaluated before any account uses it.

* refactor(qqbot): remove startup greeting logic

Remove getStartupGreetingPlan and related startup greeting delivery:
- Delete startup-greeting.ts (greeting plan, marker persistence)
- Delete admin-resolver.ts (admin resolution, greeting dispatch)
- Remove startup greeting calls from gateway READY/RESUMED handlers
- Remove isFirstReadyGlobal flag and adminCtx

* fix(qqbot): skip octal escape decoding for Windows local paths

Windows paths like C:\Users\1\file.txt contain backslash-digit sequences
that were incorrectly matched as octal escape sequences and decoded,
corrupting the file path. Detect Windows local paths (drive letter or UNC
prefix) and skip the octal decoding step for them.

* fix bot issue

* feat: 支持 TTS 自动开关并清理配置中的 clientSecretFile

* docs: 添加 QQBot 配置和消息处理的设计说明

* rebase

* fix(qqbot): align slash-command auth with shared command-auth model

Route requireAuth:true slash commands (e.g. /bot-logs) through the
framework's api.registerCommand() so resolveCommandAuthorization()
applies commands.allowFrom.qqbot precedence and qqbot: prefix
normalization before any handler runs.

- slash-commands.ts: registerCommand() now auto-routes by requireAuth
  into two maps (commands / frameworkCommands); getFrameworkCommands()
  exports the auth-required set for framework registration; bot-help
  lists both maps
- index.ts: registerFull() iterates getFrameworkCommands() and calls
  api.registerCommand() for each; handler derives msgType from ctx.from,
  sends file attachments via sendDocument, supports multi-account via
  ctx.accountId
- gateway.ts (inbound): replace raw allowFrom string comparison with
  qqbotPlugin.config.formatAllowFrom() to strip qqbot: prefix and
  uppercase before matching event.senderId
- gateway.ts (pre-dispatch): remove stale auth computation; commandAuthorized
  is true (requireAuth:true commands never reach matchSlashCommand)
- command-auth.test.ts: add regression tests for qqbot: prefix
  normalization in the inbound commandAuthorized computation
- slash-commands.test.ts: update /bot-logs tests to expect null
  (command routed to framework, not in local registry)

* rebase and solve conflict

* fix(qqbot): preserve mixed env setup credentials

---------

Co-authored-by: yuehuali <[email protected]>
Co-authored-by: walli <[email protected]>
Co-authored-by: WideLee <[email protected]>
Co-authored-by: Frank Yang <[email protected]>
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.