diff --git a/docs/tools/plugin.md b/docs/tools/plugin.md index a7c55626f1a..5336df574af 100644 --- a/docs/tools/plugin.md +++ b/docs/tools/plugin.md @@ -1148,12 +1148,14 @@ authoring plugins: intentionally exposes extension-facing helpers: `openclaw/plugin-sdk/acpx`, `openclaw/plugin-sdk/bluebubbles`, `openclaw/plugin-sdk/feishu`, `openclaw/plugin-sdk/googlechat`, - `openclaw/plugin-sdk/irc`, `openclaw/plugin-sdk/matrix`, + `openclaw/plugin-sdk/irc`, `openclaw/plugin-sdk/lobster`, + `openclaw/plugin-sdk/matrix`, `openclaw/plugin-sdk/mattermost`, `openclaw/plugin-sdk/memory-core`, `openclaw/plugin-sdk/minimax-portal-auth`, `openclaw/plugin-sdk/nextcloud-talk`, `openclaw/plugin-sdk/nostr`, `openclaw/plugin-sdk/synology-chat`, `openclaw/plugin-sdk/test-utils`, `openclaw/plugin-sdk/tlon`, `openclaw/plugin-sdk/twitch`, + `openclaw/plugin-sdk/voice-call`, `openclaw/plugin-sdk/zalo`, and `openclaw/plugin-sdk/zalouser`. ## Channel target resolution diff --git a/package.json b/package.json index 2a17025c18a..b9c04e44692 100644 --- a/package.json +++ b/package.json @@ -242,6 +242,10 @@ "types": "./dist/plugin-sdk/irc.d.ts", "default": "./dist/plugin-sdk/irc.js" }, + "./plugin-sdk/lobster": { + "types": "./dist/plugin-sdk/lobster.d.ts", + "default": "./dist/plugin-sdk/lobster.js" + }, "./plugin-sdk/lazy-runtime": { "types": "./dist/plugin-sdk/lazy-runtime.d.ts", "default": "./dist/plugin-sdk/lazy-runtime.js" @@ -290,6 +294,10 @@ "types": "./dist/plugin-sdk/twitch.d.ts", "default": "./dist/plugin-sdk/twitch.js" }, + "./plugin-sdk/voice-call": { + "types": "./dist/plugin-sdk/voice-call.d.ts", + "default": "./dist/plugin-sdk/voice-call.js" + }, "./plugin-sdk/zalo": { "types": "./dist/plugin-sdk/zalo.d.ts", "default": "./dist/plugin-sdk/zalo.js" diff --git a/scripts/lib/plugin-sdk-entrypoints.json b/scripts/lib/plugin-sdk-entrypoints.json index cce8dfe895a..41a6875af2c 100644 --- a/scripts/lib/plugin-sdk-entrypoints.json +++ b/scripts/lib/plugin-sdk-entrypoints.json @@ -50,6 +50,7 @@ "feishu", "googlechat", "irc", + "lobster", "lazy-runtime", "matrix", "mattermost", @@ -62,6 +63,7 @@ "test-utils", "tlon", "twitch", + "voice-call", "zalo", "zalouser", "account-helpers", diff --git a/src/plugin-sdk/lobster.ts b/src/plugin-sdk/lobster.ts index 968fcf2cae1..c6a2a413acc 100644 --- a/src/plugin-sdk/lobster.ts +++ b/src/plugin-sdk/lobster.ts @@ -1,5 +1,5 @@ -// Narrow plugin-sdk surface for the bundled lobster plugin. -// Keep this list additive and scoped to symbols used under extensions/lobster. +// Public Lobster plugin helpers. +// Keep this surface narrow and limited to the Lobster workflow/tool contract. export { definePluginEntry } from "./core.js"; export { diff --git a/src/plugin-sdk/subpaths.test.ts b/src/plugin-sdk/subpaths.test.ts index f3cd5537398..427b45458ef 100644 --- a/src/plugin-sdk/subpaths.test.ts +++ b/src/plugin-sdk/subpaths.test.ts @@ -23,6 +23,7 @@ import * as signalSdk from "openclaw/plugin-sdk/signal"; import * as slackSdk from "openclaw/plugin-sdk/slack"; import * as telegramSdk from "openclaw/plugin-sdk/telegram"; import * as testingSdk from "openclaw/plugin-sdk/testing"; +import * as voiceCallSdk from "openclaw/plugin-sdk/voice-call"; import * as whatsappSdk from "openclaw/plugin-sdk/whatsapp"; import { describe, expect, expectTypeOf, it } from "vitest"; import type { ChannelMessageActionContext } from "../channels/plugins/types.js"; @@ -48,14 +49,12 @@ const trimmedLegacyExtensionSubpaths = [ "diagnostics-otel", "diffs", "llm-task", - "lobster", "memory-lancedb", "open-prose", "phone-control", "qwen-portal-auth", "talk-voice", "thread-ownership", - "voice-call", ] as const; const asExports = (mod: object) => mod as Record; @@ -73,6 +72,7 @@ const mattermostSdk = await import("openclaw/plugin-sdk/mattermost"); const nextcloudTalkSdk = await import("openclaw/plugin-sdk/nextcloud-talk"); const twitchSdk = await import("openclaw/plugin-sdk/twitch"); const accountHelpersSdk = await import("openclaw/plugin-sdk/account-helpers"); +const lobsterSdk = await import("openclaw/plugin-sdk/lobster"); describe("plugin-sdk subpath exports", () => { it("exports compat helpers", () => { @@ -320,6 +320,16 @@ describe("plugin-sdk subpath exports", () => { expect(typeof acpxSdk.omitEnvKeysCaseInsensitive).toBe("function"); }); + it("exports Lobster helpers", async () => { + expect(typeof lobsterSdk.definePluginEntry).toBe("function"); + expect(typeof lobsterSdk.materializeWindowsSpawnProgram).toBe("function"); + }); + + it("exports Voice Call helpers", () => { + expect(typeof voiceCallSdk.definePluginEntry).toBe("function"); + expect(typeof voiceCallSdk.resolveOpenAITtsInstructions).toBe("function"); + }); + it("resolves bundled extension subpaths", async () => { for (const { id, load } of bundledExtensionSubpathLoaders) { const mod = await load(); diff --git a/src/plugin-sdk/voice-call.ts b/src/plugin-sdk/voice-call.ts index b3f1a889f78..8e61959187f 100644 --- a/src/plugin-sdk/voice-call.ts +++ b/src/plugin-sdk/voice-call.ts @@ -1,5 +1,5 @@ -// Narrow plugin-sdk surface for the bundled voice-call plugin. -// Keep this list additive and scoped to symbols used under extensions/voice-call. +// Public Voice Call plugin helpers. +// Keep this surface narrow and limited to the voice-call feature contract. export { definePluginEntry } from "./core.js"; export {