Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Openclaw/src/commands/   (KI Agentensystem Version 22©)  Datei vom 26.3.2026 mit Größe 4 kB image not shown  

SSL status.scan-result.test.ts

  Sprache: JAVA
 

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

import { describe, expect, it } from "vitest";
import { buildStatusScanResult } from "./status.scan-result.ts";
import { buildColdStartStatusSummary } from "./status.scan.bootstrap-shared.ts";
import type { GatewayProbeSnapshot } from "./status.scan.shared.ts";

describe("buildStatusScanResult", () => {
  it("builds the full shared scan result shape", () => {
    const osSummary = {
      platform: "linux" as const,
      arch: "x64",
      release: "6.8.0",
      label: "linux 6.8.0 (x64)",
    };
    const update = {
      root: "/tmp/openclaw",
      installKind: "package" as const,
      packageManager: "npm" as const,
    };
    const gatewaySnapshot: Pick<
      GatewayProbeSnapshot,
      | "gatewayConnection"
      | "remoteUrlMissing"
      | "gatewayMode"
      | "gatewayProbeAuth"
      | "gatewayProbeAuthWarning"
      | "gatewayProbe"
      | "gatewayReachable"
      | "gatewaySelf"
    > = {
      gatewayConnection: {
        url: "ws://127.0.0.1:18789",
        urlSource: "config" as const,
        message: "Gateway target: ws://127.0.0.1:18789",
      },
      remoteUrlMissing: false,
      gatewayMode: "local" as const,
      gatewayProbeAuth: { token: "tok" },
      gatewayProbeAuthWarning: "warn",
      gatewayProbe: {
        ok: true,
        url: "ws://127.0.0.1:18789",
        connectLatencyMs: 42,
        error: null,
        close: null,
        auth: {
          role: "operator",
          scopes: ["operator.read"],
          capability: "read_only",
        },
        health: null,
        status: null,
        presence: null,
        configSnapshot: null,
      },
      gatewayReachable: true,
      gatewaySelf: { host: "gateway" },
    };
    const channelIssues = [
      {
        channel: "quietchat",
        accountId: "default",
        kind: "runtime" as const,
        message: "warn",
      },
    ];
    const agentStatus = {
      defaultId: "main",
      totalSessions: 0,
      bootstrapPendingCount: 0,
      agents: [
        {
          id: "main",
          workspaceDir: null,
          bootstrapPending: false,
          sessionsPath: "/tmp/main.json",
          sessionsCount: 0,
          lastUpdatedAt: null,
          lastActiveAgeMs: null,
        },
      ],
    };
    const channels = { rows: [], details: [] };
    const summary = buildColdStartStatusSummary();
    const memory = { agentId: "main", backend: "builtin" as const, provider: "sqlite" };
    const memoryPlugin = { enabled: true, slot: "memory-core" };
    const pluginCompatibility = [
      {
        pluginId: "legacy",
        code: "legacy-before-agent-start" as const,
        compatCode: "legacy-before-agent-start" as const,
        severity: "warn" as const,
        message: "warn",
      },
    ];

    expect(
      buildStatusScanResult({
        cfg: { gateway: {} },
        sourceConfig: { gateway: {} },
        secretDiagnostics: ["diag"],
        osSummary,
        tailscaleMode: "serve",
        tailscaleDns: "box.tail.ts.net",
        tailscaleHttpsUrl: "https://box.tail.ts.net",
        update,
        gatewaySnapshot,
        channelIssues,
        agentStatus,
        channels,
        summary,
        memory,
        memoryPlugin,
        pluginCompatibility,
      }),
    ).toEqual({
      cfg: { gateway: {} },
      sourceConfig: { gateway: {} },
      secretDiagnostics: ["diag"],
      osSummary,
      tailscaleMode: "serve",
      tailscaleDns: "box.tail.ts.net",
      tailscaleHttpsUrl: "https://box.tail.ts.net",
      update,
      gatewayConnection: gatewaySnapshot.gatewayConnection,
      remoteUrlMissing: gatewaySnapshot.remoteUrlMissing,
      gatewayMode: gatewaySnapshot.gatewayMode,
      gatewayProbeAuth: gatewaySnapshot.gatewayProbeAuth,
      gatewayProbeAuthWarning: gatewaySnapshot.gatewayProbeAuthWarning,
      gatewayProbe: gatewaySnapshot.gatewayProbe,
      gatewayReachable: gatewaySnapshot.gatewayReachable,
      gatewaySelf: gatewaySnapshot.gatewaySelf,
      channelIssues,
      agentStatus,
      channels,
      summary,
      memory,
      memoryPlugin,
      pluginCompatibility,
    });
  });
});

¤ Dauer der Verarbeitung: 0.38 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.