mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
docs: document remaining src helpers
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Context engine tests cover context extraction and prompt context assembly.
|
||||
import type { AgentMessage } from "openclaw/plugin-sdk/agent-core";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { MemoryCitationsMode } from "../config/types.memory.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Context engine host compatibility tests cover host API compatibility behavior.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
assertContextEngineHostSupport,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// I18n registry tests cover locale bundle lookup and fallback behavior.
|
||||
import fs from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Interactive payload tests cover validation of interactive response payloads.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
hasReplyChannelData,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Interactive payload helpers normalize structured interactive UI payloads.
|
||||
import { asOptionalRecord as toRecord } from "@openclaw/normalization-core/record-coerce";
|
||||
import {
|
||||
normalizeOptionalLowercaseString,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Memory host dreaming tests cover dreaming artifact persistence and lookup.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Memory host dreaming helpers record and load memory dreaming artifacts.
|
||||
import path from "node:path";
|
||||
import { asNullableRecord } from "@openclaw/normalization-core/record-coerce";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Memory host event helpers append and read memory host event logs.
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { appendRegularFile } from "../infra/fs-safe.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Memory host backend config tests cover backend configuration normalization.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { resolveMemoryBackendConfig as packageResolveMemoryBackendConfig } from "../../../packages/memory-host-sdk/src/host/backend-config.js";
|
||||
import { resolveMemoryBackendConfig } from "./backend-config.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Plugin state store E2E tests cover persisted plugin state across runtime calls.
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { withOpenClawTestState } from "../test-utils/openclaw-test-state.js";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Plugin state runtime tests cover runtime-backed plugin state storage.
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { resolveStateDir } from "../config/paths.js";
|
||||
import type { PluginRecord } from "../plugins/registry-types.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Plugin state SQLite helpers persist plugin state in the OpenClaw state database.
|
||||
import type { DatabaseSync } from "node:sqlite";
|
||||
import { resolveExpiresAtMsFromDurationMs } from "@openclaw/normalization-core/number-coercion";
|
||||
import type { Insertable, Selectable } from "kysely";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Plugin state test helpers seed SQLite plugin state fixtures.
|
||||
import { seedPluginStateDatabaseEntriesForTests } from "./plugin-state-store.sqlite.js";
|
||||
|
||||
// Test-only seed helpers for plugin state. Values are serialized through the
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Plugin state store tests cover per-plugin persisted state reads and writes.
|
||||
import { rmSync, statSync } from "node:fs";
|
||||
import path from "node:path";
|
||||
import { MAX_DATE_TIMESTAMP_MS } from "@openclaw/normalization-core/number-coercion";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Plugin state store exposes persisted per-plugin state operations.
|
||||
import { closeOpenClawStateDatabaseForTest } from "../state/openclaw-state-db.js";
|
||||
import {
|
||||
clearPluginStateDatabaseForTests,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Provider operation retry tests cover retry timing and abort behavior.
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
executeProviderOperationWithRetry,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Provider operation retry helpers run retryable provider operations with backoff.
|
||||
import { sleepWithAbort } from "../infra/backoff.js";
|
||||
import { formatErrorMessage } from "../infra/errors.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Realtime transcription provider registry stores transcription provider factories.
|
||||
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
||||
import {
|
||||
resolvePluginCapabilityProvider,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Realtime transcription provider types describe streaming transcription providers.
|
||||
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
||||
|
||||
// Public contracts for realtime transcription provider plugins and sessions.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Realtime transcription websocket tests cover websocket session lifecycle.
|
||||
import { createServer } from "node:http";
|
||||
import type { AddressInfo } from "node:net";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Realtime transcription websocket session streams audio to transcription providers.
|
||||
import { randomUUID } from "node:crypto";
|
||||
import WebSocket, { type RawData } from "ws";
|
||||
import { createDebugProxyWebSocketAgent, resolveDebugProxySettings } from "../proxy-capture/env.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Agent runtime label helpers format provider, model, and runtime labels.
|
||||
import {
|
||||
normalizeOptionalLowercaseString,
|
||||
normalizeOptionalString,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Fallback notice state helpers track fallback notices shown to users.
|
||||
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
|
||||
import { areRuntimeModelRefsEquivalent } from "../agents/model-runtime-aliases.js";
|
||||
import type { SessionEntry } from "../config/sessions.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Status message tests cover status message formatting and persistence.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { formatFastModeLabel } from "./status-labels.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Status message helpers read and format stored status messages.
|
||||
import fs from "node:fs";
|
||||
import {
|
||||
normalizeLowercaseStringOrEmpty,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Status text helpers render runtime status summaries for CLI output.
|
||||
import os from "node:os";
|
||||
import { normalizeOptionalLowercaseString } from "@openclaw/normalization-core/string-coerce";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Status text types describe runtime status records used by status rendering.
|
||||
import type {
|
||||
ElevatedLevel,
|
||||
ReasoningLevel,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Web search runtime types describe search provider factories and dependencies.
|
||||
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
||||
import type {
|
||||
PluginWebSearchProviderEntry,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Web search runtime tests cover provider resolution and search execution.
|
||||
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Web search runtime resolves configured search providers and executes searches.
|
||||
import {
|
||||
normalizeLowercaseStringOrEmpty,
|
||||
normalizeOptionalLowercaseString,
|
||||
|
||||
Reference in New Issue
Block a user