mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 05:02:44 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { SkillEligibilityContext, SkillEntry } from "../agents/skills.js";
|
||||
import { loadWorkspaceSkillEntries } from "../agents/skills.js";
|
||||
import { resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agents/agent-scope.js";
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import { listNodePairing, updatePairedNodeMetadata } from "./node-pairing.js";
|
||||
import { createSubsystemLogger } from "../logging/subsystem.js";
|
||||
import { bumpSkillsSnapshotVersion } from "../agents/skills/refresh.js";
|
||||
@@ -156,7 +156,7 @@ export function recordRemoteNodeBins(nodeId: string, bins: string[]) {
|
||||
upsertNode({ nodeId, bins });
|
||||
}
|
||||
|
||||
function listWorkspaceDirs(cfg: ClawdbotConfig): string[] {
|
||||
function listWorkspaceDirs(cfg: MoltbotConfig): string[] {
|
||||
const dirs = new Set<string>();
|
||||
const list = cfg.agents?.list;
|
||||
if (Array.isArray(list)) {
|
||||
@@ -173,10 +173,10 @@ function listWorkspaceDirs(cfg: ClawdbotConfig): string[] {
|
||||
function collectRequiredBins(entries: SkillEntry[], targetPlatform: string): string[] {
|
||||
const bins = new Set<string>();
|
||||
for (const entry of entries) {
|
||||
const os = entry.clawdbot?.os ?? [];
|
||||
const os = entry.metadata?.os ?? [];
|
||||
if (os.length > 0 && !os.includes(targetPlatform)) continue;
|
||||
const required = entry.clawdbot?.requires?.bins ?? [];
|
||||
const anyBins = entry.clawdbot?.requires?.anyBins ?? [];
|
||||
const required = entry.metadata?.requires?.bins ?? [];
|
||||
const anyBins = entry.metadata?.requires?.anyBins ?? [];
|
||||
for (const bin of required) {
|
||||
if (bin.trim()) bins.add(bin.trim());
|
||||
}
|
||||
@@ -227,7 +227,7 @@ export async function refreshRemoteNodeBins(params: {
|
||||
platform?: string;
|
||||
deviceFamily?: string;
|
||||
commands?: string[];
|
||||
cfg: ClawdbotConfig;
|
||||
cfg: MoltbotConfig;
|
||||
timeoutMs?: number;
|
||||
}) {
|
||||
if (!remoteRegistry) return;
|
||||
@@ -304,7 +304,7 @@ export function getRemoteSkillEligibility(): SkillEligibilityContext["remote"] |
|
||||
};
|
||||
}
|
||||
|
||||
export async function refreshRemoteBinsForConnectedNodes(cfg: ClawdbotConfig) {
|
||||
export async function refreshRemoteBinsForConnectedNodes(cfg: MoltbotConfig) {
|
||||
if (!remoteRegistry) return;
|
||||
const connected = remoteRegistry.listConnected();
|
||||
for (const node of connected) {
|
||||
|
||||
Reference in New Issue
Block a user