docs: document remaining plugin runtime files

This commit is contained in:
Peter Steinberger
2026-06-04 19:54:07 -04:00
parent d2d14d5793
commit 725ddd11cc
19 changed files with 19 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
// Plugin runtime entrypoint assembles runtime helpers available to activated plugins.
import { getRuntimeConfig } from "../../config/config.js";
import { resolveStateDir } from "../../config/paths.js";
import {

View File

@@ -1,3 +1,4 @@
// Load context tests cover agent and workspace context resolution for plugin runtimes.
import { beforeEach, describe, expect, it, vi } from "vitest";
const loadConfigMock = vi.fn<typeof import("../../config/config.js").loadConfig>();

View File

@@ -1,3 +1,4 @@
// Model auth runtime types describe provider auth state exposed to plugin runtimes.
import type { ResolvedProviderAuth } from "../../agents/model-auth-runtime-shared.js";
import type { ModelProviderRequestTransportOverrides } from "../../agents/provider-request-config.js";

View File

@@ -1,3 +1,4 @@
// Runtime config helpers expose scoped OpenClaw config reads to plugin runtimes.
import { getRuntimeConfig } from "../../config/config.js";
import {
mutateConfigFile as mutateConfigFileInternal,

View File

@@ -1,3 +1,4 @@
// Runtime event helpers bridge core agent events into plugin runtime hooks.
import { onAgentEvent } from "../../infra/agent-events.js";
import { onSessionTranscriptUpdate } from "../../sessions/transcript-events.js";
import type { PluginRuntime } from "./types.js";

View File

@@ -1,3 +1,4 @@
// Runtime LLM tests cover plugin provider hooks inside the model runtime adapter.
import { beforeEach, describe, expect, it, vi } from "vitest";
import { resolveContextEngineCapabilities } from "../../agents/embedded-agent-runner/context-engine-capabilities.js";
import type { OpenClawConfig } from "../../config/types.openclaw.js";

View File

@@ -1,3 +1,4 @@
// Runtime media helpers load and classify media attachments for plugin runtimes.
import { mediaKindFromMime } from "@openclaw/media-core/constants";
import { detectMime } from "@openclaw/media-core/mime";
import { isVoiceCompatibleAudio } from "../../media/audio.js";

View File

@@ -1,3 +1,4 @@
// Runtime model auth helpers expose provider auth resolution to plugin runtimes.
import {
getApiKeyForModel as resolveModelApiKey,
resolveApiKeyForProvider as resolveProviderApiKey,

View File

@@ -1,3 +1,4 @@
// Runtime system helpers expose host system operations to activated plugin runtimes.
import { requestHeartbeat } from "../../infra/heartbeat-wake.js";
import { enqueueSystemEvent } from "../../infra/system-events.js";
import { runCommandWithTimeout } from "../../process/exec.js";

View File

@@ -1,3 +1,4 @@
// Runtime task-flow types describe task-flow hooks and options for plugin runtimes.
import type { OpenClawConfig } from "../../config/types.openclaw.js";
import type { JsonValue, TaskFlowRecord } from "../../tasks/task-flow-registry.types.js";
import type {

View File

@@ -1,3 +1,4 @@
// Runtime task helpers expose task-flow operations to activated plugin runtimes.
import { listTasksForFlowId } from "../../tasks/runtime-internal.js";
import {
mapTaskFlowDetail,

View File

@@ -1,3 +1,4 @@
// Runtime web-channel plugin helpers expose web-channel tools through activated plugin runtimes.
import type { AgentToolResult } from "../../agents/runtime/index.js";
import type { ChannelAgentTool } from "../../channels/plugins/types.core.js";
import type { OpenClawConfig } from "../../config/types.openclaw.js";

View File

@@ -1,3 +1,4 @@
// Core runtime types define system, config, and task helper contracts for plugins.
import type { HeartbeatRunResult } from "../../infra/heartbeat-wake.js";
import type { LogLevel } from "../../logging/levels.js";
import type { MediaUnderstandingRuntime } from "../../media-understanding/runtime-types.js";

View File

@@ -1,3 +1,4 @@
// Archive fixture tests cover plugin archive fixture creation and cleanup helpers.
import fs from "node:fs";
import path from "node:path";
import { afterAll, describe, expect, it } from "vitest";

View File

@@ -1,3 +1,4 @@
// Archive fixture helpers create compressed plugin archives for install and loader tests.
import { spawnSync } from "node:child_process";
import fs from "node:fs";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Cold plugin fixture helpers create plugin packages for cold import and loader tests.
import fs from "node:fs";
import path from "node:path";
import type { OpenClawConfig } from "../../config/types.openclaw.js";

View File

@@ -1,3 +1,4 @@
// Filesystem fixture helpers create plugin filesystem layouts for registry and loader tests.
import fs from "node:fs";
import fsPromises from "node:fs/promises";
import os from "node:os";

View File

@@ -1,3 +1,4 @@
// Managed npm plugin test helpers create package fixtures for managed plugin tests.
import fs from "node:fs";
import path from "node:path";
import { resolvePluginNpmProjectDir } from "../install-paths.js";

View File

@@ -1,3 +1,4 @@
// Registry Jiti mock helpers install Vitest mocks for plugin registry import tests.
import { vi } from "vitest";
const registryJitiMocks = vi.hoisted(() => ({