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

Quelle  index.ts

  Sprache: JAVA
 

Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

import {
  defineBundledChannelEntry,
  type OpenClawPluginApi,
} from "openclaw/plugin-sdk/channel-entry-contract";
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
import { registerMatrixCliMetadata } from "./cli-metadata.js";
import { registerMatrixSubagentHooks } from "./subagent-hooks-api.js";

type MatrixHandlersRuntimeModule = typeof import("./plugin-entry.handlers.runtime.js");

let matrixHandlersRuntimePromise: Promise<MatrixHandlersRuntimeModule> | null = null;

function loadMatrixHandlersRuntimeModule() {
  matrixHandlersRuntimePromise ??= import("./plugin-entry.handlers.runtime.js");
  return matrixHandlersRuntimePromise;
}

export function registerMatrixFullRuntime(api: OpenClawPluginApi): void {
  void loadMatrixHandlersRuntimeModule()
    .then(({ ensureMatrixCryptoRuntime }) =>
      ensureMatrixCryptoRuntime({ log: api.logger.info }).catch((err: unknown) => {
        const message = formatErrorMessage(err);
        api.logger.warn?.(`matrix: crypto runtime bootstrap failed: ${message}`);
      }),
    )
    .catch((err: unknown) => {
      const message = formatErrorMessage(err);
      api.logger.warn?.(`matrix: failed loading crypto bootstrap runtime: ${message}`);
    });

  api.registerGatewayMethod("matrix.verify.recoveryKey", async (ctx) => {
    const { handleVerifyRecoveryKey } = await loadMatrixHandlersRuntimeModule();
    await handleVerifyRecoveryKey(ctx);
  });

  api.registerGatewayMethod("matrix.verify.bootstrap", async (ctx) => {
    const { handleVerificationBootstrap } = await loadMatrixHandlersRuntimeModule();
    await handleVerificationBootstrap(ctx);
  });

  api.registerGatewayMethod("matrix.verify.status", async (ctx) => {
    const { handleVerificationStatus } = await loadMatrixHandlersRuntimeModule();
    await handleVerificationStatus(ctx);
  });

  registerMatrixSubagentHooks(api);
}

export default defineBundledChannelEntry({
  id: "matrix",
  name: "Matrix",
  description: "Matrix channel plugin (matrix-js-sdk)",
  importMetaUrl: import.meta.url,
  plugin: {
    specifier: "./channel-plugin-api.js",
    exportName: "matrixPlugin",
  },
  secrets: {
    specifier: "./secret-contract-api.js",
    exportName: "channelSecrets",
  },
  runtime: {
    specifier: "./runtime-setter-api.js",
    exportName: "setMatrixRuntime",
  },
  registerCliMetadata: registerMatrixCliMetadata,
  registerFull: registerMatrixFullRuntime,
});

¤ Dauer der Verarbeitung: 0.17 Sekunden  (vorverarbeitet am  2026-04-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.