openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
34 lines (33 loc) • 1.11 kB
JavaScript
import { i as hasClaudeSource, r as discoverClaudeSource } from "./source-XeN9uOjE.js";
import { t as buildClaudePlan } from "./plan-C3T45ZY8.js";
import { t as applyClaudePlan } from "./apply-DGS5IyKj.js";
//#region extensions/migrate-claude/provider.ts
function buildClaudeMigrationProvider(params = {}) {
return {
id: "claude",
label: "Claude",
description: "Import Claude Code auto-memory, instructions, MCP servers, and skills.",
supportedItemKinds: ["memory"],
async detect(ctx) {
const source = await discoverClaudeSource(ctx.source);
const found = ctx.itemKinds?.length === 1 && ctx.itemKinds[0] === "memory" ? source.autoMemorySources.length > 0 : hasClaudeSource(source);
return {
found,
source: source.root,
label: "Claude",
confidence: found ? source.confidence : "low",
message: found ? "Claude state found." : "Claude state not found."
};
},
plan: buildClaudePlan,
async apply(ctx, plan) {
return await applyClaudePlan({
ctx,
plan,
runtime: params.runtime
});
}
};
}
//#endregion
export { buildClaudeMigrationProvider as t };