refactor(channels): shrink ChannelSetupInput to a generic envelope with a deprecated compatibility tier#112319
Conversation
9e542f6 to
e172129
Compare
e75396c to
202574f
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: refactor(channels): shrink ChannelSetupInput to a generic envelope with a deprecated compatibility tier This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
202574f to
fd9223c
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: refactor(channels): shrink ChannelSetupInput to a generic envelope with a deprecated compatibility tier This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
…ith a deprecated compatibility tier
… an index signature
fd9223c to
8391097
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: refactor(channels): shrink ChannelSetupInput to a generic envelope with a deprecated compatibility tier This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Merged via squash.
|
…th a deprecated compatibility tier (openclaw#112319) * refactor(channels)!: shrink ChannelSetupInput to a generic envelope with a deprecated compatibility tier * fix(channels): keep ChannelSetupInput structurally assignable without an index signature * docs: regenerate docs map
What Problem This Solves
Part 3 (final) of #112238 — the type Jesse's original observation was about.
ChannelSetupInputin core was a ~50-field union of every channel's setup vocabulary (botToken,signalNumber,homeserver,ship,cliPath, ...), exported as public SDK surface. Core declared every channel's fields; plugins read their own off the shared bag.Why This Change Was Made
Per the SDK migration policy (new contract → deprecation window → removal at major):
ChannelSetupInputis nowChannelSetupEnvelope & DeprecatedChannelSetupFields. The envelope keeps the genuinely cross-channel fields (name,token,tokenFile,useEnv,allowFrom,defaultTo); all 43 channel-owned fields move to a clearly-bounded deprecated tier with identical value types and per-field@deprecatedJSDoc pointing at the plugin-local pattern and the removal milestone (next Plugin SDK major).SlackSetupInput,MatrixSetupInput, ...); a compatibility-off compile proof (deprecated tier temporarily disconnected, full core+extensions typecheck lanes green) shows in-repo code no longer touches the tier — it exists purely for third parties.Record<string, unknown>; review showed that breaks interface assignability and was never needed — withdrawn).expectTypeOf+ interface-assignability guard) locks the contract, deliberately covering the API-baseline blind spot: the baseline renders re-exported type aliases by name and produced byte-identical hashes across this change, so the fixture is the field-level guard.docs/plugins/sdk-migration.mdrecords the deprecation and removal window;docs/plugins/sdk-setup.mddocuments the envelope + plugin-local pattern.Third-party impact verified by tarball inspection of all four published out-of-tree plugins (WeCom, Yuanbao, Weixin, Zalo ClawBot): zero runtime impact (compiled dist), zero rebuild break (deprecated tier + preserved assignability).
User Impact
None at runtime. Plugin authors get deprecation guidance in their IDE and a documented migration pattern; the actual field removal is reserved for the next SDK major.
Evidence
tsgo:core+tsgo:extensionsgreen with the deprecated tier disconnected (Blacksmith run 29837400152), tier restored after; final full type lanes green (core, core:test, extensions, extensions:test — rerun locally after the assignability correction during a Blacksmith outage, noted as the sanctioned fallback).