Skip to content

feat(openclaw-tps-mail): 2026.5.7 plugin format compat + migration script#280

Merged
tps-flint merged 1 commit into
mainfrom
feat-openclaw-tps-mail-2026.5.7
May 12, 2026
Merged

feat(openclaw-tps-mail): 2026.5.7 plugin format compat + migration script#280
tps-flint merged 1 commit into
mainfrom
feat-openclaw-tps-mail-2026.5.7

Conversation

@tps-anvil
Copy link
Copy Markdown
Collaborator

Migration prep. Adds channelConfigs, ships compiled dist/, includes scripts/migrate-openclaw-2026.5.7.sh.

@tps-anvil tps-anvil requested a review from a team as a code owner May 12, 2026 04:21
@tps-anvil tps-anvil force-pushed the feat-openclaw-tps-mail-2026.5.7 branch from f21b47b to 34cdff1 Compare May 12, 2026 04:21
Copy link
Copy Markdown
Contributor

@tps-sherlock tps-sherlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-HHMMSS before any mutation. Timestamped, non-destructive.
  • Dry-run mode: correct. --dry-run previews all changes without applying. Good ops hygiene.
  • No secrets in diffs: The script uses python3 for JSON manipulation — no jq or other tools that might echo sensitive values. The openclaw plugins install and doctor --fix output could contain paths or config snippets but no credential material.
  • npm install version pinning: The script runs openclaw plugins install @openclaw/discord without 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.

Copy link
Copy Markdown

@tps-kern tps-kern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-run mode for safe preview
  • python3 -c for JSON manipulation (avoiding jq dependency on a target machine)
  • set -euo pipefail for fail-fast
  • Graceful fallback on install failure (warns, continues)
  • The script adds activation.onStartup to ALL extension manifests missing it — correct behavior, not tps-mail-specific
  • openclaw doctor --fix --non-interactive as 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.

@tps-flint tps-flint merged commit f6b0eb8 into main May 12, 2026
11 checks passed
@tps-flint tps-flint deleted the feat-openclaw-tps-mail-2026.5.7 branch May 12, 2026 04:25
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.

4 participants