openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
26 lines (25 loc) • 906 B
JavaScript
import { i as routeLogsToStderr } from "../console-CI_QNGt_.mjs";
import { t as encodeOpenClawStateWorkerError } from "../openclaw-state-worker-error-Bi-BnNrV.mjs";
import { o as inspectOpenClawStateOwnershipInProcess } from "../openclaw-state-ownership-C6zxQPsi.mjs";
//#region src/state/openclaw-state-ownership.worker.ts
function inspect(databasePath) {
try {
if (!databasePath) throw new Error("Shared-state ownership worker requires a database path");
const ownership = inspectOpenClawStateOwnershipInProcess(databasePath);
return {
ok: true,
ownershipJson: JSON.stringify(ownership)
};
} catch (error) {
const workerError = encodeOpenClawStateWorkerError(error, { includeOrdinary: true });
if (!workerError) throw error;
return {
ok: false,
workerError
};
}
}
routeLogsToStderr();
process.stdout.write(JSON.stringify(inspect(process.argv[2])));
//#endregion
export {};