Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  mcp-channels-seed.ts

  Sprache: JAVA
 

import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import { applyDockerOpenAiProviderConfig, type OpenClawConfig } from "./docker-openai-seed.ts";

async function main() {
  const stateDir = process.env.OPENCLAW_STATE_DIR?.trim() || path.join(os.homedir(), ".openclaw");
  const configPath =
    process.env.OPENCLAW_CONFIG_PATH?.trim() || path.join(stateDir, "openclaw.json");
  const sessionsDir = path.join(stateDir, "agents""main""sessions");
  const sessionFile = path.join(sessionsDir, "sess-main.jsonl");
  const storePath = path.join(sessionsDir, "sessions.json");
  const now = Date.now();

  await fs.mkdir(sessionsDir, { recursive: true });
  await fs.mkdir(path.dirname(configPath), { recursive: true });

  const seededConfig = applyDockerOpenAiProviderConfig(
    {
      gateway: {
        controlUi: {
          allowInsecureAuth: true,
          enabled: false,
        },
      },
    } satisfies OpenClawConfig,
    "sk-docker-smoke-test",
  );

  await fs.writeFile(configPath, JSON.stringify(seededConfig, null2), "utf-8");

  await fs.writeFile(
    storePath,
    JSON.stringify(
      {
        "agent:main:main": {
          sessionId: "sess-main",
          sessionFile,
          updatedAt: now,
          lastChannel: "imessage",
          lastTo: "+15551234567",
          lastAccountId: "imessage-default",
          lastThreadId: "thread-42",
          displayName: "Docker MCP Channel Smoke",
          derivedTitle: "Docker MCP Channel Smoke",
          lastMessagePreview: "seeded transcript",
        },
      },
      null,
      2,
    ),
    "utf-8",
  );

  await fs.writeFile(
    sessionFile,
    [
      JSON.stringify({ type: "session", version: 1, id: "sess-main" }),
      JSON.stringify({
        id: "msg-1",
        message: {
          role: "assistant",
          content: [{ type: "text", text: "hello from seeded transcript" }],
          timestamp: now,
        },
      }),
      JSON.stringify({
        id: "msg-attachment",
        message: {
          role: "assistant",
          content: [
            { type: "text", text: "seeded image attachment" },
            {
              type: "image",
              source: {
                type: "base64",
                media_type: "image/png",
                data: "abc",
              },
            },
          ],
          timestamp: now + 1,
        },
      }),
    ].join("\n") + "\n",
    "utf-8",
  );

  process.stdout.write(
    JSON.stringify({
      ok: true,
      stateDir,
      configPath,
      storePath,
      sessionFile,
    }) + "\n",
  );
}

await main();

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

¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge