Skip to content

feat(plugins): inbound IMAP email trigger - #130230

Merged
steipete merged 8 commits into
mainfrom
steipete/mystifying-matsumoto-e9c67b
Aug 26, 2026
Merged

steipete merged 8 commits into
mainfrom
steipete/mystifying-matsumoto-e9c67b

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

OpenClaw's inbound-email trigger story was Gmail-only: Google Pub/Sub → the external gog binary → the generic /hooks endpoint → an isolated hook agent session. A non-Gmail mailbox (Outlook, Fastmail, iCloud, any generic IMAP) could not trigger OpenClaw at all — the bundled himalaya skill only lets an agent act on IMAP when explicitly asked; nothing watches.

This adds an inbound IMAP trigger that feeds the same isolated, tool-clamped hook-session model the Gmail flow documents, with no Google Cloud, no Tailscale Funnel, and no public HTTP endpoint.

This revisits #33199 (previously closed not-planned, routed to community plugins). That close asserted "no OpenClaw core API change is required," but a source audit found otherwise: the seams it cited (runEmbeddedAgent, subagent.run, system events) all bypass the external-content wrapping, suspicious-pattern detection, and hook-admission containment that make the Gmail flow safe. A pure-SDK plugin would therefore ship untrusted email without Gmail-grade containment, or reimplement core security policy in a plugin. This PR closes that gap with one small shared core seam and ships the trigger as a bundled, off-by-default plugin — the distribution/ownership decision called for in #99084.

Why This Change Was Made

Automation, not a channel: an email trigger has no pairing, threading grammar, or outbound message adapter (the channel boundary), so like Gmail it is one-way ingestion of untrusted external content into isolated agent runs. docs/automation/hooks.md forbids a long-lived watcher living in a hook handler, so the watcher is a gateway-lifecycle plugin service.

Two pieces:

  1. Core seam (feat(plugin-sdk): add in-process hook agent dispatch seam): extracts the post-HTTP core of the Gmail hook dispatcher into one lifecycle-owned createGatewayHookDispatcher, shared by the HTTP endpoint and a new trusted-plugins-only api.runtime.hooks.dispatchHookAgentTurn. Isolation and email-class external-content wrapping are hard-coded (no allowUnsafeExternalContent on the seam); the plugin identity is host-bound into a new gateway.hooks.plugin ingress boundary; it requires no hooks.enabled.

  2. Plugin (extensions/imap): a twin-driver watcher (IMAP IDLE with polling fallback, wakeup-≠-fetch cursor sweeps), a layered sender gate (mandatory allowlist → client-side DKIM/DMARC verification via mailauth → trusted-Authentication-Results fallback opt-in → per-sender plus-address tokens), and durable cursor/dedupe state in plugin keyed stores (shared state DB; no new tables, no schema bump, no files).

User Impact

  • New bundled plugin imap, disabled by default. Operators opt in under plugins.entries.imap.config with a clamped mail_reader reader agent (minimal tool profile, session-scoped sandbox, workspaceAccess: none), documented in docs/automation/imap.md.
  • Credentials are SecretRefs with per-account degraded-owner isolation (a bad password degrades one account, not gateway startup).
  • No change to any existing flow; the Gmail path is untouched. The new core seam is additive and trusted-plugins-only.
  • Sender gate is safe by default: senderAuth.min: "verified" requires an aligned DKIM/DMARC pass verified client-side; SPF-only, untrusted Authentication-Results, and no-auth senders are rejected with recorded skips unless the operator explicitly relaxes the threshold or configures a sender-bound token.

Evidence

  • Autoreview: clean, no P0/actionable findings (Codex gpt-5.6-sol, high).
  • Build: pnpm build green; bundled plugin present at dist/extensions/imap/index.js. Only pre-existing Control UI INEFFECTIVE_DYNAMIC_IMPORT warnings (verified present at base).
  • Checks: pnpm check:changed green (typecheck, lint, architecture, coercion/import-cycle guards, plugin-sdk:surface:check); pnpm docs:check-config-examples green including the IMAP page's config fence.
  • Unit + boundary tests: seam parity/trust-gate/failure-taxonomy coverage; plugin allowlist (incl. display-name spoofing, multi-From), strength mapping, token binding, cursor/UIDVALIDITY transitions, claim dedupe, msgid ring, N:* ghost filter; a scripted in-process IMAP server driving the real connection manager through connect→IDLE→sweep→dispatch with fault injection (mid-IDLE disconnect, no-IDLE fallback, auth-failure escalation, UIDVALIDITY rotation). The sweep-coalesce regression test fails on pre-fix code.
  • Live proof (recorded): the real compiled watcher driven against a real GreenMail 2.1.5 IMAP service over real imapflow, with the real mailauth gate verifying DKIM/DMARC against live public DNS. A genuine DKIM-aligned github.com message → verified → dispatched; a body-tampered copy → rejected; a forged-From no-signature message → dmarc-fail rejected; an allowlisted sender + valid address token → dispatched. Confirmed live: the gate omits trustReceived and disables ARC, so a post-delivery message whose DKIM was mangled in transit correctly fails to reach verified rather than riding a spurious SPF/ARC pass.

Production LOC: +1,124 net (core +210, mostly code motion from the extracted dispatcher; plugin +914). Tests +1,018, docs +176, manifest/package +130, lockfile +373.

Known follow-ups (named, not blockers): XOAUTH2 for Microsoft 365; ARC-override for forwarded mail; adopting the RFC 51 sender-auth-strength primitive (#124218) once its SDK contract lands; a live-gateway zero-tool-escape acceptance run and keyed-store persistence across a real restart.

@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 26, 2026 16:47
@steipete
steipete requested a review from a team as a code owner August 26, 2026 16:47
@steipete steipete closed this Aug 26, 2026
@steipete steipete reopened this Aug 26, 2026
@steipete
steipete marked this pull request as draft August 26, 2026 16:54
@steipete
steipete marked this pull request as ready for review August 26, 2026 16:54
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Aug 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • extensions/imap/package.json
  • pnpm-lock.yaml

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfiles or workspace dependency policy changes are present.
  • Treat pnpm-lock.yaml and package-lock.json diffs as dependency security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@github-actions

github-actions Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Dependency graph changes noted

This PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin, a member of @openclaw/openclaw-secops, or an OpenClaw organization member with Maintain or Admin repository access.

  • Current SHA: 0795b4764ff44f145d29a20270aae589a2e76171
  • Trusted actor: @steipete
  • Trusted role: pull request author; openclaw-secops

Security review is still recommended before merge when the dependency graph change is intentional.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime plugin: file-transfer size: XL maintainer Maintainer-authored PR labels Aug 26, 2026
Post-rebase drift made resolveBoundGatewayContext possibly-undefined; the
plugin hook dispatch path invoked it unconditionally. Use the optional-call
guard consistent with sibling runtime accessors.
mailparser 3.9.15 pinned [email protected] -> [email protected] (GHSA
HIGH, stack exhaustion, <8.0.0). 3.9.16 pins [email protected] ->
[email protected], clearing the production audit gate.
@steipete
steipete marked this pull request as draft August 26, 2026 17:22
@steipete
steipete marked this pull request as ready for review August 26, 2026 17:22
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 26, 2026, 3:05 PM ET / 19:05 UTC.

ClawSweeper review

What this changes

Adds an off-by-default bundled IMAP mailbox watcher and a trusted-plugin Gateway API for dispatching authenticated inbound email into isolated hook-agent sessions.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 10 items remain

Keep this PR open: its new trusted-plugin hook API lets a retired plugin instance still dispatch an untrusted-email agent run. The existing proof request also remains unmet because the stated live watcher evidence does not show permitted and stale/denied authority through a real Gateway final effect.

Priority: P2
Reviewed head: 0795b4764ff44f145d29a20270aae589a2e76171
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) A concrete lifecycle-authority flaw reaches agent execution, and the required final-effect proof is not available.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: Authority-chain proof required: the supplied body describes a watcher and sender-gate run, but no available artifact proves both an allowed dispatch and a stale/retired plugin rejection through a real Gateway final agent/tool outcome. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🧂 unranked krab (1/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: Authority-chain proof required: the supplied body describes a watcher and sender-gate run, but no available artifact proves both an allowed dispatch and a stale/retired plugin rejection through a real Gateway final agent/tool outcome. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Current-main baseline: Current main has neither the IMAP plugin nor the new email hook source type, so it does not already implement this PR’s central behavior.
Stale plugin authority reaches hook dispatch: The new hooks facade checks only bundled/trusted-install origin and then forwards under a string plugin identity; it does not require an active record or lifecycle epoch.
Existing lifecycle owner proves the missing invariant: The adjacent channel path checks active record, loaded status, registry retirement, and lifecycle epoch; revocation removes the active record and epoch while retaining the record lookup.
Findings 1 actionable finding [P1] Revalidate hook authority after plugin retirement
Security Needs attention Retired plugin runtime retains hook-dispatch authority: The hook facade does not revalidate active record membership, registry retirement, or lifecycle epoch before forwarding a privileged external-content dispatch.

How this fits together

The IMAP plugin watches configured mailboxes and passes accepted messages through the Gateway hook dispatcher. That dispatcher creates isolated agent runs, wraps external email content, and optionally reports completion through the existing hook delivery path.

flowchart LR
A[IMAP mailbox] --> B[IMAP watcher plugin]
B --> C[Sender authentication gate]
C -->|accepted email| D[Trusted plugin hook API]
C -->|rejected email| E[Recorded skip]
D --> F[Gateway hook dispatcher]
F --> G[Isolated agent run]
G --> H[Optional completion notice]
Loading

Decision needed

Question Recommendation
Should OpenClaw retain a bundled IMAP trigger and the new trusted-official-plugin hook-dispatch API after the lifecycle-authority repair? Retain the narrow API after repair: Keep the bundled trigger and generic email-only API, but require lifecycle-bound authority and final-effect proof before merge.

Why: The PR creates a public, compatibility-sensitive plugin runtime capability rather than only repairing existing behavior; the closed earlier IMAP request and this PR’s differing core-seam rationale do not establish current maintainer sponsorship.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: Authority-chain proof required: the supplied body describes a watcher and sender-gate run, but no available artifact proves both an allowed dispatch and a stale/retired plugin rejection through a real Gateway final agent/tool outcome. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Revalidate hook authority after plugin retirement (P1) - assertTrustedPluginRuntime accepts any record with a trusted origin, even after revokePluginRuntimeRecord removes that record from the active set and revokes its lifecycle epoch. A retained watcher can finish awaited parsing/authentication and call this facade, which then reaches the queued isolated agent runner; require the exact active record/epoch at invocation and immediately before final execution.
  • Resolve security concern: Retired plugin runtime retains hook-dispatch authority - The hook facade does not revalidate active record membership, registry retirement, or lifecycle epoch before forwarding a privileged external-content dispatch.
  • Resolve merge risk (P1) - The documented plugin runtime method is a compatibility-sensitive SDK surface; maintainers must decide whether its trusted-official-plugin contract is the intended permanent API.
  • Resolve merge risk (P1) - The direct IMAP and mail-auth dependency contracts could not be independently inspected in this read-only environment because packages are absent and remote DNS is unavailable.
  • Complete next step (P2) - A concrete security-boundary repair is needed, followed by maintainer direction on the new trusted-plugin API and bundled distribution.
  • Improve patch quality - Bind hook dispatch to the exact active record and lifecycle epoch, including a check immediately before runner entry.
  • Improve patch quality - Add revocation-while-queued and IMAP-stop-during-auth regressions.
  • Improve patch quality - Post redacted real-Gateway evidence for allowed dispatch and rejected stale authority before final agent/tool I/O.

Findings

  • [P1] Revalidate hook authority after plugin retirement — src/plugins/registry-runtime.ts:825-827
  • [high] Retired plugin runtime retains hook-dispatch authority — src/plugins/registry-runtime.ts:825
Agent review details

Security

Needs attention: The new trusted-plugin ingress can outlive plugin lifecycle revocation and trigger a final untrusted-email agent run.

PR surface

Source +1314, Tests +945, Docs +185, Config +24, Other +373. Total +2841 across 41 files.

View PR surface stats
Area Files Added Removed Net
Source 22 1365 51 +1314
Tests 9 962 17 +945
Docs 7 185 0 +185
Config 2 24 0 +24
Generated 0 0 0 0
Other 1 382 9 +373
Total 41 2918 77 +2841

Review metrics

Metric Value Why it matters
Production versus test delta production +1,124; tests +1,018; docs +176 The new email-to-agent execution surface is substantial; its production growth is tied to a new plugin and Gateway ownership boundary.
Plugin runtime API 1 added method The new documented hooks dispatch method creates a compatibility-sensitive contract for bundled and trusted official plugins.

Stored data model

Persistent data-model change detected: serialized state: extensions/imap/src/config.ts, serialized state: extensions/imap/src/state.test.ts, serialized state: extensions/imap/src/state.ts, serialized state: src/config/sessions/session-accessor.sqlite-provenance.ts, serialized state: src/config/sessions/session-accessor.test.ts, unknown-data-model-change: extensions/imap/src/state.test.ts, and 1 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Fence retired plugin dispatch (recommended)
    Bind the hook capability to the exact active plugin record and revalidate it after queued or awaited work before the isolated runner starts.
  2. Pause the new API
    Pause this PR if maintainers do not want a permanent trusted-official-plugin hook-dispatch contract.

Technical review

Best possible solution:

Bind hook dispatch to an exact live plugin record and lifecycle epoch, revalidate immediately before agent execution, then prove accepted and revoked paths through the real Gateway without granting the email run unrestricted tools.

Do we have a high-confidence way to reproduce the issue?

No executed current-head reproduction was possible in this read-only checkout, but source establishes a high-confidence stale-authority path: a retained plugin runtime can dispatch after its active record and lifecycle epoch are revoked.

Is this the best way to solve the issue?

No. The hook API must carry live plugin-record authority through the queued execution boundary instead of authorizing solely from a retained plugin ID and origin.

Full review comments:

  • [P1] Revalidate hook authority after plugin retirement — src/plugins/registry-runtime.ts:825-827
    assertTrustedPluginRuntime accepts any record with a trusted origin, even after revokePluginRuntimeRecord removes that record from the active set and revokes its lifecycle epoch. A retained watcher can finish awaited parsing/authentication and call this facade, which then reaches the queued isolated agent runner; require the exact active record/epoch at invocation and immediately before final execution.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 21df0f36a483.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦪 silver shellfish and patch quality is 🧂 unranked krab.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.

Label justifications:

  • P2: This optional feature is off by default, but its new Gateway execution boundary needs normal-priority maintainer and security review.
  • merge-risk: 🚨 compatibility: The PR documents and exposes a new trusted-plugin runtime API plus a new persisted plugin configuration surface.
  • merge-risk: 🚨 security-boundary: A stale trusted-plugin runtime can currently dispatch untrusted email into a final agent execution path after its lifecycle authority is revoked.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦪 silver shellfish and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Authority-chain proof required: the supplied body describes a watcher and sender-gate run, but no available artifact proves both an allowed dispatch and a stale/retired plugin rejection through a real Gateway final agent/tool outcome. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

Security concerns:

  • [high] Retired plugin runtime retains hook-dispatch authority — src/plugins/registry-runtime.ts:825
    The hook facade does not revalidate active record membership, registry retirement, or lifecycle epoch before forwarding a privileged external-content dispatch.
    Confidence: 0.96

What I checked:

  • Current-main baseline: Current main has neither the IMAP plugin nor the new email hook source type, so it does not already implement this PR’s central behavior. (src/security/external-content-source.ts:5, 21df0f36a483)
  • Stale plugin authority reaches hook dispatch: The new hooks facade checks only bundled/trusted-install origin and then forwards under a string plugin identity; it does not require an active record or lifecycle epoch. (src/plugins/registry-runtime.ts:825, 0795b4764ff4)
  • Existing lifecycle owner proves the missing invariant: The adjacent channel path checks active record, loaded status, registry retirement, and lifecycle epoch; revocation removes the active record and epoch while retaining the record lookup. (src/plugins/registry-runtime.ts:1020, 0795b4764ff4)
  • Reachable final effect: An IMAP watcher retains its runtime while asynchronous message parsing and authentication proceed, then invokes the new hook API; the dispatcher later queues and starts the isolated agent runner. (extensions/imap/src/watcher.ts:328, 0795b4764ff4)
  • Proof and dependency limitation: The supplied watcher, dispatcher, and runtime tests mock their downstream boundary; no attached artifact was available for a real Gateway authority result. Direct dependency source/types were unavailable because node_modules is absent and network DNS failed. (src/plugins/registry-runtime.hooks.test.ts:44, 0795b4764ff4)

Likely related people:

  • steipete: Current PR-head implementation is attributed to Peter Steinberger, and local history shows repeated recent work on Gateway hooks and plugin-runtime ownership. (role: recent Gateway and plugin-runtime contributor; confidence: high; commits: 0795b4764ff4, d17bbfc31a8f, 2cd87d3d27c1; files: src/gateway/server/hooks.ts, src/plugins/registry-runtime.ts, extensions/imap/src/watcher.ts)
  • joshavant: Recent history includes the active lifecycle/audit model that the existing channel boundary uses to invalidate stale closures. (role: adjacent lifecycle and audit contributor; confidence: medium; commits: 97a53a9b35a8, 73a9eed95ba2; files: src/plugins/registry-lifecycle.ts, src/plugins/registry-runtime.channel-ingress.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-26T17:35:45.738Z sha 050575a :: needs real behavior proof before merge. :: none

…s under max-lines

The dispatchHookAgentTurn seam pushed server-plugins.ts to 702 effective lines
(cap 700). Extract createGatewayHooksRuntime into the sibling runtime-helpers
module, mirroring createGatewayNodesRuntime/createGatewaySubagentRuntime; no
suppression added.
@clawsweeper clawsweeper Bot removed the rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. label Aug 26, 2026
@steipete
steipete merged commit 87b5645 into main Aug 26, 2026
204 checks passed
@steipete
steipete deleted the steipete/mystifying-matsumoto-e9c67b branch August 26, 2026 19:24
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Aug 26, 2026
The bundled imap plugin landed in #130230 without regenerating the plugin
inventory docs, so pnpm plugins:inventory:check failed on main and the plugin
was absent from the reference index. Regenerate, and register its operator
guide in PLUGIN_DOC_ALIASES so the generated reference page links to
/automation/imap (same mechanism codex and firecrawl use).
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
* feat(plugin-sdk): add in-process hook agent dispatch seam

* feat(plugins): add imap inbound email trigger plugin

* fix(imap): coalesce sweep wakeups and drop test-only gate exports

* docs(imap): fix agents bindings command invocation

* fix(gateway): guard optional bound context in plugin hook dispatch

Post-rebase drift made resolveBoundGatewayContext possibly-undefined; the
plugin hook dispatch path invoked it unconditionally. Use the optional-call
guard consistent with sibling runtime accessors.

* fix(imap): bump mailparser to 3.9.16 off vulnerable deepmerge-ts

mailparser 3.9.15 pinned [email protected] -> [email protected] (GHSA
HIGH, stack exhaustion, <8.0.0). 3.9.16 pins [email protected] ->
[email protected], clearing the production audit gate.

* refactor(gateway): extract plugin hooks runtime to keep server-plugins under max-lines

The dispatchHookAgentTurn seam pushed server-plugins.ts to 702 effective lines
(cap 700). Extract createGatewayHooksRuntime into the sibling runtime-helpers
module, mirroring createGatewayNodesRuntime/createGatewaySubagentRuntime; no
suppression added.

* docs(secrets): register imap plugin password in secretref credential matrix

The bundled imap plugin declares a secretInput (accounts.*.password); regenerate
the user-supplied credentials matrix and surface list so the target-registry docs
sync test stays green.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
…130363)

The bundled imap plugin landed in openclaw#130230 without regenerating the plugin
inventory docs, so pnpm plugins:inventory:check failed on main and the plugin
was absent from the reference index. Regenerate, and register its operator
guide in PLUGIN_DOC_ALIASES so the generated reference page links to
/automation/imap (same mechanism codex and firecrawl use).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. plugin: file-transfer rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant