mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
Build: include facade runtime sidecars
This commit is contained in:
@@ -52,7 +52,12 @@ function getJitiFactory() {
|
||||
}
|
||||
|
||||
function loadRuntimeModule<T>(params: { candidates: readonly string[]; errorMessage: string }): T {
|
||||
for (const candidate of params.candidates) {
|
||||
const candidates = CURRENT_MODULE_PATH.includes(`${path.sep}dist${path.sep}`)
|
||||
? params.candidates.flatMap((candidate) =>
|
||||
candidate.startsWith("../") ? [candidate, `.${candidate.slice(2)}`] : [candidate],
|
||||
)
|
||||
: params.candidates;
|
||||
for (const candidate of candidates) {
|
||||
try {
|
||||
return nodeRequire(candidate) as T;
|
||||
} catch {
|
||||
@@ -61,7 +66,7 @@ function loadRuntimeModule<T>(params: { candidates: readonly string[]; errorMess
|
||||
}
|
||||
const createJiti = getJitiFactory();
|
||||
const jiti = createJiti(import.meta.url, { tryNative: false });
|
||||
for (const candidate of params.candidates) {
|
||||
for (const candidate of candidates) {
|
||||
try {
|
||||
return jiti(candidate) as T;
|
||||
} catch {
|
||||
|
||||
@@ -129,8 +129,12 @@ function buildCoreDistEntries(): Record<string, string> {
|
||||
"agents/models-config.runtime": "src/agents/models-config.runtime.ts",
|
||||
"agents/pi-model-discovery-runtime": "src/agents/pi-model-discovery-runtime.ts",
|
||||
"commands/status.summary.runtime": "src/commands/status.summary.runtime.ts",
|
||||
"infra/boundary-file-read": "src/infra/boundary-file-read.ts",
|
||||
"plugins/provider-discovery.runtime": "src/plugins/provider-discovery.runtime.ts",
|
||||
"plugins/provider-runtime.runtime": "src/plugins/provider-runtime.runtime.ts",
|
||||
"plugins/public-surface-runtime": "src/plugins/public-surface-runtime.ts",
|
||||
"plugins/sdk-alias": "src/plugins/sdk-alias.ts",
|
||||
"facade-activation-check.runtime": "src/plugin-sdk/facade-activation-check.runtime.ts",
|
||||
extensionAPI: "src/extensionAPI.ts",
|
||||
"infra/warning-filter": "src/infra/warning-filter.ts",
|
||||
"telegram/audit": bundledPluginFile("telegram", "src/audit.ts"),
|
||||
|
||||
Reference in New Issue
Block a user