From 9cbbac8fc8f7fbb29a52b67081aa59c39a2c3035 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 23 Jul 2026 07:30:35 -0700 Subject: [PATCH] refactor(plugins): prune retired compatibility tombstones (#113025) * refactor(plugins): prune retired compat tombstones * chore: shrink cleanup ratchets * test(tooling): model flattened agent-core exports * test(system-agent): isolate TUI catalog discovery --- config/env-var-count-budget.txt | 2 +- config/knip.config.ts | 5 +- config/max-lines-baseline.txt | 1 - .../src/harness/prompt-template-arguments.ts | 8 - src/plugins/compat/registry.test.ts | 43 - src/plugins/compat/registry.ts | 1092 +---------------- src/system-agent/tui-backend.test.ts | 6 + test/scripts/check-deadcode-exports.test.ts | 31 +- 8 files changed, 45 insertions(+), 1143 deletions(-) diff --git a/config/env-var-count-budget.txt b/config/env-var-count-budget.txt index 97b4db0749b0..2582c0505659 100644 --- a/config/env-var-count-budget.txt +++ b/config/env-var-count-budget.txt @@ -1,3 +1,3 @@ # Distinct OPENCLAW_* names in production source under src, packages, and extensions. # Ratchet: lower this number when cleanup removes names; never raise it. -529 +525 diff --git a/config/knip.config.ts b/config/knip.config.ts index 3abea054cd43..44e08cf21927 100644 --- a/config/knip.config.ts +++ b/config/knip.config.ts @@ -127,7 +127,6 @@ const rootEntries = [ "src/tasks/task-registry-control.runtime.ts!", // Human plugin listing lazily loads its formatter to keep JSON startup lean. "src/cli/plugins-list-format.ts!", - "src/infra/kysely-node-sqlite.ts!", "src/infra/warning-filter.ts!", "src/infra/command-explainer/index.ts!", // Runtime modules loaded by path or namespace; static export tracing cannot see their contract. @@ -462,8 +461,6 @@ const config = { "src/types.ts!", "src/harness/messages.ts!", "src/harness/env/kill-tree.ts!", - "src/harness/compaction.ts!", - "src/harness/branch-summarization.ts!", "src/harness/prompt-template-arguments.ts!", "src/harness/utils/truncate.ts!", ], @@ -585,7 +582,7 @@ const config = { project: ["src/**/*.ts!"], }, "packages/speech-core": { - entry: ["api.ts!", "runtime-api.ts!", "speaker.ts!", "voice-models.ts!"], + entry: ["runtime-api.ts!", "speaker.ts!", "voice-models.ts!"], project: ["**/*.ts!"], ignoreDependencies: ["openclaw"], }, diff --git a/config/max-lines-baseline.txt b/config/max-lines-baseline.txt index 63f09c0ed61d..172dd0307624 100644 --- a/config/max-lines-baseline.txt +++ b/config/max-lines-baseline.txt @@ -961,7 +961,6 @@ src/plugins/channel-plugin-ids.test.ts src/plugins/clawhub.test.ts src/plugins/clawhub.ts src/plugins/commands.test.ts -src/plugins/compat/registry.ts src/plugins/contracts/host-hooks.contract.test.ts src/plugins/contracts/plugin-sdk-subpaths.test.ts src/plugins/contracts/scheduled-turns.contract.test.ts diff --git a/packages/agent-core/src/harness/prompt-template-arguments.ts b/packages/agent-core/src/harness/prompt-template-arguments.ts index 1bf4b9de21df..7d288556a31a 100644 --- a/packages/agent-core/src/harness/prompt-template-arguments.ts +++ b/packages/agent-core/src/harness/prompt-template-arguments.ts @@ -87,11 +87,3 @@ export function substituteArgs(content: string, args: string[]): string { result = result.replace(/\$@/g, allArgs); return result; } - -/** Format a prompt template invocation using command-style argument substitution. */ -export function formatPromptTemplateInvocation( - template: PromptTemplate, - args: string[] = [], -): string { - return substituteArgs(template.content, args); -} diff --git a/src/plugins/compat/registry.test.ts b/src/plugins/compat/registry.test.ts index 5e60d3ff9c99..d1504c4a3026 100644 --- a/src/plugins/compat/registry.test.ts +++ b/src/plugins/compat/registry.test.ts @@ -21,24 +21,6 @@ const deprecatedTargetParserCompatFiles = new Set([ "src/infra/outbound/outbound-session.test-helpers.ts", "src/plugins/compat/registry.test.ts", ]); -const publicSdkContractNarrowingTiers = [ - { - name: "fully unused subpath", - codeSuffix: "-unused-subpath", - count: 5, - replacement: "none needed — no known consumers; the subpath is removed without successor", - releaseNote: /removed without a successor.*no consumers/u, - }, - { - name: "bundled-only public export", - codeSuffix: "-public-demotion", - count: 152, - replacement: - "subpath becomes internal (private-local-only); no external successor — no known external consumers", - releaseNote: - /public export.*removed.*module remains available to bundled plugins.*private-local-only/u, - }, -] as const; function expectNonEmptyStringList(values: readonly string[], label: string) { expect(values, label).toEqual([expect.stringMatching(/\S/u), ...values.slice(1)]); for (const value of values) { @@ -80,31 +62,6 @@ describe("plugin compatibility registry", () => { } }); - it.each(publicSdkContractNarrowingTiers)( - "records the removed $name tier", - ({ codeSuffix, count, replacement, releaseNote }) => { - const records = listPluginCompatRecords().filter( - (record) => record.code.endsWith(codeSuffix) && record.status === "removed", - ); - - expect(records).toHaveLength(count); - for (const record of records) { - expect(record).toMatchObject({ - status: "removed", - owner: "sdk", - introduced: "2026-07-15", - deprecated: "2026-07-15", - warningStarts: "2026-07-15", - removeAfter: "2026-07-30", - }); - expect(record.replacement).toBe(replacement); - expect(record.docsPath).toBe("/plugins/sdk-migration"); - expect(record.surfaces).toEqual([expect.stringMatching(/^openclaw\/plugin-sdk\//u)]); - expect(record.releaseNote).toMatch(releaseNote); - } - }, - ); - it("keeps shipped public contracts pending until their runtime blockers clear", () => { const records = listPluginCompatRecords().filter( (record) => diff --git a/src/plugins/compat/registry.ts b/src/plugins/compat/registry.ts index 29de355b2e63..5a9afcb3e281 100644 --- a/src/plugins/compat/registry.ts +++ b/src/plugins/compat/registry.ts @@ -1,8 +1,6 @@ // Plugin compatibility registry exposes known plugin compatibility metadata to doctor/update flows. import type { PluginCompatRecord } from "./types.js"; -const CHANNEL_RUNTIME_SDK_SURFACE = ["openclaw/plugin-sdk/channel", "runtime"].join("-"); - type DeprecatedPluginSdkSubpathSeed = Pick< PluginCompatRecord, "code" | "owner" | "removeAfter" | "replacement" @@ -11,34 +9,6 @@ type DeprecatedPluginSdkSubpathSeed = Pick< }; const DEPRECATED_PLUGIN_SDK_SUBPATH_SEEDS = [ - { - code: "plugin-sdk-self-hosted-provider-setup-subpath", - subpath: "self-hosted-provider-setup", - owner: "provider", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/provider-setup`", - }, - { - code: "plugin-sdk-runtime-logger-subpath", - subpath: "runtime-logger", - owner: "sdk", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/runtime`", - }, - { - code: "plugin-sdk-runtime-secret-resolution-subpath", - subpath: "runtime-secret-resolution", - owner: "sdk", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/runtime` and `openclaw/plugin-sdk/secret-ref-runtime`", - }, - { - code: "plugin-sdk-setup-adapter-runtime-subpath", - subpath: "setup-adapter-runtime", - owner: "setup", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/setup-runtime`", - }, { code: "plugin-sdk-channel-streaming-subpath", subpath: "channel-streaming", @@ -54,28 +24,6 @@ const DEPRECATED_PLUGIN_SDK_SUBPATH_SEEDS = [ replacement: "`api.pluginConfig`, `openclaw/plugin-sdk/config-mutation`, `openclaw/plugin-sdk/runtime-config-snapshot`, and `openclaw/plugin-sdk/config-contracts`", }, - { - code: "plugin-sdk-config-types-subpath", - subpath: "config-types", - owner: "config", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/config-contracts`", - }, - { - code: "plugin-sdk-config-schema-subpath", - subpath: "config-schema", - owner: "config", - removeAfter: "2026-07-30", - replacement: - "plugin-local schemas with `openclaw/plugin-sdk/json-schema-runtime` for JSON Schema validation", - }, - { - code: "plugin-sdk-reply-dedupe-subpath", - subpath: "reply-dedupe", - owner: "channel", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/reply-runtime`", - }, { code: "plugin-sdk-inbound-reply-dispatch-subpath", subpath: "inbound-reply-dispatch", @@ -90,27 +38,6 @@ const DEPRECATED_PLUGIN_SDK_SUBPATH_SEEDS = [ removeAfter: "2026-09-01", replacement: "`openclaw/plugin-sdk/channel-outbound`", }, - { - code: "plugin-sdk-channel-reply-options-runtime-subpath", - subpath: "channel-reply-options-runtime", - owner: "channel", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/channel-outbound`", - }, - { - code: "plugin-sdk-outbound-send-deps-subpath", - subpath: "outbound-send-deps", - owner: "channel", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/channel-outbound`", - }, - { - code: "plugin-sdk-outbound-runtime-subpath", - subpath: "outbound-runtime", - owner: "channel", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/channel-outbound`", - }, { code: "plugin-sdk-infra-runtime-subpath", subpath: "infra-runtime", @@ -142,28 +69,6 @@ const DEPRECATED_PLUGIN_SDK_SUBPATH_SEEDS = [ removeAfter: "2026-08-15", replacement: "`openclaw/plugin-sdk/channel-config-schema`", }, - { - code: "plugin-sdk-direct-dm-subpath", - subpath: "direct-dm", - owner: "channel", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/channel-inbound`", - }, - { - code: "plugin-sdk-direct-dm-access-subpath", - subpath: "direct-dm-access", - owner: "channel", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/channel-inbound`", - }, - { - code: "plugin-sdk-mattermost-subpath", - subpath: "mattermost", - owner: "channel", - removeAfter: "2026-07-30", - replacement: - "`openclaw/plugin-sdk/command-auth`, `openclaw/plugin-sdk/channel-plugin-common`, and `openclaw/plugin-sdk/reply-history`", - }, { code: "plugin-sdk-matrix-subpath", subpath: "matrix", @@ -171,20 +76,6 @@ const DEPRECATED_PLUGIN_SDK_SUBPATH_SEEDS = [ removeAfter: "2026-08-15", replacement: "`openclaw/plugin-sdk/run-command`", }, - { - code: "plugin-sdk-channel-envelope-subpath", - subpath: "channel-envelope", - owner: "channel", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/channel-inbound`", - }, - { - code: "plugin-sdk-channel-inbound-roots-subpath", - subpath: "channel-inbound-roots", - owner: "channel", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/channel-inbound`", - }, { code: "plugin-sdk-channel-logging-subpath", subpath: "channel-logging", @@ -192,13 +83,6 @@ const DEPRECATED_PLUGIN_SDK_SUBPATH_SEEDS = [ removeAfter: "2026-08-15", replacement: "`openclaw/plugin-sdk/channel-inbound` and `openclaw/plugin-sdk/channel-outbound`", }, - { - code: "plugin-sdk-channel-location-subpath", - subpath: "channel-location", - owner: "channel", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/channel-inbound`", - }, { code: "plugin-sdk-channel-lifecycle-subpath", subpath: "channel-lifecycle", @@ -213,20 +97,6 @@ const DEPRECATED_PLUGIN_SDK_SUBPATH_SEEDS = [ removeAfter: "2026-09-01", replacement: "`openclaw/plugin-sdk/channel-outbound` and `openclaw/plugin-sdk/channel-inbound`", }, - { - code: "plugin-sdk-channel-message-runtime-subpath", - subpath: "channel-message-runtime", - owner: "channel", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/channel-outbound`", - }, - { - code: "plugin-sdk-channel-pairing-paths-subpath", - subpath: "channel-pairing-paths", - owner: "channel", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/channel-pairing`", - }, { code: "plugin-sdk-group-access-subpath", subpath: "group-access", @@ -234,108 +104,6 @@ const DEPRECATED_PLUGIN_SDK_SUBPATH_SEEDS = [ removeAfter: "2026-08-15", replacement: "`openclaw/plugin-sdk/channel-ingress-runtime`", }, - { - code: "plugin-sdk-media-generation-runtime-shared-subpath", - subpath: "media-generation-runtime-shared", - owner: "provider", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/media-generation-runtime`", - }, - { - code: "plugin-sdk-music-generation-core-subpath", - subpath: "music-generation-core", - owner: "provider", - removeAfter: "2026-07-30", - replacement: - "`openclaw/plugin-sdk/music-generation` for public types and assets; plugin-owned provider runtime helpers for provider registration", - }, - { - code: "plugin-sdk-memory-core-subpath", - subpath: "memory-core", - owner: "sdk", - removeAfter: "2026-07-30", - replacement: - "memory capability registration through the injected plugin API and host-prepared prompts from `openclaw/plugin-sdk/core`", - }, - { - code: "plugin-sdk-memory-core-engine-runtime-subpath", - subpath: "memory-core-engine-runtime", - owner: "sdk", - removeAfter: "2026-07-30", - replacement: - "`openclaw/plugin-sdk/memory-host-search` for active search-manager lifecycle operations", - }, - { - code: "plugin-sdk-memory-core-host-multimodal-subpath", - subpath: "memory-core-host-multimodal", - owner: "sdk", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/memory-core-host-engine-embeddings`", - }, - { - code: "plugin-sdk-memory-core-host-query-subpath", - subpath: "memory-core-host-query", - owner: "sdk", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/memory-core-host-engine-qmd`", - }, - { - code: "plugin-sdk-memory-core-host-events-subpath", - subpath: "memory-core-host-events", - owner: "sdk", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/memory-host-events`", - }, - { - code: "plugin-sdk-memory-host-files-subpath", - subpath: "memory-host-files", - owner: "sdk", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/memory-core-host-runtime-files`", - }, - { - code: "plugin-sdk-memory-host-status-subpath", - subpath: "memory-host-status", - owner: "sdk", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/memory-core-host-status`", - }, - { - code: "plugin-sdk-provider-auth-login-subpath", - subpath: "provider-auth-login", - owner: "provider", - removeAfter: "2026-07-30", - replacement: "provider auth hooks built with `openclaw/plugin-sdk/provider-auth`", - }, - { - code: "plugin-sdk-provider-zai-endpoint-subpath", - subpath: "provider-zai-endpoint", - owner: "provider", - removeAfter: "2026-07-30", - replacement: - "plugin-owned endpoint detection using `openclaw/plugin-sdk/provider-http` for generic transport helpers", - }, - { - code: "plugin-sdk-telegram-command-config-subpath", - subpath: "telegram-command-config", - owner: "channel", - removeAfter: "2026-07-30", - replacement: "plugin-local Telegram command config (no public SDK import replacement)", - }, - { - code: "plugin-sdk-webhook-path-subpath", - subpath: "webhook-path", - owner: "channel", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/webhook-ingress`", - }, - { - code: "plugin-sdk-zalouser-subpath", - subpath: "zalouser", - owner: "channel", - removeAfter: "2026-07-30", - replacement: "`openclaw/plugin-sdk/command-auth`", - }, { code: "plugin-sdk-zod-subpath", subpath: "zod", @@ -343,21 +111,13 @@ const DEPRECATED_PLUGIN_SDK_SUBPATH_SEEDS = [ removeAfter: "2026-08-15", replacement: "the direct `zod` package import", }, - { - code: "plugin-sdk-agent-dir-compat-subpath", - subpath: "agent-dir-compat", - owner: "agent-runtime", - removeAfter: "2026-07-30", - replacement: - "`resolveAgentDir` or `resolveDefaultAgentDir` from `openclaw/plugin-sdk/agent-harness-runtime`", - }, ] as const satisfies readonly DeprecatedPluginSdkSubpathSeed[]; const DEPRECATED_PLUGIN_SDK_SUBPATH_RECORDS = DEPRECATED_PLUGIN_SDK_SUBPATH_SEEDS.map( ({ code, subpath, owner, removeAfter, replacement }) => { - const record = { + return { code, - status: removeAfter <= "2026-07-30" ? ("removed" as const) : ("deprecated" as const), + status: "deprecated" as const, owner, introduced: "2026-07-06", deprecated: "2026-07-06", @@ -371,181 +131,15 @@ const DEPRECATED_PLUGIN_SDK_SUBPATH_RECORDS = DEPRECATED_PLUGIN_SDK_SUBPATH_SEED ], tests: ["src/plugins/compat/registry.test.ts"], } satisfies PluginCompatRecord; - if (removeAfter <= "2026-07-30") { - return Object.assign(record, { - releaseNote: `The deprecated public \`openclaw/plugin-sdk/${subpath}\` subpath was removed in the July 2026 compatibility sweep.`, - }); - } - return record; }, ) satisfies readonly PluginCompatRecord[]; -const UNUSED_PUBLIC_PLUGIN_SDK_SUBPATHS = [ - "command-gating", - "lmstudio", - "lmstudio-runtime", - "secret-provider-integration", - "skills-runtime", -] as const; - const BUNDLED_ONLY_PUBLIC_PLUGIN_SDK_SUBPATHS = [ - "access-groups", - "account-resolution-runtime", - "acp-binding-resolve-runtime", - "acp-binding-runtime", - "acp-runtime", - "acp-runtime-backend", - "agent-core", - "agent-harness-exec-review-runtime", - "agent-harness-task-runtime", - "agent-harness-tool-runtime", "agent-media-payload", - "agent-sessions", - "approval-reaction-runtime", - "approval-reference-runtime", - "async-lock-runtime", - "browser-config", - "bundled-channel-config-schema", - "channel-activity-runtime", - "channel-config-writes", - "channel-mention-gating", - "channel-route", - "channel-secret-tts-runtime", - "channel-targets", - "chat-channel-ids", - "cli-backend", - "cli-runtime", - "codex-mcp-projection", - "command-status-runtime", - "command-surface", - "concurrency-runtime", - "context-visibility-runtime", - "conversation-binding-runtime", - "cron-store-runtime", - "dangerous-name-runtime", - "delivery-queue-runtime", - "direct-dm-guard-policy", - "directory-config-runtime", - "document-extractor", - "embedding-providers", - "exec-approvals-runtime", - "expect-runtime", - "fetch-runtime", - "file-access-runtime", - "file-lock", - "global-singleton", - "group-activation", - "heartbeat-runtime", - "host-runtime", - "html-entity-runtime", - "image-generation", - "image-generation-core", - "image-generation-runtime", - "inline-image-data-url-runtime", - "json-schema-runtime", - "json-unsafe-integers", - "keyed-async-queue", - "llm", - "markdown-table-runtime", - "media-generation-runtime", "media-understanding", - "memory-core-host-embedding-registry", - "memory-core-host-engine-embeddings", - "memory-core-host-engine-qmd", - "memory-core-host-engine-storage", - "memory-core-host-runtime-cli", - "memory-core-host-runtime-core", - "memory-core-host-runtime-files", - "memory-core-host-secret", - "memory-core-host-status", "memory-host-core", - "memory-host-events", - "memory-host-markdown", - "memory-host-search", - "message-tool-delivery-hints", - "migration", - "migration-runtime", - "music-generation", - "node-host", - "number-runtime", - "outbound-media", - "pair-loop-guard-runtime", "plugin-config-runtime", - "plugin-state-runtime", - "poll-runtime", - "process-runtime", - "provider-auth-api-key", - "provider-auth-login-flow-runtime", - "provider-auth-result", - "provider-auth-runtime", - "provider-catalog-live-runtime", - "provider-catalog-shared", - "provider-entry", - "provider-env-vars", - "provider-http", - "provider-model-shared", - "provider-model-types", - "provider-oauth-runtime", - "provider-onboard", - "provider-selection-runtime", - "provider-setup", - "provider-stream", - "provider-stream-family", - "provider-stream-shared", - "provider-tools", - "provider-transport-runtime", - "provider-usage", - "provider-web-fetch", - "provider-web-fetch-contract", - "provider-web-search", - "provider-web-search-config-contract", - "provider-web-search-contract", - "qa-runner-runtime", - "realtime-bootstrap-context", - "realtime-transcription", - "realtime-voice", - "reply-reference", - "request-url", - "response-limit-runtime", - "retry-runtime", - "runtime-doctor", - "runtime-fetch", - "sandbox", - "secret-file-runtime", - "secure-random-runtime", - "session-binding-runtime", - "session-catalog", - "session-key-runtime", - "session-transcript-hit", - "session-transcript-runtime", - "session-visibility", - "simple-completion-runtime", - "speech", - "speech-core", - "sqlite-runtime", - "ssrf-dispatcher", - "string-normalization-runtime", - "system-event-runtime", - "talk-config-runtime", - "target-resolver-runtime", - "text-autolink-runtime", - "text-utility-runtime", - "thread-bindings-runtime", - "thread-bindings-session-runtime", - "time-runtime", - "tool-payload", "tool-plugin", - "tool-results", - "transcripts", - "transport-ready-runtime", - "tts-runtime", - "types", - "video-generation", - "video-generation-core", - "video-generation-runtime", - "web-content-extractor", - "webhook-targets", - "windows-spawn", ] as const; const DOCUMENTED_PUBLIC_PLUGIN_SDK_REPLACEMENTS: Record< @@ -574,74 +168,36 @@ const DOCUMENTED_PUBLIC_PLUGIN_SDK_REPLACEMENTS: Record< }, }; -const BLOCKED_PUBLIC_PLUGIN_SDK_DEMOTIONS = new Set([ - "agent-media-payload", - "media-understanding", - "memory-host-core", - "plugin-config-runtime", - "tool-plugin", -]); - -const UNUSED_PUBLIC_PLUGIN_SDK_SUBPATH_RECORDS = UNUSED_PUBLIC_PLUGIN_SDK_SUBPATHS.map( - (subpath) => ({ - code: `plugin-sdk-${subpath}-unused-subpath` as const, - status: "removed" as const, - owner: "sdk" as const, - introduced: "2026-07-15", - deprecated: "2026-07-15", - warningStarts: "2026-07-15", - removeAfter: "2026-07-30", - replacement: "none needed — no known consumers; the subpath is removed without successor", - docsPath: "/plugins/sdk-migration", - surfaces: [`openclaw/plugin-sdk/${subpath}`], - diagnostics: [ - "repository deprecated API usage guard for core and bundled plugins; no external runtime import warning", - ], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: `The unused public \`openclaw/plugin-sdk/${subpath}\` subpath was removed without a successor after the external-use corpus found no consumers.`, - }), -) satisfies readonly PluginCompatRecord[]; - const BUNDLED_ONLY_PUBLIC_PLUGIN_SDK_SUBPATH_RECORDS = BUNDLED_ONLY_PUBLIC_PLUGIN_SDK_SUBPATHS.map( (subpath) => { const documented = DOCUMENTED_PUBLIC_PLUGIN_SDK_REPLACEMENTS[subpath]; - const removalBlocked = BLOCKED_PUBLIC_PLUGIN_SDK_DEMOTIONS.has(subpath); - const record = { + return { code: `plugin-sdk-${subpath}-public-demotion` as const, - status: removalBlocked ? ("removal-pending" as const) : ("removed" as const), + status: "removal-pending" as const, owner: "sdk" as const, introduced: "2026-07-15", deprecated: "2026-07-15", warningStarts: "2026-07-15", removeAfter: "2026-07-30", - replacement: removalBlocked - ? subpath === "tool-plugin" + replacement: + subpath === "tool-plugin" ? "retain the public subpath until plugin authoring has a nonexecuting static metadata replacement for `defineToolPlugin`" - : `${documented?.replacement ?? "define and document a public replacement"}; retain the public subpath until the 2026-07-30 window closes and official plugin consumers migrate` - : "subpath becomes internal (private-local-only); no external successor — no known external consumers", - docsPath: removalBlocked - ? subpath === "tool-plugin" + : `${documented?.replacement ?? "define and document a public replacement"}; retain the public subpath until the 2026-07-30 window closes and official plugin consumers migrate`, + docsPath: + subpath === "tool-plugin" ? "/plugins/tool-plugins" - : (documented?.docsPath ?? "/plugins/sdk-migration") - : "/plugins/sdk-migration", + : (documented?.docsPath ?? "/plugins/sdk-migration"), surfaces: [`openclaw/plugin-sdk/${subpath}`], diagnostics: [ "registry-backed public SDK demotion window; no external runtime import warning", ], tests: ["src/plugins/compat/registry.test.ts"], } satisfies PluginCompatRecord; - if (!removalBlocked) { - return Object.assign(record, { - releaseNote: `The public export for \`openclaw/plugin-sdk/${subpath}\` was removed; the module remains available to bundled plugins as a private-local-only subpath.`, - }); - } - return record; }, ) satisfies readonly PluginCompatRecord[]; const PLUGIN_COMPAT_RECORDS = [ ...DEPRECATED_PLUGIN_SDK_SUBPATH_RECORDS, - ...UNUSED_PUBLIC_PLUGIN_SDK_SUBPATH_RECORDS, ...BUNDLED_ONLY_PUBLIC_PLUGIN_SDK_SUBPATH_RECORDS, { code: "removed-global-api-provider-publication", @@ -891,59 +447,6 @@ const PLUGIN_COMPAT_RECORDS = [ "src/plugins/contracts/plugin-sdk-package-contract-guardrails.test.ts", ], }, - { - code: "bundled-channel-config-schema-legacy", - status: "removed", - owner: "sdk", - introduced: "2026-04-28", - deprecated: "2026-04-28", - warningStarts: "2026-04-28", - removeAfter: "2026-07-28", - replacement: - "`openclaw/plugin-sdk/bundled-channel-config-schema` for maintained bundled plugins; plugin-local schemas for third-party plugins", - docsPath: "/plugins/sdk-migration", - surfaces: ["openclaw/plugin-sdk/channel-config-schema-legacy"], - diagnostics: ["plugin SDK compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by bundled-channel-config-schema-legacy were removed in the July 2026 sweep.", - }, - { - code: "plugin-sdk-testing-barrel", - status: "removed", - owner: "sdk", - introduced: "2026-04-28", - deprecated: "2026-04-28", - warningStarts: "2026-04-28", - removeAfter: "2026-07-28", - replacement: - "focused `openclaw/plugin-sdk/*` test subpaths such as `plugin-test-runtime`, `channel-test-helpers`, `test-env`, and `test-fixtures`", - docsPath: "/plugins/sdk-migration#private-testing-barrel", - surfaces: ["openclaw/plugin-sdk/testing"], - diagnostics: ["plugin SDK compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The testing subpath was private-local-only and pack-excluded in shipped stables v2026.6.5 and v2026.7.1, so it was safely removed before its removeAfter date.", - }, - { - code: "channel-route-key-aliases", - status: "removed", - owner: "sdk", - introduced: "2026-04-28", - deprecated: "2026-04-28", - warningStarts: "2026-04-28", - removeAfter: "2026-07-28", - replacement: "`channelRouteDedupeKey` and `channelRouteCompactKey`", - docsPath: "/plugins/sdk-migration", - surfaces: [ - "openclaw/plugin-sdk/channel-route channelRouteIdentityKey", - "openclaw/plugin-sdk/channel-route channelRouteKey", - ], - diagnostics: ["plugin SDK compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by channel-route-key-aliases were removed in the July 2026 sweep.", - }, { code: "channel-explicit-target-parser", status: "deprecated", @@ -1095,22 +598,6 @@ const PLUGIN_COMPAT_RECORDS = [ diagnostics: ["activation plan compat reason"], tests: ["src/plugins/activation-planner.test.ts"], }, - { - code: "embedded-harness-config-alias", - status: "removed", - owner: "agent-runtime", - introduced: "2026-04-24", - deprecated: "2026-04-25", - warningStarts: "2026-04-25", - removeAfter: "2026-07-25", - replacement: "`agentRuntime` config naming", - docsPath: "/plugins/sdk-agent-harness", - surfaces: ["agents.defaults.embeddedHarness", "model/provider runtime selection"], - diagnostics: ["agent runtime config compatibility"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by embedded-harness-config-alias were removed in the July 2026 sweep.", - }, { code: "agent-harness-sdk-alias", status: "removal-pending", @@ -1149,22 +636,6 @@ const PLUGIN_COMPAT_RECORDS = [ releaseNote: "Legacy `runEmbeddedPiAgent` and `EmbeddedPi*` plugin aliases remain as deprecated SDK compatibility only.", }, - { - code: "agent-harness-id-alias", - status: "removed", - owner: "agent-runtime", - introduced: "2026-04-24", - deprecated: "2026-04-25", - warningStarts: "2026-04-25", - removeAfter: "2026-07-25", - replacement: "`agentRuntime` ids and policy metadata", - docsPath: "/plugins/sdk-agent-harness", - surfaces: ["manifest/catalog execution policy", "runtime selection"], - diagnostics: ["agent runtime compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by agent-harness-id-alias were removed in the July 2026 sweep.", - }, { code: "generated-bundled-channel-config-fallback", status: "active", @@ -1176,138 +647,6 @@ const PLUGIN_COMPAT_RECORDS = [ diagnostics: ["channel config metadata fallback"], tests: ["src/plugins/contracts/config-footprint-guardrails.test.ts"], }, - { - code: "disable-persisted-plugin-registry-env", - status: "removed", - owner: "config", - introduced: "2026-04-25", - deprecated: "2026-04-25", - warningStarts: "2026-04-25", - removeAfter: "2026-07-25", - replacement: "`openclaw plugins registry --refresh` and `openclaw doctor --fix`", - docsPath: "/cli/plugins#registry", - surfaces: ["OPENCLAW_DISABLE_PERSISTED_PLUGIN_REGISTRY", "plugin registry reads"], - diagnostics: ["persisted-registry-disabled"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by disable-persisted-plugin-registry-env were removed in the July 2026 sweep.", - }, - { - code: "plugin-registry-install-migration-env", - status: "removed", - owner: "config", - introduced: "2026-04-25", - deprecated: "2026-04-25", - warningStarts: "2026-04-25", - removeAfter: "2026-07-25", - replacement: "`openclaw plugins registry --refresh` and `openclaw doctor --fix`", - docsPath: "/cli/plugins#registry", - surfaces: [ - "OPENCLAW_DISABLE_PLUGIN_REGISTRY_MIGRATION", - "OPENCLAW_FORCE_PLUGIN_REGISTRY_MIGRATION", - "package postinstall plugin registry migration", - ], - diagnostics: ["postinstall migration skip", "postinstall migration force deprecation warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by plugin-registry-install-migration-env were removed in the July 2026 sweep.", - }, - { - code: "plugin-install-config-ledger", - status: "removed", - owner: "config", - introduced: "2026-04-25", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "shared SQLite `installed_plugin_index` install ledger", - docsPath: "/cli/plugins#registry", - surfaces: ["plugins.installs authored config", "plugin install/update migration"], - diagnostics: ["config write migration warning", "doctor registry migration"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by plugin-install-config-ledger were removed in the July 2026 sweep.", - }, - { - code: "bundled-plugin-load-path-aliases", - status: "removed", - owner: "config", - introduced: "2026-04-25", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "packaged bundled plugins resolved through the persisted plugin registry", - docsPath: "/cli/plugins#registry", - surfaces: ["plugins.load.paths entries pointing at bundled plugin source/dist paths"], - diagnostics: ["doctor bundled plugin load-path warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by bundled-plugin-load-path-aliases were removed in the July 2026 sweep.", - }, - { - code: "plugin-owned-web-search-config", - status: "removed", - owner: "provider", - introduced: "2026-04-26", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`plugins.entries..config.webSearch`", - docsPath: "/tools/web", - surfaces: ["tools.web.search.apiKey", "tools.web.search."], - diagnostics: ["doctor legacy web-search config migration"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by plugin-owned-web-search-config were removed in the July 2026 sweep.", - }, - { - code: "plugin-owned-web-fetch-config", - status: "removed", - owner: "provider", - introduced: "2026-04-26", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`plugins.entries.firecrawl.config.webFetch`", - docsPath: "/tools/web-fetch", - surfaces: ["tools.web.fetch.firecrawl"], - diagnostics: ["doctor legacy web-fetch config migration"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by plugin-owned-web-fetch-config were removed in the July 2026 sweep.", - }, - { - code: "plugin-owned-x-search-config", - status: "removed", - owner: "provider", - introduced: "2026-04-26", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`plugins.entries.xai.config.webSearch.apiKey`", - docsPath: "/tools/grok-search", - surfaces: ["tools.web.x_search.apiKey"], - diagnostics: ["doctor legacy x_search config migration"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by plugin-owned-x-search-config were removed in the July 2026 sweep.", - }, - { - code: "plugin-activate-entrypoint-alias", - status: "removed", - owner: "sdk", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`register(api)` plugin entrypoint", - docsPath: "/plugins/sdk-entrypoints", - surfaces: ["plugin module `activate(api)`", "plugin loader registration"], - diagnostics: ["loader compatibility path"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by plugin-activate-entrypoint-alias were removed in the July 2026 sweep.", - }, { code: "setup-runtime-fallback", status: "active", @@ -1319,416 +658,6 @@ const PLUGIN_COMPAT_RECORDS = [ diagnostics: ["setup registry runtime diagnostic"], tests: ["src/plugins/setup-registry.test.ts", "src/plugins/setup-registry.runtime.test.ts"], }, - { - code: "provider-discovery-hook-alias", - status: "removed", - owner: "provider", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`catalog.run(...)` provider catalog hook", - docsPath: "/plugins/sdk-migration", - surfaces: ["provider plugin `discovery` hook", "provider catalog resolution"], - diagnostics: ["provider validation warning when catalog and discovery both register"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by provider-discovery-hook-alias were removed in the July 2026 sweep.", - }, - { - code: "channel-exposure-legacy-aliases", - status: "removed", - owner: "channel", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`openclaw.channel.exposure` metadata", - docsPath: "/plugins/sdk-setup", - surfaces: ["openclaw.channel.showConfigured", "openclaw.channel.showInSetup"], - diagnostics: ["channel exposure compatibility path"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by channel-exposure-legacy-aliases were removed in the July 2026 sweep.", - }, - { - code: "channel-runtime-sdk-alias", - status: "removed", - owner: "sdk", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: - "focused channel SDK subpaths, especially `openclaw/plugin-sdk/channel-runtime-context`", - docsPath: "/plugins/sdk-migration", - surfaces: [CHANNEL_RUNTIME_SDK_SURFACE], - diagnostics: ["plugin SDK compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by channel-runtime-sdk-alias were removed in the July 2026 sweep.", - }, - { - code: "command-auth-status-builders", - status: "removed", - owner: "sdk", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`openclaw/plugin-sdk/command-status`", - docsPath: "/plugins/sdk-migration", - surfaces: [ - "openclaw/plugin-sdk/command-auth buildCommandsMessage", - "openclaw/plugin-sdk/command-auth buildCommandsMessagePaginated", - "openclaw/plugin-sdk/command-auth buildHelpMessage", - ], - diagnostics: ["plugin SDK compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by command-auth-status-builders were removed in the July 2026 sweep.", - }, - { - code: "clawdbot-config-type-alias", - status: "removed", - owner: "sdk", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`OpenClawConfig`", - docsPath: "/plugins/sdk-migration", - surfaces: ["openclaw/plugin-sdk `ClawdbotConfig` type export"], - diagnostics: ["plugin SDK compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by clawdbot-config-type-alias were removed in the July 2026 sweep.", - }, - { - code: "openclaw-schema-type-alias", - status: "removed", - owner: "sdk", - introduced: "2026-04-26", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`OpenClawConfig` from `openclaw/plugin-sdk/config-schema`", - docsPath: "/plugins/sdk-migration", - surfaces: ["openclaw/plugin-sdk `OpenClawSchemaType` type export"], - diagnostics: ["plugin SDK compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by openclaw-schema-type-alias were removed in the July 2026 sweep.", - }, - { - code: "legacy-extension-api-import", - status: "removed", - owner: "sdk", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: - "injected `api.runtime.*` helpers or focused `openclaw/plugin-sdk/` imports", - docsPath: "/plugins/sdk-migration", - surfaces: ["openclaw/extension-api"], - diagnostics: ["OPENCLAW_EXTENSION_API_DEPRECATED"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by legacy-extension-api-import were removed in the July 2026 sweep.", - }, - { - code: "memory-split-registration", - status: "removed", - owner: "sdk", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`api.registerMemoryCapability({ promptBuilder, flushPlanResolver, runtime })`", - docsPath: "/plugins/sdk-migration", - surfaces: [ - "api.registerMemoryPromptSection", - "api.registerMemoryFlushPlan", - "api.registerMemoryRuntime", - "src/plugins/memory-state split registration helpers", - ], - diagnostics: ["plugin SDK compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by memory-split-registration were removed in the July 2026 sweep.", - }, - { - code: "provider-static-capabilities-bag", - status: "removed", - owner: "provider", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: - "explicit provider hooks such as `buildReplayPolicy`, `normalizeToolSchemas`, and `wrapStreamFn`", - docsPath: "/plugins/sdk-provider-plugins", - surfaces: ["ProviderPlugin.capabilities", "ProviderCapabilities"], - diagnostics: ["provider validation warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by provider-static-capabilities-bag were removed in the July 2026 sweep.", - }, - { - code: "provider-discovery-type-aliases", - status: "removed", - owner: "provider", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: - "`ProviderCatalogOrder`, `ProviderCatalogContext`, `ProviderCatalogResult`, and `ProviderPluginCatalog`", - docsPath: "/plugins/sdk-migration", - surfaces: [ - "ProviderDiscoveryOrder", - "ProviderDiscoveryContext", - "ProviderDiscoveryResult", - "ProviderPluginDiscovery", - ], - diagnostics: ["plugin SDK compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by provider-discovery-type-aliases were removed in the July 2026 sweep.", - }, - { - code: "provider-thinking-policy-hooks", - status: "removed", - owner: "provider", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`resolveThinkingProfile`", - docsPath: "/plugins/sdk-provider-plugins", - surfaces: [ - "ProviderPlugin.isBinaryThinking", - "ProviderPlugin.supportsXHighThinking", - "ProviderPlugin.resolveDefaultThinkingLevel", - ], - diagnostics: ["provider runtime compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by provider-thinking-policy-hooks were removed in the July 2026 sweep.", - }, - { - code: "provider-external-oauth-profiles-hook", - status: "removed", - owner: "provider", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`contracts.externalAuthProviders` plus `resolveExternalAuthProfiles`", - docsPath: "/plugins/sdk-provider-plugins", - surfaces: ["ProviderPlugin.resolveExternalOAuthProfiles"], - diagnostics: ["provider external auth fallback warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by provider-external-oauth-profiles-hook were removed in the July 2026 sweep.", - }, - { - code: "agent-tool-result-harness-alias", - status: "removed", - owner: "agent-runtime", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`runtime` and `runtimes` agent tool-result middleware fields", - docsPath: "/plugins/sdk-agent-harness", - surfaces: [ - "AgentToolResultMiddlewareHarness", - "AgentToolResultMiddlewareContext.harness", - "AgentToolResultMiddlewareOptions.harnesses", - "normalizeAgentToolResultMiddlewareHarnesses", - ], - diagnostics: ["agent runtime compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by agent-tool-result-harness-alias were removed in the July 2026 sweep.", - }, - { - code: "runtime-config-load-write", - status: "removed", - owner: "sdk", - introduced: "2026-04-27", - deprecated: "2026-04-27", - warningStarts: "2026-04-27", - removeAfter: "2026-07-27", - replacement: - "`api.runtime.config.current()`, passed config values, `mutateConfigFile(...)`, or `replaceConfigFile(...)`", - docsPath: "/plugins/sdk-runtime#config-loading-and-writes", - surfaces: ["api.runtime.config.loadConfig", "api.runtime.config.writeConfigFile"], - diagnostics: [ - "plugin runtime compatibility warning", - "deprecated API usage guard", - "runtime channel config boundary guard", - ], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by runtime-config-load-write were removed in the July 2026 sweep.", - }, - { - code: "runtime-taskflow-legacy-alias", - status: "removed", - owner: "sdk", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: - "`api.runtime.tasks.managedFlows` for managed mutations or `api.runtime.tasks.flows` for DTO reads", - docsPath: "/plugins/sdk-runtime", - surfaces: ["api.runtime.taskFlow", "api.runtime.tasks.flow"], - diagnostics: ["plugin runtime compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by runtime-taskflow-legacy-alias were removed in the July 2026 sweep.", - }, - { - code: "runtime-subagent-get-session-alias", - status: "removed", - owner: "sdk", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`api.runtime.subagent.getSessionMessages`", - docsPath: "/plugins/sdk-runtime", - surfaces: ["api.runtime.subagent.getSession"], - diagnostics: ["plugin runtime compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by runtime-subagent-get-session-alias were removed in the July 2026 sweep.", - }, - { - code: "runtime-stt-alias", - status: "removed", - owner: "sdk", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`api.runtime.mediaUnderstanding.transcribeAudioFile`", - docsPath: "/plugins/sdk-runtime", - surfaces: ["api.runtime.stt.transcribeAudioFile"], - diagnostics: ["plugin runtime compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by runtime-stt-alias were removed in the July 2026 sweep.", - }, - { - code: "runtime-inbound-envelope-alias", - status: "removed", - owner: "channel", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`BodyForAgent` plus structured user-context blocks", - docsPath: "/plugins/sdk-runtime", - surfaces: ["api.runtime.channel.reply.formatInboundEnvelope"], - diagnostics: ["channel runtime compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by runtime-inbound-envelope-alias were removed in the July 2026 sweep.", - }, - { - code: "channel-native-message-schema-helpers", - status: "removed", - owner: "channel", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "semantic `presentation` capabilities", - docsPath: "/plugins/sdk-migration", - surfaces: [ - "openclaw/plugin-sdk/channel-actions createMessageToolButtonsSchema", - "openclaw/plugin-sdk/channel-actions createMessageToolCardSchema", - ], - diagnostics: ["plugin SDK compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by channel-native-message-schema-helpers were removed in the July 2026 sweep.", - }, - { - code: "channel-mention-gating-legacy-helpers", - status: "removed", - owner: "channel", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "`resolveInboundMentionDecision({ facts, policy })`", - docsPath: "/plugins/sdk-migration", - surfaces: [ - "openclaw/plugin-sdk/channel-inbound resolveMentionGating", - "openclaw/plugin-sdk/channel-inbound resolveMentionGatingWithBypass", - "openclaw/plugin-sdk/channel-mention-gating resolveMentionGating", - "openclaw/plugin-sdk/channel-mention-gating resolveMentionGatingWithBypass", - ], - diagnostics: ["plugin SDK compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by channel-mention-gating-legacy-helpers were removed in the July 2026 sweep.", - }, - { - code: "provider-web-search-core-wrapper", - status: "removed", - owner: "provider", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "provider-owned `createTool(...)` on the returned `WebSearchProviderPlugin`", - docsPath: "/plugins/sdk-provider-plugins", - surfaces: ["openclaw/plugin-sdk/provider-web-search createPluginBackedWebSearchProvider"], - diagnostics: ["plugin SDK compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by provider-web-search-core-wrapper were removed in the July 2026 sweep.", - }, - { - code: "approval-capability-approvals-alias", - status: "removed", - owner: "channel", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: - "top-level `delivery`, `nativeRuntime`, `render`, and `native` approval capability fields", - docsPath: "/plugins/sdk-channel-plugins", - surfaces: ["createChannelApprovalCapability({ approvals })"], - diagnostics: ["plugin SDK compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by approval-capability-approvals-alias were removed in the July 2026 sweep.", - }, - { - code: "plugin-sdk-test-utils-alias", - status: "removed", - owner: "sdk", - introduced: "2026-04-24", - deprecated: "2026-04-26", - warningStarts: "2026-04-26", - removeAfter: "2026-07-26", - replacement: "focused `openclaw/plugin-sdk/*` test subpaths", - docsPath: "/plugins/sdk-migration", - surfaces: ["openclaw/plugin-sdk/test-utils"], - diagnostics: ["plugin SDK compatibility warning"], - tests: ["src/plugins/compat/registry.test.ts"], - releaseNote: - "The deprecated compatibility surfaces tracked by plugin-sdk-test-utils-alias were removed in the July 2026 sweep.", - }, ] as const satisfies readonly PluginCompatRecord[]; export type PluginCompatCode = (typeof PLUGIN_COMPAT_RECORDS)[number]["code"]; @@ -1749,4 +678,3 @@ export function getPluginCompatRecord(code: PluginCompatCode): KnownPluginCompat } return record; } -/* oxlint-disable max-lines -- TODO: split this grandfathered oversized file. */ diff --git a/src/system-agent/tui-backend.test.ts b/src/system-agent/tui-backend.test.ts index 5e19cd29c60e..1e88ea8d78d4 100644 --- a/src/system-agent/tui-backend.test.ts +++ b/src/system-agent/tui-backend.test.ts @@ -14,6 +14,12 @@ vi.mock("../plugins/providers.js", async (importOriginal) => ({ resolveOwningPluginIdsForProviderRef: vi.fn(() => []), })); +vi.mock("../agents/prepared-model-catalog.js", async (importOriginal) => ({ + ...(await importOriginal()), + // These tests exercise the TUI boundary, not filesystem-backed catalog discovery. + loadPreparedModelCatalog: vi.fn(async () => []), +})); + const overview: SystemAgentOverview = { defaultAgentId: "main", defaultModel: "openai/gpt-5.5", diff --git a/test/scripts/check-deadcode-exports.test.ts b/test/scripts/check-deadcode-exports.test.ts index 7ca3b976b370..3c8088691496 100644 --- a/test/scripts/check-deadcode-exports.test.ts +++ b/test/scripts/check-deadcode-exports.test.ts @@ -272,10 +272,33 @@ describe("check-deadcode-exports", () => { const packageJson = JSON.parse( fs.readFileSync(new URL(`../../${workspace}/package.json`, import.meta.url), "utf8"), ) as { exports: Record }; - const expected = Object.keys(packageJson.exports) - .map((subpath) => - subpath === "." ? "src/index.ts!" : `src/${subpath.slice("./".length)}.ts!`, - ) + const conventionalEntries = Object.keys(packageJson.exports).map((subpath) => + subpath === "." ? "src/index.ts!" : `src/${subpath.slice("./".length)}.ts!`, + ); + const missingConventionalEntries = conventionalEntries.filter( + (entry) => + !fs.existsSync( + new URL(`../../${workspace}/${entry.slice(0, -"!".length)}`, import.meta.url), + ), + ); + expect(missingConventionalEntries).toEqual( + workspace === "packages/agent-core" + ? ["src/harness/compaction.ts!", "src/harness/branch-summarization.ts!"] + : [], + ); + if (workspace === "packages/agent-core") { + for (const sourcePath of [ + "src/harness/compaction/compaction.ts", + "src/harness/compaction/branch-summarization.ts", + ]) { + expect( + fs.existsSync(new URL(`../../${workspace}/${sourcePath}`, import.meta.url)), + sourcePath, + ).toBe(true); + } + } + const expected = conventionalEntries + .filter((entry) => !missingConventionalEntries.includes(entry)) .toSorted(); expect([...knipConfig.workspaces[workspace].entry].toSorted()).toEqual(expected); });