refactor: remove unused support exports
Some checks failed
CI / Test (${{ matrix.os }}) (macos-latest) (push) Has been cancelled
CI / Test (${{ matrix.os }}) (ubuntu-latest) (push) Has been cancelled

This commit is contained in:
Shakker 2026-05-05 07:03:13 +01:00
parent 55849f3907
commit b888d4eda1
No known key found for this signature in database
2 changed files with 0 additions and 29 deletions

View File

@ -8,7 +8,6 @@ export const coveragePolicyKeys = [
"requirements"
];
export const primaryCoveragePolicyKeys = ["platforms", "requirements"];
export const derivedCoveragePolicyKeys = ["surfaces", "scenarios", "states", "traits", "stateSurfaces"];
export function normalizeCoveragePolicy(coverage) {

View File

@ -1,22 +1,6 @@
import { pathToFileURL } from "node:url";
import path from "node:path";
import { dirname } from "node:path";
import { execFileSync } from "node:child_process";
export async function importOpenClawDistModule(relativePath) {
const packageRoot = process.cwd();
const absolutePath = path.join(packageRoot, "dist", ...relativePath.split("/"));
try {
return await import(pathToFileURL(absolutePath).href);
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
throw new Error(
`failed to import OpenClaw runtime module ${relativePath} from ${packageRoot}: ${message}. ` +
"Kova user-message scenarios require a built/release-shaped OpenClaw runtime."
);
}
}
export function prepareOpenClawRuntimeFromOcmEnv(envName) {
if (!envName) {
throw new Error("--env is required");
@ -96,18 +80,6 @@ export function runOcmJson(args) {
}
}
export function runOcmText(args) {
try {
return execFileSync("ocm", args, {
encoding: "utf8",
stdio: ["ignore", "pipe", "pipe"]
});
} catch (error) {
const stderr = error?.stderr ? String(error.stderr) : "";
throw new Error(`ocm ${args.join(" ")} failed: ${stderr.trim() || error.message}`);
}
}
function readRequiredString(value, label) {
if (typeof value !== "string" || value.trim().length === 0) {
throw new Error(`${label} missing`);