docs: document remaining src helpers

This commit is contained in:
Peter Steinberger
2026-06-04 20:34:26 -04:00
parent b2e320dfb1
commit edb920b857
30 changed files with 30 additions and 0 deletions

View File

@@ -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";

View File

@@ -1,3 +1,4 @@
// Context engine host compatibility tests cover host API compatibility behavior.
import { describe, expect, it } from "vitest";
import {
assertContextEngineHostSupport,

View File

@@ -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";

View File

@@ -1,3 +1,4 @@
// Interactive payload tests cover validation of interactive response payloads.
import { describe, expect, it } from "vitest";
import {
hasReplyChannelData,

View File

@@ -1,3 +1,4 @@
// Interactive payload helpers normalize structured interactive UI payloads.
import { asOptionalRecord as toRecord } from "@openclaw/normalization-core/record-coerce";
import {
normalizeOptionalLowercaseString,

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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";

View File

@@ -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";

View File

@@ -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 {

View File

@@ -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";

View File

@@ -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";

View File

@@ -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

View File

@@ -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";

View File

@@ -1,3 +1,4 @@
// Plugin state store exposes persisted per-plugin state operations.
import { closeOpenClawStateDatabaseForTest } from "../state/openclaw-state-db.js";
import {
clearPluginStateDatabaseForTests,

View File

@@ -1,3 +1,4 @@
// Provider operation retry tests cover retry timing and abort behavior.
import { describe, expect, it, vi } from "vitest";
import {
executeProviderOperationWithRetry,

View File

@@ -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";

View File

@@ -1,3 +1,4 @@
// Realtime transcription provider registry stores transcription provider factories.
import type { OpenClawConfig } from "../config/types.openclaw.js";
import {
resolvePluginCapabilityProvider,

View File

@@ -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.

View File

@@ -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";

View File

@@ -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";

View File

@@ -1,3 +1,4 @@
// Agent runtime label helpers format provider, model, and runtime labels.
import {
normalizeOptionalLowercaseString,
normalizeOptionalString,

View File

@@ -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";

View File

@@ -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";

View File

@@ -1,3 +1,4 @@
// Status message helpers read and format stored status messages.
import fs from "node:fs";
import {
normalizeLowercaseStringOrEmpty,

View File

@@ -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 {

View File

@@ -1,3 +1,4 @@
// Status text types describe runtime status records used by status rendering.
import type {
ElevatedLevel,
ReasoningLevel,

View File

@@ -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,

View File

@@ -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";

View File

@@ -1,3 +1,4 @@
// Web search runtime resolves configured search providers and executes searches.
import {
normalizeLowercaseStringOrEmpty,
normalizeOptionalLowercaseString,