Files
openclaw/scripts/lib/plugin-sdk-doc-metadata.ts
Peter Steinberger 1e9d918037 feat(sdk): always persist media facts and ship facts-first replacements for legacy Media* surfaces (#113355)
* feat(sdk): always persist media facts and ship facts-first replacements for legacy Media* surfaces

PR 1 of the media legacy retirement program (audit-frozen, 4 PRs).

- Every media-bearing user turn now persists normalized __openclaw.media
  facts unconditionally while continuing to emit the legacy top-level
  Media* projection byte-identically (dual-write bridge; the conditional
  shouldPersistStructuredMediaEntries gate now always includes media).
- New replacement APIs, shipped before any removal: typed hook media
  facts (media[], originalMedia[], mediaStagingPending) on message
  events; {{AttachmentPath}}/{{AttachmentUrl}}/{{AttachmentContentType}}/
  {{AttachmentDir}}/{{AttachmentIndex}} template variables; focused
  openclaw/plugin-sdk/media-local-roots subpath split out of the
  deprecated agent-media-payload facade.
- Every legacy surface carries @deprecated naming its replacement, under
  one named compatibility record media-legacy-projection with the
  operator-approved removeAfter 2026-10-01 (two release trains; deletion
  additionally gates on a clean published-plugin artifact sweep).
- Generic transcript append invariant documented; SDK migration, hooks,
  and configuration docs updated to the facts-first path.

Writer golden matrix proves legacy bytes and model prompt bytes are
unchanged while nested facts become unconditional. 2,189 broad media
tests green; SDK api-baseline regenerated on fresh-env Testbox.

* feat(sdk): register media-local-roots subpath exports and deprecation metadata

Completes PR 1: package export map for openclaw/plugin-sdk/media-local-roots
plus the deprecated-subpath inventory and doc metadata entries for the
media-legacy-projection record.

* chore(sdk): track media-local-roots entrypoint and deprecated-export budgets

* fix(sdk): keep deprecated MSTeams buildMediaPayload re-export through the compat window

Deleting shipped runtime-api re-exports belongs to retirement PR 4 after
the media-legacy-projection window; PR 1 only deprecates. Also formats
the migration-guide schedule table.

* docs: regenerate docs map for media migration additions
2026-07-24 10:42:17 -07:00

108 lines
2.0 KiB
TypeScript

// Plugin Sdk Doc Metadata script supports OpenClaw repository automation.
export type PluginSdkDocCategory =
| "channel"
| "core"
| "legacy"
| "provider"
| "runtime"
| "utilities";
type PluginSdkDocMetadata = {
category: PluginSdkDocCategory;
};
export const pluginSdkDocMetadata = {
core: {
category: "core",
},
health: {
category: "core",
},
"approval-runtime": {
category: "runtime",
},
"approval-auth-runtime": {
category: "runtime",
},
"approval-client-runtime": {
category: "runtime",
},
"approval-delivery-runtime": {
category: "runtime",
},
"approval-gateway-runtime": {
category: "runtime",
},
"approval-native-runtime": {
category: "runtime",
},
"approval-reply-runtime": {
category: "runtime",
},
"plugin-entry": {
category: "core",
},
"channel-actions": {
category: "channel",
},
"channel-config-schema": {
category: "channel",
},
"channel-contract": {
category: "channel",
},
"channel-pairing": {
category: "channel",
},
"channel-ingress-runtime": {
category: "channel",
},
"channel-reply-pipeline": {
category: "channel",
},
"channel-setup": {
category: "channel",
},
"command-auth": {
category: "channel",
},
"command-status": {
category: "channel",
},
"secret-input": {
category: "channel",
},
"webhook-ingress": {
category: "channel",
},
"widget-html": {
category: "utilities",
},
"runtime-store": {
category: "runtime",
},
"session-store-runtime": {
category: "runtime",
},
"agent-runtime": {
category: "runtime",
},
"agent-harness-runtime": {
category: "runtime",
},
"speech-settings": {
category: "provider",
},
"allow-from": {
category: "utilities",
},
"reply-payload": {
category: "utilities",
},
"media-local-roots": {
category: "utilities",
},
} as const satisfies Record<string, PluginSdkDocMetadata>;
export type PluginSdkDocEntrypoint = keyof typeof pluginSdkDocMetadata;