docs: document command support batch

This commit is contained in:
Peter Steinberger
2026-06-04 18:52:07 -04:00
parent 4a47a9db98
commit 0de924b35c
20 changed files with 21 additions and 7 deletions

View File

@@ -1,3 +1,4 @@
// Agent command test mocks replace logging and runtime-heavy modules shared by agent command suites.
import { vi } from "vitest";
vi.mock("../logging/subsystem.js", () => {
@@ -197,13 +198,7 @@ vi.mock("../agents/model-selection.js", () => {
resolveDefaultRef(cfg),
),
resolveModelRefFromString: vi.fn(
({
raw,
defaultProvider,
}: {
raw: string;
defaultProvider?: string;
}) => {
({ raw, defaultProvider }: { raw: string; defaultProvider?: string }) => {
const ref = parseModelRef(raw, defaultProvider ?? "openai");
return ref ? { ref, source: "parsed" } : null;
},

View File

@@ -1,3 +1,4 @@
// Agent binding test support centralizes mocked channel plugin registries and lazy imports.
import type { Mock } from "vitest";
import { vi } from "vitest";
import type { OpenClawConfig } from "../config/types.openclaw.js";

View File

@@ -1,3 +1,4 @@
// Backup atomicity tests cover temp-file writes, rollback behavior, and backup archive consistency.
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Backup create/verify tests cover archive creation, runtime output, and verification failure handling.
import { describe, expect, it, vi } from "vitest";
import type { RuntimeEnv } from "../runtime.js";
import { backupCreateCommand } from "./backup.js";

View File

@@ -1,3 +1,4 @@
// Channels config-only status tests cover fallback output when gateway status is unavailable.
import { describe, expect, it, vi } from "vitest";
import type { ChannelPlugin } from "../channels/plugins/types.js";
import { makeDirectPlugin } from "../test-utils/channel-plugin-test-fixtures.js";

View File

@@ -1,3 +1,4 @@
// Doctor auth alias tests cover canonical API-key profile repair and auth-profile store migration.
import fs from "node:fs";
import path from "node:path";
import { afterEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Doctor browser facade tests cover legacy browser residue detection and browser doctor repair wiring.
import { beforeEach, describe, expect, it, vi } from "vitest";
import type { OpenClawConfig } from "../config/config.js";
import {

View File

@@ -1,3 +1,4 @@
// Doctor config-flow tests cover config repair, migration, stripping, and validation orchestration.
import fs from "node:fs/promises";
import path from "node:path";
import { withTempHome } from "openclaw/plugin-sdk/test-env";

View File

@@ -1,3 +1,4 @@
// Doctor legacy-config tests cover compatibility normalizers for old channel, browser, and config shapes.
import { describe, expect, it } from "vitest";
import { normalizeLegacyStreamingAliases } from "../config/channel-compat-normalization.js";
import type { OpenClawConfig } from "../config/config.js";

View File

@@ -1,3 +1,4 @@
// Doctor lint tests cover health-check registry integration and lint warning output.
import { beforeEach, describe, expect, it, vi } from "vitest";
import type { OpenClawConfig } from "../config/types.openclaw.js";
import { resetCoreHealthChecksForTest } from "../flows/doctor-core-checks.js";

View File

@@ -1,3 +1,4 @@
// Doctor state integrity cloud-storage tests cover macOS cloud-synced state directory detection.
import os from "node:os";
import path from "node:path";
import { describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Doctor update tests cover pre-doctor update prompts, state files, and declined update flows.
import fs from "node:fs/promises";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { maybeOfferUpdateBeforeDoctor } from "./doctor-update.js";

View File

@@ -1,3 +1,4 @@
// Flows command tests cover task creation, task execution, and runtime command output.
import { afterEach, describe, expect, it, vi } from "vitest";
import type { RuntimeEnv } from "../runtime.js";
import { createRunningTaskRun as createRunningTaskRunOrNull } from "../tasks/task-executor.js";

View File

@@ -1,3 +1,4 @@
// Non-interactive gateway health auth tests cover SecretRef and password resolution for setup probes.
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Non-interactive onboarding test helpers build runtime stubs that throw instead of exiting.
import type { RuntimeEnv } from "../runtime.js";
type RuntimeLike = Pick<RuntimeEnv, "log" | "error" | "exit">;

View File

@@ -1,3 +1,4 @@
// Onboard remote tests cover remote gateway prompts, Bonjour discovery, and remote config mutation.
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { OpenClawConfig } from "../config/config.js";
import type { GatewayBonjourBeacon } from "../infra/bonjour-discovery.js";

View File

@@ -1,3 +1,4 @@
// Sandbox command tests cover browser/container status formatting and sandbox diagnostics.
import { beforeEach, describe, expect, it, vi } from "vitest";
import type { SandboxBrowserInfo, SandboxContainerInfo } from "../agents/sandbox.js";

View File

@@ -1,3 +1,4 @@
// Session command test helpers create temporary homes, session stores, and runtime fixtures.
import { randomUUID } from "node:crypto";
import fs from "node:fs";
import os from "node:os";

View File

@@ -1,3 +1,4 @@
// Status overview row tests cover status-all overview values, update metadata, and display rows.
import { describe, expect, it } from "vitest";
import { VERSION } from "../version.js";
import {

View File

@@ -1,3 +1,4 @@
// Status scan execute tests cover overview-driven status probe execution and memory snapshot aggregation.
import { beforeEach, describe, expect, it, vi } from "vitest";
import { executeStatusScanFromOverview } from "./status.scan-execute.ts";
import type { StatusScanOverviewResult } from "./status.scan-overview.ts";