


























@@ -27,7 +27,7 @@ function writeJson(file, value) {
2727fs.writeFileSync(file, `${JSON.stringify(value, null, 2)}\n`);
2828}
292930-function manifestPath(pluginDir, env = process.env) {
30+function manifestPath(pluginDir) {
3131return path.join(process.cwd(), "dist", "extensions", pluginDir, "openclaw.plugin.json");
3232}
3333@@ -58,15 +58,15 @@ function ensureGatewayConfig(config, port) {
5858return {
5959 ...config,
6060gateway: {
61- ...(config.gateway ?? {}),
61+ ...config.gateway,
6262 port,
6363bind: "loopback",
6464auth: {
6565mode: "token",
6666token: TOKEN,
6767},
6868controlUi: {
69- ...(config.gateway?.controlUi ?? {}),
69+ ...config.gateway?.controlUi,
7070enabled: false,
7171},
7272},
@@ -238,7 +238,7 @@ function parseJsonOutput(stdout) {
238238}
239239const jsonLine = trimmed
240240.split(/\r?\n/u)
241-.reverse()
241+.toReversed()
242242.find((line) => line.trim().startsWith("{"));
243243if (!jsonLine) {
244244throw new Error(`gateway call JSON output was not parseable:\n${trimmed}`);
@@ -270,18 +270,18 @@ async function smokePlugin(pluginId, pluginDir, requiresConfig, pluginIndex) {
270270const config = ensureGatewayConfig(readConfig(), port);
271271for (const channel of plan.channels) {
272272config.channels = {
273- ...(config.channels ?? {}),
273+ ...config.channels,
274274[channel]: {
275- ...(config.channels?.[channel] ?? {}),
275+ ...config.channels?.[channel],
276276enabled: true,
277277},
278278};
279279}
280280if (plan.speechProviders[0]) {
281281config.messages = {
282- ...(config.messages ?? {}),
282+ ...config.messages,
283283tts: {
284- ...(config.messages?.tts ?? {}),
284+ ...config.messages?.tts,
285285provider: plan.speechProviders[0],
286286},
287287};
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。