@openclaw/inworld-speech 2026.9.6 → 2026.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/assets/icon.png CHANGED
Binary file
@@ -1,7 +1,7 @@
1
1
  import { DEFAULT_INWORLD_MODEL_ID, INWORLD_TTS_MODELS, inworldTTS, listInworldVoices, normalizeInworldBaseUrl } from "./tts.js";
2
2
  import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
3
3
  import { parseSpeechDirectiveNumberOverride, resolveSpeechProviderApiKey } from "openclaw/plugin-sdk/speech-provider";
4
- import { asFiniteNumberInRange, asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
+ import { asFiniteNumberInRange, asOptionalRecord, filterStringRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  //#region extensions/inworld/speech-provider.ts
6
6
  function normalizeInworldTemperature(value) {
7
7
  return asFiniteNumberInRange(value, {
@@ -25,14 +25,10 @@ function normalizeInworldProviderConfig(rawConfig) {
25
25
  };
26
26
  }
27
27
  function readInworldProviderConfig(config) {
28
- const defaults = normalizeInworldProviderConfig({});
29
- return {
30
- apiKey: normalizeOptionalString(config.apiKey) ?? defaults.apiKey,
31
- baseUrl: normalizeInworldBaseUrl(normalizeOptionalString(config.baseUrl) ?? defaults.baseUrl),
32
- voiceId: normalizeOptionalString(config.voiceId) ?? defaults.voiceId,
33
- modelId: normalizeOptionalString(config.modelId) ?? defaults.modelId,
34
- temperature: normalizeInworldTemperature(config.temperature) ?? defaults.temperature
35
- };
28
+ return normalizeInworldProviderConfig({ inworld: {
29
+ ...config,
30
+ apiKey: normalizeOptionalString(config.apiKey)
31
+ } });
36
32
  }
37
33
  function resolveInworldApiKey(primary, fallback) {
38
34
  return resolveSpeechProviderApiKey(primary, fallback, process.env.INWORLD_API_KEY);
@@ -113,16 +109,20 @@ function buildInworldSpeechProvider() {
113
109
  });
114
110
  return {
115
111
  ...base,
116
- ...resolvedApiKey === void 0 ? {} : { apiKey: resolvedApiKey },
117
- ...normalizeOptionalString(talkProviderConfig.baseUrl) == null ? {} : { baseUrl: normalizeInworldBaseUrl(normalizeOptionalString(talkProviderConfig.baseUrl)) },
118
- ...normalizeOptionalString(talkProviderConfig.voiceId) == null ? {} : { voiceId: normalizeOptionalString(talkProviderConfig.voiceId) },
119
- ...normalizeOptionalString(talkProviderConfig.modelId) == null ? {} : { modelId: normalizeOptionalString(talkProviderConfig.modelId) },
112
+ ...filterStringRecord({
113
+ apiKey: resolvedApiKey,
114
+ baseUrl: normalizeOptionalString(talkProviderConfig.baseUrl) ? normalizeInworldBaseUrl(normalizeOptionalString(talkProviderConfig.baseUrl)) : void 0,
115
+ voiceId: normalizeOptionalString(talkProviderConfig.voiceId),
116
+ modelId: normalizeOptionalString(talkProviderConfig.modelId)
117
+ }),
120
118
  ...normalizeInworldTemperature(talkProviderConfig.temperature) == null ? {} : { temperature: normalizeInworldTemperature(talkProviderConfig.temperature) }
121
119
  };
122
120
  },
123
121
  resolveTalkOverrides: ({ params }) => ({
124
- ...normalizeOptionalString(params.voiceId) == null ? {} : { voiceId: normalizeOptionalString(params.voiceId) },
125
- ...normalizeOptionalString(params.modelId) == null ? {} : { modelId: normalizeOptionalString(params.modelId) },
122
+ ...filterStringRecord({
123
+ voiceId: normalizeOptionalString(params.voiceId),
124
+ modelId: normalizeOptionalString(params.modelId)
125
+ }),
126
126
  ...normalizeInworldTemperature(params.temperature) == null ? {} : { temperature: normalizeInworldTemperature(params.temperature) }
127
127
  }),
128
128
  listVoices: async (req) => {
package/dist/tts.js CHANGED
@@ -9,17 +9,6 @@ const INWORLD_ERROR_BODY_MAX_BYTES = 8192;
9
9
  const INWORLD_ERROR_BODY_MAX_CHARS = 400;
10
10
  const INWORLD_ERROR_BODY_READ_IDLE_TIMEOUT_MS = 1e4;
11
11
  var InworldErrorBodyOverflow = class extends Error {};
12
- /**
13
- * Reads a bounded, whitespace-collapsed diagnostic snippet from a non-OK
14
- * response body. A misbehaving or hostile endpoint can stream an arbitrarily
15
- * large error body, so this never buffers it whole: it reuses the shared
16
- * `readResponseWithLimit` reader (which cancels the underlying stream on
17
- * overflow and enforces an idle timeout) with a small cap. On overflow it
18
- * returns a fixed marker instead of echoing attacker-controlled bytes into the
19
- * thrown error. Kept local to this extension so it depends only on the
20
- * already-exported `response-limit-runtime` entry and adds no shared plugin-SDK
21
- * surface.
22
- */
23
12
  async function readInworldErrorBodySnippet(response) {
24
13
  let buffer;
25
14
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/inworld-speech",
3
- "version": "2026.9.6",
3
+ "version": "2026.9.8",
4
4
  "description": "OpenClaw Inworld speech plugin.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,10 +18,10 @@
18
18
  "minHostVersion": ">=2026.6.8"
19
19
  },
20
20
  "compat": {
21
- "pluginApi": ">=2026.9.6"
21
+ "pluginApi": ">=2026.9.8"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.9.6",
24
+ "openclawVersion": "2026.9.8",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -40,7 +40,7 @@
40
40
  "assets/activity.svg"
41
41
  ],
42
42
  "peerDependencies": {
43
- "openclaw": ">=2026.9.6"
43
+ "openclaw": ">=2026.9.8"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "openclaw": {