Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/JAVA/Openclaw/extensions/matrix/src/   (Openclaw AI Version 22©)  Datei vom 26.3.2026 mit Größe 1 kB image not shown  

Quelle  migration-snapshot.ts

  Sprache: JAVA
 

import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
import { detectLegacyMatrixCrypto } from "./legacy-crypto.js";
import { detectLegacyMatrixState } from "./legacy-state.js";
import {
  maybeCreateMatrixMigrationSnapshot,
  resolveMatrixMigrationSnapshotMarkerPath,
  resolveMatrixMigrationSnapshotOutputDir,
  type MatrixMigrationSnapshotResult,
} from "./migration-snapshot-backup.js";

export type MatrixMigrationStatus = {
  legacyState: ReturnType<typeof detectLegacyMatrixState>;
  legacyCrypto: ReturnType<typeof detectLegacyMatrixCrypto>;
  pending: boolean;
  actionable: boolean;
};

export function resolveMatrixMigrationStatus(params: {
  cfg: OpenClawConfig;
  env?: NodeJS.ProcessEnv;
}): MatrixMigrationStatus {
  const env = params.env ?? process.env;
  const legacyState = detectLegacyMatrixState({ cfg: params.cfg, env });
  const legacyCrypto = detectLegacyMatrixCrypto({ cfg: params.cfg, env });
  const actionableLegacyState = legacyState !== null && !("warning" in legacyState);
  const actionableLegacyCrypto = legacyCrypto.plans.length > 0 && legacyCrypto.inspectorAvailable;
  return {
    legacyState,
    legacyCrypto,
    pending:
      legacyState !== null || legacyCrypto.plans.length > 0 || legacyCrypto.warnings.length > 0,
    actionable: actionableLegacyState || actionableLegacyCrypto,
  };
}

export function hasPendingMatrixMigration(params: {
  cfg: OpenClawConfig;
  env?: NodeJS.ProcessEnv;
}): boolean {
  return resolveMatrixMigrationStatus(params).pending;
}

export function hasActionableMatrixMigration(params: {
  cfg: OpenClawConfig;
  env?: NodeJS.ProcessEnv;
}): boolean {
  return resolveMatrixMigrationStatus(params).actionable;
}

export {
  maybeCreateMatrixMigrationSnapshot,
  resolveMatrixMigrationSnapshotMarkerPath,
  resolveMatrixMigrationSnapshotOutputDir,
};
export type { MatrixMigrationSnapshotResult };

Messung V0.5 in Prozent
C=100 H=100 G=100

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-06-07) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.