feat(openclaw-tps-mail): 2026.5.7 plugin format compat + migration script#280
Conversation
…; migration script
f21b47b to
34cdff1
Compare
tps-sherlock
left a comment
There was a problem hiding this comment.
Security review: LGTM.
minGatewayVersion concern: not present. This PR declares pluginApi: ">=2026.5.7" but NOT minGatewayVersion. The pluginApi compat gate is the correct way to declare feature requirements — the gateway checks whether it supports the requested plugin API version. This is the intended behavior for a plugin using 2026.5.7 features.
Migration script review:
- Backup: correct. Creates
~/.openclaw/openclaw.json.bak-YYYYMMDD-HHMMSSbefore any mutation. Timestamped, non-destructive. - Dry-run mode: correct.
--dry-runpreviews all changes without applying. Good ops hygiene. - No secrets in diffs: The script uses python3 for JSON manipulation — no
jqor other tools that might echo sensitive values. Theopenclaw plugins installanddoctor --fixoutput could contain paths or config snippets but no credential material. - npm install version pinning: The script runs
openclaw plugins install @openclaw/discordwithout a version pin — floating latest. This is standard for openclaw plugin management (the CLI resolves from its configured registry). If deterministic installs are needed, a version pin (@openclaw/discord@x.y.z) would be stronger, but this is acceptable for a migration script that targets "latest compatible." - Error handling:
set -euo pipefail, graceful fallbacks on install failure (warns but continues), doctor non-interactive mode.
ChannelConfigs schema: Matches the expected structure — enabled (boolean) + accounts (object). The schema is permissive on accounts contents (no nested property constraints), which is correct since account configs vary by channel. The mailDir UI hint is present.
Build config: tsconfig emits to dist/ with declaration + sourceMap. prepublishOnly runs clean + build. Correct.
Approve.
tps-kern
left a comment
There was a problem hiding this comment.
Architecture Review: APPROVE
minGatewayVersion: correctly absent
Unlike flair#395, this PR only declares pluginApi: ">=2026.5.7" — no minGatewayVersion field. The pluginApi declaration is a feature-requirement signal, not a hard version gate at the local loader. Safe on the current 2026.4.24 gateway.
channelConfigs schema: matches production
Verified against rockit's running ~/.openclaw/openclaw.json:
channels.tps-mail: {
"enabled": true,
"accounts": {
"default": {
"mailDir": "/Users/squeued/.tps/mail"
}
}
}The schema declares enabled (boolean) + accounts (object) — exactly the shape of the running config. The accounts schema is intentionally permissive (no nested additionalProperties: false), which is correct: account sub-configs vary by channel plugin and should be validated by the plugin's runtime, not the manifest schema.
The mailDir UI hint (placeholder: "~/.tps/mail") is accurate.
Migration script: well-structured
- Backup before mutation (
timestamped→ non-destructive) --dry-runmode for safe previewpython3 -cfor JSON manipulation (avoidingjqdependency on a target machine)set -euo pipefailfor fail-fast- Graceful fallback on install failure (warns, continues)
- The script adds
activation.onStartupto ALL extension manifests missing it — correct behavior, not tps-mail-specific openclaw doctor --fix --non-interactiveas the final auto-migration step — correct ordering (manifest fixes before doctor, not after)
One minor observation: openclaw plugins install @openclaw/discord floats to latest — this is the CLI's standard behavior, but if you want deterministic upgrades, a version pin would be stronger. Not a blocker.
build configuration: correct
tsconfig.json now emits to dist/ with declarations + source maps. prepublishOnly runs clean + build. package.json main/exports point to compiled JS. Matches the pattern established in flair#395.
Verdict
Approved. Schema matches production, migration script is ops-grade, no minGatewayVersion lock-out.
Migration prep. Adds channelConfigs, ships compiled dist/, includes scripts/migrate-openclaw-2026.5.7.sh.