Skip to content

refactor(plugins): route iMessage runtime through plugin sdk#51770

Merged
scoootscooob merged 1 commit into
openclaw:mainfrom
scoootscooob:codex/imessage-runtime-plugin-sdk
Mar 21, 2026
Merged

refactor(plugins): route iMessage runtime through plugin sdk#51770
scoootscooob merged 1 commit into
openclaw:mainfrom
scoootscooob:codex/imessage-runtime-plugin-sdk

Conversation

@scoootscooob

Copy link
Copy Markdown
Contributor

Summary

  • route src/plugins/runtime/runtime-imessage.ts through src/plugin-sdk/imessage.ts
  • remove the stale iMessage entry from the plugin-extension import boundary inventory
  • reduce the remaining grandfathered direct imports from 4 to 3

Testing

  • pnpm lint:plugins:no-extension-imports
  • pnpm test -- src/plugin-sdk/runtime-api-guardrails.test.ts
  • pnpm test -- extensions/imessage/src/channel.outbound.test.ts extensions/imessage/src/probe.test.ts
  • node --import tsx - <<'EON'
    import { createRuntimeIMessage } from './src/plugins/runtime/runtime-imessage.ts';
    const runtime = createRuntimeIMessage();
    console.log(JSON.stringify({
    hasMonitor: typeof runtime.monitorIMessageProvider === 'function',
    hasProbe: typeof runtime.probeIMessage === 'function',
    hasSend: typeof runtime.sendMessageIMessage === 'function'
    }, null, 2));
    EON

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Mar 21, 2026
@greptile-apps

greptile-apps Bot commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR routes two plugin runtime files (runtime-imessage.ts and runtime-slack-ops.runtime.ts) through their respective plugin-SDK façades instead of importing directly from extension-owned runtime-api.js files. Both src/plugin-sdk/imessage.ts and src/plugin-sdk/slack.ts already re-export all the necessary symbols, so this is a pure import-path refactor with no behavioral change.

Key points:

  • runtime-imessage.ts: import swapped from extensions/imessage/runtime-api.jsplugin-sdk/imessage.js; all three symbols (monitorIMessageProvider, probeIMessage, sendMessageIMessage) are verified present in the SDK re-export.
  • runtime-slack-ops.runtime.ts: import swapped from extensions/slack/runtime-api.jsplugin-sdk/slack.js; all eight aliased symbols are confirmed in the SDK re-export.
  • Inventory fixture: two resolved grandfathered entries removed, leaving 3 Telegram entries still to migrate.
  • Minor: the PR description says "reduce from 4 to 3" but two entries are removed (5 → 3), and only the iMessage removal is called out in the description text, even though the Slack routing also happens here.

Confidence Score: 5/5

  • Safe to merge — purely a refactor of import paths with no logic changes and all required symbols verified in place.
  • All three changed symbols in the iMessage SDK re-export and all eight aliased symbols in the Slack SDK re-export are confirmed correct. The inventory is updated consistently with the code. The only issue is a minor count discrepancy in the PR description (5→3, not 4→3) which has no bearing on correctness.
  • No files require special attention.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: test/fixtures/plugin-extension-import-boundary-inventory.json
Line: 1-3

Comment:
**Inventory count discrepancy with PR description**

The PR description states "reduce the remaining grandfathered direct imports from 4 to 3", but this diff removes **two** entries (both `runtime-imessage.ts` and `runtime-slack-ops.runtime.ts`) from a previous total of 5, bringing the count to 3 — a reduction of 2, not 1. The description also only calls out removing "the stale iMessage entry", while the Slack entry is removed here as well.

The code changes themselves are correct and consistent (both files now import through the plugin SDK, and both entries are rightfully removed). The mismatch is just in the PR description's accounting, which may be confusing to future readers of the inventory's git history.

How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: "refactor: route iMes..."

Comment on lines 1 to 3
[
{
"file": "src/plugins/runtime/runtime-imessage.ts",
"line": 5,
"kind": "import",
"specifier": "../../../extensions/imessage/runtime-api.js",
"resolvedPath": "extensions/imessage/runtime-api.js",
"reason": "imports extension-owned file from src/plugins"
},
{
"file": "src/plugins/runtime/runtime-slack-ops.runtime.ts",
"line": 10,
"kind": "import",
"specifier": "../../../extensions/slack/runtime-api.js",
"resolvedPath": "extensions/slack/runtime-api.js",
"reason": "imports extension-owned file from src/plugins"
},
{
"file": "src/plugins/runtime/runtime-telegram-ops.runtime.ts",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Inventory count discrepancy with PR description

The PR description states "reduce the remaining grandfathered direct imports from 4 to 3", but this diff removes two entries (both runtime-imessage.ts and runtime-slack-ops.runtime.ts) from a previous total of 5, bringing the count to 3 — a reduction of 2, not 1. The description also only calls out removing "the stale iMessage entry", while the Slack entry is removed here as well.

The code changes themselves are correct and consistent (both files now import through the plugin SDK, and both entries are rightfully removed). The mismatch is just in the PR description's accounting, which may be confusing to future readers of the inventory's git history.

Prompt To Fix With AI
This is a comment left during a code review.
Path: test/fixtures/plugin-extension-import-boundary-inventory.json
Line: 1-3

Comment:
**Inventory count discrepancy with PR description**

The PR description states "reduce the remaining grandfathered direct imports from 4 to 3", but this diff removes **two** entries (both `runtime-imessage.ts` and `runtime-slack-ops.runtime.ts`) from a previous total of 5, bringing the count to 3 — a reduction of 2, not 1. The description also only calls out removing "the stale iMessage entry", while the Slack entry is removed here as well.

The code changes themselves are correct and consistent (both files now import through the plugin SDK, and both entries are rightfully removed). The mismatch is just in the PR description's accounting, which may be confusing to future readers of the inventory's git history.

How can I resolve this? If you propose a fix, please make it concise.

@scoootscooob scoootscooob self-assigned this Mar 21, 2026
@scoootscooob scoootscooob force-pushed the codex/imessage-runtime-plugin-sdk branch from e750c68 to 79d0107 Compare March 21, 2026 17:20
@scoootscooob scoootscooob merged commit c0e482f into openclaw:main Mar 21, 2026
36 checks passed
mrosmarin added a commit to mrosmarin/openclaw that referenced this pull request Mar 21, 2026
* main: (516 commits)
  fix: use content hash for memory flush dedup instead of compactionCount (openclaw#30115) (openclaw#34222)
  fix(tts): add matrix to VOICE_BUBBLE_CHANNELS (openclaw#37080)
  feat(memory): pluggable system prompt section for memory plugins (openclaw#40126)
  fix: detect nvm services from installed command (openclaw#51146)
  fix: handle Linux nvm CA env before startup (openclaw#51146) (thanks @GodsBoy)
  refactor: route Telegram runtime through plugin sdk (openclaw#51772)
  refactor: route iMessage runtime through plugin sdk (openclaw#51770)
  refactor: route Slack runtime through plugin sdk (openclaw#51766)
  refactor(doctor): extract provider and shared config helpers (openclaw#51753)
  Fix Discord `/codex_resume` picker expiration (openclaw#51260)
  fix(ci): remove duplicate embedding default export
  fix(ci): restore embedding defaults and plugin boundaries
  fix: compaction safeguard summary budget (openclaw#27727)
  web UI: fix context notice using accumulated inputTokens instead of prompt snapshot (openclaw#51721)
  fix(status): skip cold-start status probes
  refactor(doctor): extract telegram provider warnings (openclaw#51704)
  fix(telegram): default fresh setups to mention-gated groups
  docs(changelog): note telegram doctor first-run guidance
  fix(doctor): add telegram first-run guidance
  fix(doctor): suppress telegram fresh-install group warning
  ...
MaheshBhushan pushed a commit to MaheshBhushan/openclaw that referenced this pull request Mar 22, 2026
frankekn pushed a commit to artwalker/openclaw that referenced this pull request Mar 23, 2026
furaul pushed a commit to furaul/openclaw that referenced this pull request Mar 24, 2026
alexey-pelykh pushed a commit to remoteclaw/remoteclaw that referenced this pull request Apr 4, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant