mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-21 02:06:43 +00:00
docs(plugin-sdk): migrate retained SDK contracts (#111535)
* refactor(plugin-sdk): finish retained public demotions * test(plugin-sdk): tighten surface budgets * fix(plugin-sdk): retain static tool metadata contract * fix(plugin-sdk): keep retained exports pending * fix(plugin-sdk): satisfy registry lint * docs(plugin-sdk): document retained consumer seams
This commit is contained in:
@@ -122,7 +122,6 @@ A plugin can register a context engine using the plugin API:
|
||||
|
||||
```ts
|
||||
import { buildMemorySystemPromptAddition } from "openclaw/plugin-sdk/core";
|
||||
import { resolveSessionAgentId } from "openclaw/plugin-sdk/memory-host-core";
|
||||
|
||||
export default function register(api) {
|
||||
api.registerContextEngine("my-engine", (ctx) => ({
|
||||
@@ -152,7 +151,6 @@ export default function register(api) {
|
||||
systemPromptAddition: buildMemorySystemPromptAddition({
|
||||
availableTools: availableTools ?? new Set(),
|
||||
citationsMode,
|
||||
agentId: resolveSessionAgentId({ config: ctx.config, sessionKey }),
|
||||
agentSessionKey: sessionKey,
|
||||
}),
|
||||
};
|
||||
@@ -369,7 +367,7 @@ The slot is exclusive at run time - only one registered context engine is resolv
|
||||
Compaction is one responsibility of the context engine. The legacy engine delegates to OpenClaw's built-in summarization. Plugin engines can implement any compaction strategy (DAG summaries, vector retrieval, etc.).
|
||||
</Accordion>
|
||||
<Accordion title="Memory plugins">
|
||||
Memory plugins (`plugins.slots.memory`) are separate from context engines. Memory plugins provide search/retrieval; context engines control what the model sees. They can work together - a context engine might use memory plugin data during assembly. Plugin engines that want the active memory prompt path should prefer `buildMemorySystemPromptAddition(...)` from `openclaw/plugin-sdk/core`, which converts the active memory prompt sections into a ready-to-prepend `systemPromptAddition`. If an engine needs lower-level control, it can still pull raw lines from `openclaw/plugin-sdk/memory-host-core` via `buildActiveMemoryPromptSection(...)`.
|
||||
Memory plugins (`plugins.slots.memory`) are separate from context engines. Memory plugins provide search/retrieval; context engines control what the model sees. They can work together - a context engine might use memory plugin data during assembly. Plugin engines that want the active memory prompt path should use `buildMemorySystemPromptAddition(...)` from `openclaw/plugin-sdk/core`, which converts the host-prepared memory prompt sections into a ready-to-prepend `systemPromptAddition` without exposing memory-plugin layout.
|
||||
</Accordion>
|
||||
<Accordion title="Session pruning">
|
||||
Trimming old tool results in-memory still runs regardless of which context engine is active.
|
||||
|
||||
@@ -1058,7 +1058,6 @@ pipeline rather than just add memory search or hooks.
|
||||
|
||||
```ts
|
||||
import { buildMemorySystemPromptAddition } from "openclaw/plugin-sdk/core";
|
||||
import { resolveSessionAgentId } from "openclaw/plugin-sdk/memory-host-core";
|
||||
|
||||
export default function (api) {
|
||||
api.registerContextEngine("lossless-claw", (ctx) => ({
|
||||
@@ -1073,7 +1072,6 @@ export default function (api) {
|
||||
systemPromptAddition: buildMemorySystemPromptAddition({
|
||||
availableTools: availableTools ?? new Set(),
|
||||
citationsMode,
|
||||
agentId: resolveSessionAgentId({ config: ctx.config, sessionKey }),
|
||||
agentSessionKey: sessionKey,
|
||||
}),
|
||||
};
|
||||
@@ -1112,7 +1110,6 @@ import {
|
||||
buildMemorySystemPromptAddition,
|
||||
delegateCompactionToRuntime,
|
||||
} from "openclaw/plugin-sdk/core";
|
||||
import { resolveSessionAgentId } from "openclaw/plugin-sdk/memory-host-core";
|
||||
|
||||
export default function (api) {
|
||||
api.registerContextEngine("my-memory-engine", (ctx) => ({
|
||||
@@ -1131,7 +1128,6 @@ export default function (api) {
|
||||
systemPromptAddition: buildMemorySystemPromptAddition({
|
||||
availableTools: availableTools ?? new Set(),
|
||||
citationsMode,
|
||||
agentId: resolveSessionAgentId({ config: ctx.config, sessionKey }),
|
||||
agentSessionKey: sessionKey,
|
||||
}),
|
||||
};
|
||||
|
||||
@@ -304,15 +304,13 @@ That same pattern should be preferred for future capabilities.
|
||||
A company plugin should feel cohesive from the outside. If OpenClaw has shared contracts for models, speech, realtime transcription, realtime voice, media understanding, image generation, video generation, web fetch, and web search, a vendor can own all of its surfaces in one place:
|
||||
|
||||
```ts
|
||||
import type { OpenClawPluginDefinition } from "openclaw/plugin-sdk/plugin-entry";
|
||||
import {
|
||||
describeImageWithModel,
|
||||
transcribeOpenAiCompatibleAudio,
|
||||
} from "openclaw/plugin-sdk/media-understanding";
|
||||
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
||||
import { exampleAiMedia } from "./exampleai-media.js";
|
||||
|
||||
const plugin: OpenClawPluginDefinition = {
|
||||
export default definePluginEntry({
|
||||
id: "exampleai",
|
||||
name: "ExampleAI",
|
||||
description: "ExampleAI models and media capabilities.",
|
||||
register(api) {
|
||||
api.registerProvider({
|
||||
id: "exampleai",
|
||||
@@ -327,18 +325,9 @@ const plugin: OpenClawPluginDefinition = {
|
||||
api.registerMediaUnderstandingProvider({
|
||||
id: "exampleai",
|
||||
capabilities: ["image", "audio", "video"],
|
||||
async describeImage(req) {
|
||||
return describeImageWithModel({
|
||||
...req,
|
||||
provider: "exampleai",
|
||||
});
|
||||
},
|
||||
async transcribeAudio(req) {
|
||||
return transcribeOpenAiCompatibleAudio({
|
||||
...req,
|
||||
provider: "exampleai",
|
||||
});
|
||||
},
|
||||
describeImage: (req) => exampleAiMedia.describeImage(req),
|
||||
transcribeAudio: (req) => exampleAiMedia.transcribeAudio(req),
|
||||
describeVideo: (req) => exampleAiMedia.describeVideo(req),
|
||||
});
|
||||
|
||||
api.registerWebSearchProvider({
|
||||
@@ -348,15 +337,14 @@ const plugin: OpenClawPluginDefinition = {
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default plugin;
|
||||
});
|
||||
```
|
||||
|
||||
What matters is not the exact helper names. The shape matters:
|
||||
|
||||
- one plugin owns the vendor surface
|
||||
- core still owns the capability contracts
|
||||
- provider request translation and HTTP helpers stay in the vendor plugin
|
||||
- channels and feature plugins consume `api.runtime.*` helpers, not vendor code
|
||||
- contract tests can assert that the plugin registered the capabilities it claims to own
|
||||
|
||||
@@ -458,7 +446,7 @@ Keep capability registration public. Trim non-contract helper exports:
|
||||
- vendor-specific convenience helpers
|
||||
- setup/onboarding helpers that are implementation details
|
||||
|
||||
Reserved bundled-plugin helper subpaths have been retired from the generated SDK export map. Keep owner-specific helpers inside the owning plugin package; promote only reusable host behavior to generic SDK contracts such as `plugin-sdk/gateway-runtime`, `plugin-sdk/security-runtime`, and `plugin-sdk/plugin-config-runtime`.
|
||||
Reserved bundled-plugin helper subpaths have been retired from the generated SDK export map. Keep owner-specific helpers inside the owning plugin package; promote only reusable host behavior to generic SDK contracts such as `plugin-sdk/gateway-runtime`, `plugin-sdk/security-runtime`, and injected plugin API capabilities.
|
||||
|
||||
## Internals and reference
|
||||
|
||||
|
||||
@@ -513,9 +513,8 @@ surfaces:
|
||||
`openclaw/plugin-sdk/channel-inbound` for inbound route/envelope and
|
||||
record-and-dispatch wiring
|
||||
- `openclaw/plugin-sdk/channel-targets` for target parsing helpers
|
||||
- `openclaw/plugin-sdk/outbound-media` for media loading and
|
||||
`openclaw/plugin-sdk/channel-outbound` for outbound identity/send delegates
|
||||
and payload planning
|
||||
- `openclaw/plugin-sdk/channel-outbound` for outbound identity/send delegates
|
||||
and typed payload planning
|
||||
- `buildThreadAwareOutboundSessionRoute(...)` from
|
||||
`openclaw/plugin-sdk/channel-core` when an outbound route should preserve
|
||||
an explicit `replyToId`/`threadId` or recover the current `:thread:`
|
||||
@@ -524,8 +523,6 @@ surfaces:
|
||||
their platform has native thread delivery semantics.
|
||||
- `openclaw/plugin-sdk/thread-bindings-runtime` for thread-binding lifecycle
|
||||
and adapter registration
|
||||
- `openclaw/plugin-sdk/agent-media-payload` only when a legacy agent/media
|
||||
payload field layout is still required
|
||||
|
||||
Auth-only channels can usually stop at the default path: core handles
|
||||
approvals and the plugin just exposes outbound/auth capabilities. Native
|
||||
|
||||
@@ -153,7 +153,8 @@ SDK.
|
||||
| Need | Import |
|
||||
| --- | --- |
|
||||
| Config types such as `OpenClawConfig` | `openclaw/plugin-sdk/config-contracts` |
|
||||
| Already-loaded config assertions, plugin-entry config lookup, and config merging | `openclaw/plugin-sdk/plugin-config-runtime` |
|
||||
| Plugin-entry config lookup | `api.pluginConfig` |
|
||||
| Config merging | Plugin-local logic at the config boundary |
|
||||
| Current runtime snapshot reads | `openclaw/plugin-sdk/runtime-config-snapshot` |
|
||||
| Config writes | `openclaw/plugin-sdk/config-mutation` |
|
||||
| Session store helpers | `openclaw/plugin-sdk/session-store-runtime` |
|
||||
@@ -388,7 +389,7 @@ deprecated `plugin-sdk/discord` shim retained for external plugins that still
|
||||
import the published `@openclaw/discord` package directly. Owner-specific
|
||||
helpers live inside the owning plugin package; shared host behavior moves
|
||||
through generic SDK contracts such as `plugin-sdk/gateway-runtime`,
|
||||
`plugin-sdk/security-runtime`, and `plugin-sdk/plugin-config-runtime`.
|
||||
`plugin-sdk/security-runtime`, and the injected plugin API.
|
||||
|
||||
Use the narrowest import that matches the job. If you cannot find an export,
|
||||
check the source at `src/plugin-sdk/` or ask maintainers which generic
|
||||
|
||||
@@ -610,9 +610,10 @@ For an end-to-end authoring guide, see
|
||||
|
||||
- `registerMemoryCapability` is the exclusive memory-plugin API.
|
||||
- `registerMemoryCapability` may also expose `publicArtifacts.listArtifacts(...)`
|
||||
so companion plugins can consume exported memory artifacts through
|
||||
`openclaw/plugin-sdk/memory-host-core` instead of reaching into a specific
|
||||
memory plugin's private layout.
|
||||
for host-managed exports. Companion plugins that enumerate those declared
|
||||
artifacts still use `listActiveMemoryPublicArtifacts(...)` from the retained
|
||||
`openclaw/plugin-sdk/memory-host-core` facade until a focused public consumer
|
||||
API exists; they must not reach into another plugin's private layout.
|
||||
- `MemoryFlushPlan.model` can pin the flush turn to an exact `provider/model`
|
||||
reference, such as `ollama/qwen3:8b`, without inheriting the active fallback
|
||||
chain.
|
||||
|
||||
@@ -46,7 +46,7 @@ The mutation helpers return `afterWrite` plus a typed `followUp` summary so call
|
||||
Use `current()`, a passed-in `cfg`, `mutateConfigFile(...)`, or
|
||||
`replaceConfigFile(...)` for runtime config access and writes.
|
||||
|
||||
For direct SDK imports, prefer the focused config subpaths over the broad `openclaw/plugin-sdk/config-runtime` compatibility barrel: `config-contracts` for types, `plugin-config-runtime` for already-loaded config assertions, plugin entry lookup, and canonical config merging, `runtime-config-snapshot` for current process snapshots, and `config-mutation` for writes. Bundled plugin tests should mock these focused subpaths directly instead of mocking the broad compatibility barrel.
|
||||
For direct SDK imports, prefer the focused config subpaths over the broad `openclaw/plugin-sdk/config-runtime` compatibility barrel: `config-contracts` for types, `runtime-config-snapshot` for current process snapshots, and `config-mutation` for writes. Read entry-scoped values from `api.pluginConfig`; use a supplied tool context only for its runtime-wide config snapshot, and keep plugin-specific merging at that boundary. Bundled plugin tests should mock these focused subpaths directly instead of mocking the broad compatibility barrel.
|
||||
|
||||
Internal OpenClaw runtime code follows the same direction: load config once at the CLI, gateway, or process boundary, then pass that value through. Successful mutation writes refresh the process runtime snapshot and advance its internal revision; long-lived caches should key off the runtime-owned cache key instead of serializing config locally. Long-lived runtime modules have a zero-tolerance scanner for ambient `loadConfig()` calls; use a passed `cfg`, a request `context.getRuntimeConfig()`, or `getRuntimeConfig()` at an explicit process boundary.
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ deprecated for new code; see the per-row notes below.
|
||||
| `plugin-sdk/outbound-media` | Private-local after July 2026; Shared outbound media loading and hosted-media state helpers |
|
||||
| `plugin-sdk/poll-runtime` | Private-local after July 2026; Narrow poll normalization helpers |
|
||||
| `plugin-sdk/thread-bindings-runtime` | Private-local after July 2026; Thread-binding lifecycle and adapter helpers |
|
||||
| `plugin-sdk/agent-media-payload` | Agent media payload roots and loaders |
|
||||
| `plugin-sdk/agent-media-payload` | Deprecated compatibility facade for agent media payload roots and loaders. New channel plugins use typed outbound payload planning from `plugin-sdk/channel-outbound`; operator-supplied local-media loading still uses the retained facade until a focused public local-roots seam exists. |
|
||||
| `plugin-sdk/conversation-runtime` | Deprecated broad barrel for conversation/thread binding, pairing, and configured-binding helpers; prefer focused binding subpaths such as `plugin-sdk/thread-bindings-runtime` and `plugin-sdk/session-binding-runtime` |
|
||||
| `plugin-sdk/runtime-group-policy` | Runtime group-policy resolution helpers |
|
||||
| `plugin-sdk/channel-status` | Shared channel status snapshot/summary helpers |
|
||||
@@ -229,7 +229,7 @@ usage endpoint failed or returned no usable usage data.
|
||||
| `plugin-sdk/gateway-method-runtime` | Reserved Gateway method dispatch helper for plugin HTTP routes that declare `contracts.gatewayMethodDispatch: ["authenticated-request"]` |
|
||||
| `plugin-sdk/gateway-runtime` | Gateway client, event-loop-ready client start helper, gateway CLI RPC, gateway protocol errors, advertised LAN host resolution, and channel-status patch helpers |
|
||||
| `plugin-sdk/config-contracts` | Focused type-only config surface for plugin config shapes such as `OpenClawConfig` and channel/provider config types |
|
||||
| `plugin-sdk/plugin-config-runtime` | Runtime plugin-config helpers such as `mergeDeep`, `requireRuntimeConfig`, `resolvePluginConfigObject`, and `resolveLivePluginConfigObject` |
|
||||
| `plugin-sdk/plugin-config-runtime` | Deprecated compatibility facade for runtime plugin-config helpers; new plugins use `api.pluginConfig` plus focused config contracts, snapshots, and mutation helpers |
|
||||
| `plugin-sdk/config-mutation` | Transactional config mutation helpers such as `mutateConfigFile`, `replaceConfigFile`, and `logConfigUpdated` |
|
||||
| `plugin-sdk/message-tool-delivery-hints` | Private-local after July 2026; Shared message-tool delivery metadata hint strings |
|
||||
| `plugin-sdk/runtime-config-snapshot` | Current process config snapshot helpers such as `getRuntimeConfig`, `getRuntimeConfigSnapshot`, and test snapshot setters |
|
||||
@@ -319,7 +319,7 @@ usage endpoint failed or returned no usable usage data.
|
||||
| `plugin-sdk/media-mime` | Narrow MIME normalization, file-extension mapping, MIME detection, and media-kind helpers |
|
||||
| `plugin-sdk/media-store` | Narrow media store helpers such as `saveMediaBuffer` and `saveMediaStream` |
|
||||
| `plugin-sdk/media-generation-runtime` | Private-local after July 2026; Shared media-generation failover helpers, candidate selection, and missing-model messaging |
|
||||
| `plugin-sdk/media-understanding` | Media understanding provider types plus provider-facing image/audio/structured-extraction helper exports |
|
||||
| `plugin-sdk/media-understanding` | Deprecated compatibility facade for media-understanding provider types and helpers; new providers register through the injected plugin API and keep request helpers plugin-owned |
|
||||
| `plugin-sdk/text-chunking` | Outbound text and offset-preserving range chunking, markdown chunking/render helpers, quote-aware HTML tag tokenization, markdown table conversion, directive-tag stripping, and safe-text utilities |
|
||||
| `plugin-sdk/speech` | Private-local after July 2026; Speech provider types plus provider-facing directive, registry, validation, OpenAI-compatible TTS builder, and speech helper exports |
|
||||
| `plugin-sdk/speech-core` | Private-local after July 2026; Shared speech provider types, registry, directive, normalization, and speech helper exports |
|
||||
@@ -365,7 +365,7 @@ usage endpoint failed or returned no usable usage data.
|
||||
| `plugin-sdk/memory-core-host-runtime-cli` | Private-local after July 2026; Memory host CLI runtime helpers |
|
||||
| `plugin-sdk/memory-core-host-runtime-core` | Private-local after July 2026; Memory host core runtime helpers |
|
||||
| `plugin-sdk/memory-core-host-runtime-files` | Private-local after July 2026; Memory host file/runtime helpers |
|
||||
| `plugin-sdk/memory-host-core` | Vendor-neutral memory host core runtime helpers |
|
||||
| `plugin-sdk/memory-host-core` | Deprecated compatibility facade for vendor-neutral memory host helpers. New memory plugins use injected memory capabilities and host-prepared prompts; companion plugins still use the retained facade for public-artifact discovery until a focused read seam exists. |
|
||||
| `plugin-sdk/memory-host-events` | Private-local after July 2026; Vendor-neutral alias for memory host event journal helpers |
|
||||
| `plugin-sdk/memory-host-markdown` | Private-local after July 2026; Shared managed-markdown helpers for memory-adjacent plugins |
|
||||
| `plugin-sdk/memory-host-search` | Private-local after July 2026; Active memory runtime facade for search-manager access |
|
||||
@@ -376,8 +376,7 @@ usage endpoint failed or returned no usable usage data.
|
||||
bundled plugin code. They are tracked in the SDK inventory so package
|
||||
builds and aliasing stay deterministic, but they are not general plugin
|
||||
authoring APIs. New reusable host contracts should use generic SDK subpaths
|
||||
such as `plugin-sdk/gateway-runtime`, `plugin-sdk/ssrf-runtime`, and
|
||||
`plugin-sdk/plugin-config-runtime`.
|
||||
such as `plugin-sdk/gateway-runtime` and `plugin-sdk/ssrf-runtime`.
|
||||
|
||||
| Subpath | Owner and purpose |
|
||||
| --- | --- |
|
||||
|
||||
@@ -39,7 +39,6 @@ const publicSdkContractNarrowingTiers = [
|
||||
/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) {
|
||||
@@ -97,16 +96,16 @@ describe("plugin compatibility registry", () => {
|
||||
deprecated: "2026-07-15",
|
||||
warningStarts: "2026-07-15",
|
||||
removeAfter: "2026-07-30",
|
||||
replacement,
|
||||
docsPath: "/plugins/sdk-migration",
|
||||
});
|
||||
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 when live callers still depend on them", () => {
|
||||
it("keeps shipped public contracts pending until their runtime blockers clear", () => {
|
||||
const records = listPluginCompatRecords().filter(
|
||||
(record) =>
|
||||
record.status === "removal-pending" &&
|
||||
|
||||
@@ -52,7 +52,7 @@ const DEPRECATED_PLUGIN_SDK_SUBPATH_SEEDS = [
|
||||
owner: "config",
|
||||
removeAfter: "2026-09-01",
|
||||
replacement:
|
||||
"`openclaw/plugin-sdk/plugin-config-runtime`, `openclaw/plugin-sdk/config-mutation`, `openclaw/plugin-sdk/runtime-config-snapshot`, and `openclaw/plugin-sdk/config-contracts`",
|
||||
"`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",
|
||||
@@ -254,7 +254,8 @@ const DEPRECATED_PLUGIN_SDK_SUBPATH_SEEDS = [
|
||||
subpath: "memory-core",
|
||||
owner: "sdk",
|
||||
removeAfter: "2026-07-30",
|
||||
replacement: "`openclaw/plugin-sdk/memory-host-core`",
|
||||
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",
|
||||
@@ -547,6 +548,32 @@ const BUNDLED_ONLY_PUBLIC_PLUGIN_SDK_SUBPATHS = [
|
||||
"windows-spawn",
|
||||
] as const;
|
||||
|
||||
const DOCUMENTED_PUBLIC_PLUGIN_SDK_REPLACEMENTS: Record<
|
||||
string,
|
||||
{ replacement: string; docsPath: string }
|
||||
> = {
|
||||
"agent-media-payload": {
|
||||
replacement:
|
||||
"typed outbound payload planning via `openclaw/plugin-sdk/channel-outbound`; retain the facade for operator-supplied local-media root resolution until a focused public seam exists",
|
||||
docsPath: "/plugins/sdk-channel-plugins",
|
||||
},
|
||||
"media-understanding": {
|
||||
replacement:
|
||||
"`api.registerMediaUnderstandingProvider(...)` with provider-owned request helpers and types from `openclaw/plugin-sdk/plugin-entry`",
|
||||
docsPath: "/plugins/architecture",
|
||||
},
|
||||
"memory-host-core": {
|
||||
replacement:
|
||||
"host-prepared memory prompts via `openclaw/plugin-sdk/core` and memory capability registration through the injected plugin API; retain the facade for companion-plugin public-artifact discovery until a focused read seam exists",
|
||||
docsPath: "/plugins/architecture-internals#context-engine-plugins",
|
||||
},
|
||||
"plugin-config-runtime": {
|
||||
replacement:
|
||||
"`api.pluginConfig`, runtime tool context config, and focused `config-contracts`, `runtime-config-snapshot`, or `config-mutation` subpaths",
|
||||
docsPath: "/plugins/sdk-runtime",
|
||||
},
|
||||
};
|
||||
|
||||
const BLOCKED_PUBLIC_PLUGIN_SDK_DEMOTIONS = new Set<string>([
|
||||
"agent-media-payload",
|
||||
"media-understanding",
|
||||
@@ -577,6 +604,7 @@ const UNUSED_PUBLIC_PLUGIN_SDK_SUBPATH_RECORDS = UNUSED_PUBLIC_PLUGIN_SDK_SUBPAT
|
||||
|
||||
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 = {
|
||||
code: `plugin-sdk-${subpath}-public-demotion` as const,
|
||||
@@ -588,13 +616,14 @@ const BUNDLED_ONLY_PUBLIC_PLUGIN_SDK_SUBPATH_RECORDS = BUNDLED_ONLY_PUBLIC_PLUGI
|
||||
removeAfter: "2026-07-30",
|
||||
replacement: removalBlocked
|
||||
? subpath === "tool-plugin"
|
||||
? "retain the public subpath until `openclaw plugins init/build/validate` migrates off `defineToolPlugin`"
|
||||
: "retain the public subpath while shipped plugin-authoring documentation prescribes it; define and document a public replacement before demotion"
|
||||
? "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"
|
||||
docsPath: removalBlocked
|
||||
? subpath === "tool-plugin"
|
||||
? "/plugins/tool-plugins"
|
||||
: "/plugins/sdk-migration",
|
||||
: (documented?.docsPath ?? "/plugins/sdk-migration")
|
||||
: "/plugins/sdk-migration",
|
||||
surfaces: [`openclaw/plugin-sdk/${subpath}`],
|
||||
diagnostics: [
|
||||
"registry-backed public SDK demotion window; no external runtime import warning",
|
||||
|
||||
Reference in New Issue
Block a user