惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

A
About on SuperTechFans
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
宝玉的分享
宝玉的分享
美团技术团队
量子位
The Cloudflare Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
IT之家
IT之家
爱范儿
爱范儿
J
Java Code Geeks
博客园 - Franky
Last Week in AI
Last Week in AI
B
Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
GbyAI
GbyAI
Recent Announcements
Recent Announcements
小众软件
小众软件
H
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
MyScale Blog
MyScale Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(channels): lazy-load setup fallback runtime · opencla...
vincentkoc · 2026-04-26 · via Recent Commits to openclaw:main

@@ -1,3 +1,4 @@

1+

import { fileURLToPath } from "node:url";

12

import { resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agents/agent-scope.js";

23

import type { OpenClawConfig } from "../../config/types.openclaw.js";

34

import { isBlockedObjectKey } from "../../infra/prototype-keys.js";

@@ -6,7 +7,11 @@ import {

67

listConfiguredChannelIdsForReadOnlyScope,

78

resolveDiscoverableScopedChannelPluginIds,

89

} from "../../plugins/channel-plugin-ids.js";

9-

import { loadOpenClawPlugins } from "../../plugins/loader.js";

10+

import {

11+

getCachedPluginJitiLoader,

12+

type PluginJitiLoaderCache,

13+

} from "../../plugins/jiti-loader-cache.js";

14+

import type { loadOpenClawPlugins as loadOpenClawPluginsType } from "../../plugins/loader.js";

1015

import type { PluginManifestRecord } from "../../plugins/manifest-registry.js";

1116

import { loadPluginManifestRegistryForPluginRegistry } from "../../plugins/plugin-registry.js";

1217

import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../../routing/session-key.js";

@@ -16,6 +21,40 @@ import { listChannelPlugins } from "./registry.js";

1621

import type { ChannelPlugin } from "./types.plugin.js";

17221823

const SAFE_MANIFEST_CHANNEL_ID_PATTERN = /^[a-z0-9][a-z0-9_-]{0,63}$/i;

24+

const LOADER_MODULE_CANDIDATES = [

25+

new URL("../../plugins/loader.js", import.meta.url),

26+

new URL("../../plugins/loader.ts", import.meta.url),

27+

] as const;

28+

const jitiLoaders: PluginJitiLoaderCache = new Map();

29+30+

type PluginLoaderModule = {

31+

loadOpenClawPlugins: typeof loadOpenClawPluginsType;

32+

};

33+34+

let pluginLoaderModule: PluginLoaderModule | undefined;

35+36+

function loadPluginLoaderModule(): PluginLoaderModule {

37+

if (pluginLoaderModule) {

38+

return pluginLoaderModule;

39+

}

40+

for (const candidate of LOADER_MODULE_CANDIDATES) {

41+

const modulePath = fileURLToPath(candidate);

42+

try {

43+

const jiti = getCachedPluginJitiLoader({

44+

cache: jitiLoaders,

45+

modulePath,

46+

importerUrl: import.meta.url,

47+

preferBuiltDist: true,

48+

jitiFilename: import.meta.url,

49+

});

50+

pluginLoaderModule = jiti(modulePath) as PluginLoaderModule;

51+

return pluginLoaderModule;

52+

} catch {

53+

// Try built/runtime source candidates in order.

54+

}

55+

}

56+

throw new Error("Could not load plugin runtime loader for channel setup fallback.");

57+

}

19582059

type ReadOnlyChannelPluginOptions = {

2160

env?: NodeJS.ProcessEnv;

@@ -641,7 +680,7 @@ export function resolveReadOnlyChannelPluginsForConfig(

641680

] as const,

642681

),

643682

);

644-

const registry = loadOpenClawPlugins({

683+

const registry = loadPluginLoaderModule().loadOpenClawPlugins({

645684

config: cfg,

646685

activationSourceConfig: options.activationSourceConfig ?? cfg,

647686

env,