Repository navigation
refactor(plugin-sdk)!: retire unused command-auth, discord, and telegram-account facades - #163366
Conversation
Retire command-auth, discord, and telegram-account with explicit SDK-owner approval on October 2, 2026. Preserve bundled plugin behavior and document the breaking migration for external callers.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed October 2, 2026, 5:07 AM ET / 09:07 UTC (Revision 3). ClawSweeper reviewWhat this changesRemoves three deprecated Plugin SDK import paths, trims orphaned internal exports, moves surviving contract tests, and documents replacement APIs. Merge readiness⛔ Blocked before merge - 2 items remain The owner-approved retirement remains necessary on current main, and no introduced correctness defect was found. The published-consumer audit materially narrows the compatibility concern, but does not establish installed-package loading after fresh installation or host upgrade. Priority: P2 Review scores
Verification
How this fits togetherThe Plugin SDK connects installed plugins to OpenClaw’s shared channel and command capabilities. Package exports determine which SDK imports plugins can resolve before their runtime loads. flowchart TD
A[Installed plugin] --> B[SDK import request]
B --> C[Package export map]
C --> D[Supported focused SDK]
C --> E[Removed legacy path]
D --> F[Shared command or channel owner]
E --> G[Import failure requiring migration]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -753, Tests -426, Docs +42, Config -12, Other -14. Total -1163 across 34 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Complete the approved retirement with focused installed-package loading evidence for fresh and upgraded hosts, retaining the documented caller-adaptation guidance. Do we have a high-confidence way to reproduce the issue? Not applicable: this is an intentional API retirement, and the reviewed diff does not establish an introduced runtime bug. Is this the best way to solve the issue? Yes: removing unused facades and their registrations together preserves one implementation owner, with focused replacements documented; installed-consumer validation remains incomplete. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6000ebd389bf. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Published consumer evidence for the three retired subpathsThis answers the installed-package and upgrade item in the ClawSweeper review. It scans the published npm tarballs (static import strings, no execution) for Every official external plugin, as installs resolve it today: the Older
Those releases already cannot resolve their imports on a current host, so this PR does not newly strand any published official plugin. Fresh installs get the newest compatible version, which is clean. On upgrade, an existing install of a current release keeps loading because it never imported these paths. Third-party plugins outside the catalog that still use these facades must migrate, as the removal timeline and the import-path table document. That is the break the SDK owner approved. |
Landing over inherited reds onlyEvery failing check on head
This PR touches nothing under |
…ram-account facades (openclaw#163366) Retire the public plugin-sdk/command-auth, plugin-sdk/discord, and plugin-sdk/telegram-account subpaths early, with the Plugin SDK owner's approval (2026-10-02). No bundled runtime imports them. No official external plugin at latest or extended-stable imports them either, and the only older @openclaw/discord releases that did (2026.3.7-3.13, 2026.5.2) already import subpaths main removed earlier. Remove the modules, package exports, entrypoint inventory, compat registrations, and obsolete tests. Move the three surviving contract tests to their focused SDK subpaths. Drop 15 internal exports orphaned by the retirement and the dead isCommandMessage and resolveDualTextControlCommandGate wrappers. Shrink the SDK surface budgets by exactly 3 entrypoints, 128 exports, 79 callable exports, and 128 deprecated exports. Breaking change for third-party plugins that import these paths: use channel-ingress-runtime, command-auth-native, command-status, or models-provider-runtime, as described in docs/plugins/sdk-migration/import-paths.md and the removal timeline. Landed over inherited main reds only (Codex model/list sequence tests from openclaw#163320, the memory-host-sdk boundary test fixed by 1663d1f).
Complete the dead-code ownership cleanup after the SDK facade retirement. Keep the command-choice, live-preview, and realtime-liveness definitions and callable signatures while removing only unused source export modifiers and the redundant command context reexport. The retired command-auth subpath was already removed by #163366 with SDK-owner approval; no current SDK entrypoint or named public export changes. Native TypeScript erasure yields identical JavaScript for all three modules. Full deadcode:full, the core typecheck with isolated dependencies, and independent P2 review pass.
Complete the dead-code ownership cleanup after the SDK facade retirement. Keep the command-choice, live-preview, and realtime-liveness definitions and callable signatures while removing only unused source export modifiers and the redundant command context reexport. The retired command-auth subpath was already removed by openclaw#163366 with SDK-owner approval; no current SDK entrypoint or named public export changes. Native TypeScript erasure yields identical JavaScript for all three modules. Full deadcode:full, the core typecheck with isolated dependencies, and independent P2 review pass.
What Problem This Solves
Retires three unused Plugin SDK compatibility facades:
openclaw/plugin-sdk/command-auth,openclaw/plugin-sdk/discord, andopenclaw/plugin-sdk/telegram-account.Why This Change Was Made
Peter Steinberger, the Plugin SDK owner, explicitly approved early removal of these three public subpaths on October 2, 2026. The audit found no bundled runtime imports. Remove their modules, compatibility registrations, package exports, catalog entries, and obsolete tests; keep active shared implementations and the facade loader. Shrink the SDK budgets by exactly 3 entrypoints, 128 exports, 79 callable exports, and 128 deprecated exports.
Three tests in the former command-auth suite protect surviving public contracts: prepared model metadata isolation, the native authorization result, and command-status output. Those cases move to their focused SDK subpaths. The deprecation scanner's diagnostic-order case uses another still-deprecated subpath.
The dependency/export scan exposed 15 internal export sites left unused by the retirement. Remove redundant reexports or make active helpers/types private, and delete the two dead leaf wrappers
isCommandMessageandresolveDualTextControlCommandGate. Keep the active formatting, normalization, and authorization implementations, and retarget existing tests through their surviving APIs. No other public SDK subpath loses an exported name.User Impact
Breaking change: third-party plugins importing any of the three removed subpaths must migrate before loading on a host containing this removal. Owner approval does not certify external migration. No official external plugin at
latestorextended-stableimports these subpaths. The only published@openclaw/discordreleases that do (2026.3.7–3.13 and 2026.5.2) already import subpaths thatmainremoved earlier, so they cannot load today either; see the published-consumer evidence comment. Bundled Discord and Telegram behavior stays unchanged.Use
channel-ingress-runtimefor sender authorization,command-auth-nativefor its matching native command helpers,command-statusfor help builders, andmodels-provider-runtimefor model-provider helpers. Discord and Telegram behavior stays plugin-owned: repository consumers use theirapi.ts/runtime-api.tsbarrels; external plugins use generic channel contracts and injected runtime helpers. Some named exports and facade-specific types require caller adaptation, not a path-only substitution. The migration docs describe those limits; private-local host exports are not replacements.Evidence
Diff: production/tooling +15 / -794 (net -779); tests +134 / -560 (net -426); docs +56 / -14 (net +42).
No bundled runtime imports of the three retired subpaths; every exported name audited against its remaining owner. Active shared implementations and
facade-loader.tsremain intact.pnpm plugin-sdk:sync-exports: generated only the three intended package-export removals.git diff --check: passed.Codex autoreview: scoped-clean at P2, no accepted/actionable findings.
Local single-file fallback checks: deprecation scanner 6/6 passed (2.82 s command wall with one worker); native-command SDK 2/2 passed (48.93 s command wall, 297 ms assertions); command-status SDK 1/1 passed (60.43 s command wall, 3 ms assertions). The latter two retain existing contracts; their cold worker/compiler preparation dominates wall time. No timers or process boots were added to the tests.
Blacksmith Testbox
tbx_01m3xhtt8wdzfmwd0tn8hwavs2, backing run https://github.com/openclaw/openclaw/actions/runs/36969715426:pnpm plugin-sdk:sync-exportsclean (0.14 s);pnpm plugin-sdk:check-exportspassed (0.14 s);pnpm plugin-sdk:surface:checkpassed (5.49 s);pnpm plugins:boundary-reportpassed (2.26 s).pnpm buildpassed (531.84 s).pnpm test:extension discordpassed: 3,301 tests / 277 files (135.36 s).pnpm test:extension telegrampassed: 2,438 tests / 173 files (1,827.42 s).pnpm test src/plugins/contracts/plugin-sdk-subpaths.test.ts --maxWorkers=1: 18/18 passed (29.74 s).pnpm test src/secrets/channel-contract-surface-guardrails.test.ts --maxWorkers=1: 14/14 passed (2.36 s).pnpm test src/plugins/contracts/plugin-sdk-package-contract-guardrails.test.ts --maxWorkers=1: 18/18 passed (22.66 s).Full changed-lanes validation is deferred to PR CI by explicit maintainer instruction. The previous
env OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 node scripts/check-changed.mjsrun was interrupted after 24 passing test-type shards, including Plugin SDK. Its backing Testbox workflow was cancelled; the wrapper returned 255 after 3,984.572 s and the lease had no host. No compiler/test failure was printed. This is partial proof, not a passing full gate.Infrastructure history: Testbox
tbx_01m3xgcfgrz14csnfyvn8qevjdtimed out waiting for a host after 15 minutes;tbx_01m3xhtt8wdzfmwd0tn8hwavs2completed the build/suites above before its workflow cancellation. Both leases were stopped. A preliminary capsule attempt stopped because editing overlapped source freezing and ran no tests.Main was merged at
b56164e4067c0a931fedb4faa2170d78b220f88dafter its MCP SDK dependency patch changedpackage.json; the original facade-removal patch merged unchanged, with the bounded export cleanup added afterward. Earlier build and suite evidence above belongs to the pre-merge candidate26e1400390e6d3637d6050f0d2a9ae10c97c4afb.Before the CI refresh below, the retirement/export cleanup was validated on the single fresh Blacksmith Testbox
tbx_01m3xpy5rnkkcagpvh6ec91p9t, backing run https://github.com/openclaw/openclaw/actions/runs/36976803864. The tested source tree is8c67f7189c28ab0f507e0f465a2ed9090295a485. All required remaining gates passed, and the lease was stopped. Results below are wrapper-command exit statuses recorded before lease cleanup:pnpm plugin-sdk:sync-exports: clean after merging main (0.18 s).pnpm plugin-sdk:check-exports: passed on the retirement/export cleanup (0.17 s).pnpm plugin-sdk:surface:check: passed on the retirement/export cleanup (6.49 s).pnpm check:architecture: passed (164.48 s).pnpm deadcode:dependencies: passed both Knip scans (112.26 s).pnpm deadcode:unused-files: passed production and full-tree scans with zero entries (68.04 s).pnpm test src/auto-reply/commands-registry.test.ts --maxWorkers=1: 42/42 passed (23.64 s).pnpm test src/channels/command-gating.test.ts --maxWorkers=1: 9/9 passed (1.55 s).The first dependency/export scan on this lease failed on the orphaned internal exports described above. Those findings were fixed without suppressions or baseline growth, then the focused tests, SDK checks, and all three remaining gates passed. Fresh Codex autoreview of the complete final diff was scoped-clean at P2.
PR CI is not awaited, per maintainer instruction.
CI refresh after main fixes: merged
0f470aecdc1208c34df6f233371ff1d6e7484d25, includingd81a2d8b7294(duplicate prepared-model logger property) and the command-custody type-cycle fix, in merge commit782996fd272cba5e80dfa4cad3603b4135063728. The PR patch is unchanged, and no new imports of the three retired SDK subpaths were found.The merged tree was checked on Blacksmith Testbox
tbx_01m3xv25dm3b0znz1fm6smygn6(backing run). The tested source treea2eb5ddb1a54d13af2748fafefd44848fbfa4e8cmatches the merge commit:pnpm plugin-sdk:sync-exports: passed and clean; all generated export files unchanged (0.19 s).pnpm plugin-sdk:check-exports: passed (0.19 s).pnpm plugin-sdk:surface:check: passed (7.23 s).pnpm check:architecture: passed; runtime and Madge cycle checks both reported zero cycles (169.93 s).node scripts/run-vitest.mjs extensions/codex/src/app-server/run-attempt-thread-cleanup.test.ts: 8 failed, 7 passed (91.93 s), reproducing the additionalmodel/listrequest in the request-sequence assertions from CI job110749981855. No Codex test or runtime fixes were made in this PR, as requested.The nonzero validation batch result above is the Codex test failure; the four requested repository checks passed. The Testbox was stopped, the fresh P2 review was scoped-clean, and the branch was pushed normally. No auto-merge or PR merge was requested; new PR CI is not awaited.
Release-note context: Plugin SDK: removed the deprecated
command-auth,discord, andtelegram-accountsubpaths; migrate to channel ingress, focused native-command/status/model-provider SDK helpers, and generic channel contracts or plugin-owned APIs as appropriate.