mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-15 07:04:01 -06:00
e71ef76e8e
* feat(migrate): add Hermes memory-only import and a shared memory-import core * feat(onboarding): offer detected memory imports during CLI setup and guided onboarding * feat(ui): show a first-run memory-import offer in Control UI onboarding mode * feat(linux-app): open the first-run dashboard in onboarding mode * feat(macos): add the onboarding memory-import page * docs: document the onboarding memory-import page across surfaces * chore(i18n): translate onboarding memory-import strings for control-ui and native locales * refactor: keep memory-import internals unexported for deadcode gates * fix(ci): resolve lint findings in onboarding memory import * chore(i18n): refresh native inventory after lint refactor * fix(ci): skip updater artifacts in the unsigned Linux companion PR lane * chore(i18n): reconcile locale artifacts after rebase
41 lines
1.3 KiB
TypeScript
41 lines
1.3 KiB
TypeScript
// Migrate Hermes provider module implements model/runtime integration.
|
|
import type {
|
|
MigrationPlan,
|
|
MigrationProviderContext,
|
|
MigrationProviderPlugin,
|
|
} from "openclaw/plugin-sdk/plugin-entry";
|
|
import { applyHermesPlan } from "./apply.js";
|
|
import { isMemoryOnlyMigration } from "./memory.js";
|
|
import { buildHermesPlan } from "./plan.js";
|
|
import { discoverHermesSource, hasHermesSource } from "./source.js";
|
|
|
|
export function buildHermesMigrationProvider(
|
|
params: {
|
|
runtime?: MigrationProviderContext["runtime"];
|
|
} = {},
|
|
): MigrationProviderPlugin {
|
|
return {
|
|
id: "hermes",
|
|
label: "Hermes",
|
|
description: "Import Hermes config, memories, skills, and supported credentials.",
|
|
supportedItemKinds: ["memory"],
|
|
async detect(ctx) {
|
|
const source = await discoverHermesSource(ctx.source);
|
|
const found = isMemoryOnlyMigration(ctx)
|
|
? Boolean(source.memoryPath || source.userPath)
|
|
: hasHermesSource(source);
|
|
return {
|
|
found,
|
|
source: source.root,
|
|
label: "Hermes",
|
|
confidence: found ? "high" : "low",
|
|
message: found ? "Hermes state found." : "Hermes state not found.",
|
|
};
|
|
},
|
|
plan: buildHermesPlan,
|
|
async apply(ctx, plan?: MigrationPlan) {
|
|
return await applyHermesPlan({ ctx, plan, runtime: params.runtime });
|
|
},
|
|
};
|
|
}
|