docs: document root and music generation helpers

This commit is contained in:
Peter Steinberger
2026-06-04 02:47:44 -04:00
parent c1aa424d6b
commit 2db057423b
24 changed files with 24 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
// Tests compile-cache child-process spawning and environment propagation.
import type { ChildProcess } from "node:child_process";
import { EventEmitter } from "node:events";
import fs from "node:fs/promises";

View File

@@ -1,3 +1,4 @@
// Respawns the CLI with adjusted process flags when startup requires it.
import { spawn, type ChildProcess } from "node:child_process";
import path from "node:path";
import { resolveNodeStartupTlsEnvironment } from "./bootstrap/node-startup-env.js";

View File

@@ -1,3 +1,4 @@
// Tests root help fast-path handling before full CLI startup.
import { describe, expect, it, vi } from "vitest";
import { tryHandlePrecomputedCommandHelpFastPath, tryHandleRootHelpFastPath } from "./entry.js";

View File

@@ -1,3 +1,4 @@
// Tests version fast-path output before the full entrypoint loads.
import { describe, expect, it, vi } from "vitest";
import { tryHandleRootVersionFastPath } from "./entry.version-fast-path.js";

View File

@@ -1,3 +1,4 @@
// Stores process-global CLI flags shared by command modules.
let globalVerbose = false;
let globalYes = false;

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env node
// Package executable entrypoint that forwards to the CLI bootstrap.
import process from "node:process";
import { fileURLToPath } from "node:url";
import { formatCliFailureLines } from "./cli/failure-output.js";

View File

@@ -1,3 +1,4 @@
// Public library facade for consumers embedding OpenClaw reply runtime APIs.
import type { getReplyFromConfig as getReplyFromConfigRuntime } from "./auto-reply/reply.runtime.js";
import { applyTemplate } from "./auto-reply/templating.js";
import { createDefaultDeps } from "./cli/deps.js";

View File

@@ -1,3 +1,4 @@
// Tests root logger formatting and file output behavior.
import fs from "node:fs";
import path from "node:path";
import { afterEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Public logging facade for console logger settings and styling.
import type { ConsoleLoggerSettings, ConsoleStyle } from "./logging/console.js";
import {
enableConsoleCapture,

View File

@@ -1,3 +1,4 @@
// Tests music generation capability matching and normalization.
import { describe, expect, it } from "vitest";
import {
listSupportedMusicGenerationModes,

View File

@@ -1,3 +1,4 @@
// Defines capability checks for music generation providers and models.
import type {
MusicGenerationEditCapabilities,
MusicGenerationMode,

View File

@@ -1,3 +1,4 @@
// Live-test helpers for music generation provider configuration.
import type { OpenClawConfig } from "../config/types.js";
import {
parseLiveCsvFilter,

View File

@@ -1,3 +1,4 @@
// Parses model references for music generation requests.
import { parseGenerationModelRef } from "../../packages/media-generation-core/src/model-ref.js";
/**

View File

@@ -1,3 +1,4 @@
// Normalizes music generation requests into provider-ready payloads.
import {
hasMediaNormalizationEntry,
normalizeDurationToClosestMax,

View File

@@ -1,3 +1,4 @@
// Validates and normalizes provider asset attachments for music generation.
import { maxBytesForKind } from "@openclaw/media-core/constants";
import { extensionForMime } from "@openclaw/media-core/mime";
import { readResponseWithLimit } from "@openclaw/media-core/read-response-with-limit";

View File

@@ -1,3 +1,4 @@
// Registers music generation provider runtimes by normalized provider id.
import { normalizeProviderId } from "../agents/model-selection.js";
import type { OpenClawConfig } from "../config/types.js";
import { isBlockedObjectKey } from "../infra/prototype-keys.js";

View File

@@ -1,3 +1,4 @@
// Runtime dependency contracts for music generation provider execution.
import type { AuthProfileStore } from "../agents/auth-profiles/types.js";
import type { FallbackAttempt } from "../agents/model-fallback.types.js";
import type { OpenClawConfig } from "../config/types.openclaw.js";

View File

@@ -1,3 +1,4 @@
// Tests music generation runtime dispatch and provider fallback behavior.
import { beforeEach, describe, expect, it } from "vitest";
import type { OpenClawConfig } from "../config/types.js";
import {

View File

@@ -1,3 +1,4 @@
// Runs music generation requests through provider runtimes and fallbacks.
import type { FallbackAttempt } from "../agents/model-fallback.types.js";
import { resolveAgentModelTimeoutMsValue } from "../config/model-input.js";
import type { OpenClawConfig } from "../config/types.openclaw.js";

View File

@@ -1,3 +1,4 @@
// Shared music generation request, response, and provider type contracts.
import type { MediaNormalizationEntry } from "../../packages/media-generation-core/src/normalization.js";
import type { AuthProfileStore } from "../agents/auth-profiles/types.js";
import type { OpenClawConfig } from "../config/types.openclaw.js";

View File

@@ -1,3 +1,4 @@
// Normalizes parameter keys while preserving user-visible whitespace where needed.
import { lowercasePreservingWhitespace } from "@openclaw/normalization-core/string-coerce";
function toSnakeCaseKey(key: string): string {

View File

@@ -1,3 +1,4 @@
// Tests plugin activation boundaries during root package startup.
import { describe, expect, it, vi } from "vitest";
import { normalizeModelRef } from "./agents/model-selection-normalize.js";
import { isStaticallyChannelConfigured } from "./config/channel-configured-shared.js";

View File

@@ -1,3 +1,4 @@
// Tests poll input contracts and option defaults.
import { describe, expect, it } from "vitest";
import { normalizePollDurationHours, normalizePollInput } from "./polls.js";

View File

@@ -1,3 +1,4 @@
// Resolves package version metadata for CLI and library callers.
import { createRequire } from "node:module";
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";