mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
docs: document infra install helpers
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Resolves exec and plugin approvals through the gateway client.
|
||||
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
||||
import { withOperatorApprovalsGatewayClient } from "../gateway/operator-approvals-client.js";
|
||||
import { isApprovalNotFoundError } from "./approval-errors.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Fetches and validates ClawHub package metadata and artifacts.
|
||||
import { createHash } from "node:crypto";
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Resolves diagnostics feature flags from config and environment.
|
||||
import { normalizeLowercaseStringOrEmpty } from "@openclaw/normalization-core/string-coerce";
|
||||
import { normalizeUniqueStringEntriesLower } from "@openclaw/normalization-core/string-normalization";
|
||||
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Records structured diagnostics timeline events and spans.
|
||||
import { AsyncLocalStorage } from "node:async_hooks";
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { mkdirSync } from "node:fs";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Resolves native approval support for the initiating channel surface.
|
||||
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
|
||||
import {
|
||||
getChannelPlugin,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers request header normalization before fetch calls.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
normalizeHeadersInitForFetch,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers fixed-window rate limiter boundaries.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { createFixedWindowRateLimiter } from "./fixed-window-rate-limit.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers heartbeat ack truncation limits.
|
||||
import fs from "node:fs/promises";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Installs validated registry npm specs through archive install helpers.
|
||||
import type { NpmIntegrityDriftPayload } from "./npm-integrity.js";
|
||||
import {
|
||||
finalizeNpmSpecArchiveInstall,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Resolves common install/update mode options.
|
||||
type InstallMode = "install" | "update";
|
||||
|
||||
type InstallModeOptions<TLogger> = {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers safe plugin install path normalization and boundary checks.
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Provides safe path helpers for plugin installation targets.
|
||||
import "./fs-safe-defaults.js";
|
||||
export {
|
||||
assertCanonicalPathWithinBase,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers scope requirements for node pairing approvals.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { resolveNodePairApprovalScopes } from "./node-pairing-authz.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Resolves the OpenClaw package root from runtime and package metadata.
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { openClawRootFs, openClawRootFsSync } from "./openclaw-root.fs.runtime.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Exposes private temp workspace helpers with fs-safe defaults.
|
||||
import "./fs-safe-defaults.js";
|
||||
|
||||
// Private temp workspaces isolate downloads and generated artifacts under a
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers shared provider usage fetch parsing and error snapshots.
|
||||
import { MAX_TIMER_TIMEOUT_MS } from "@openclaw/normalization-core/number-coercion";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { withFetchPreconnect } from "../test-utils/fetch-mock.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers provider usage report formatting.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
formatUsageReportLines,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Exposes regular-file IO helpers with fs-safe defaults.
|
||||
import "./fs-safe-defaults.js";
|
||||
|
||||
// Regular-file IO helpers reject symlinks and non-file targets before reads or
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Recovers queued session deliveries after process crashes.
|
||||
import {
|
||||
resolveDateTimestampMs,
|
||||
resolveExpiresAtMsFromDurationMs,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers system-run approval binding normalization and matching.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
buildSystemRunApprovalBinding,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers package manager resolution for update build flows.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
resolveUpdateBuildManager,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Builds restart sentinel payloads for update handoff reporting.
|
||||
import {
|
||||
buildRestartSuccessContinuation,
|
||||
formatDoctorNonInteractiveHint,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers Windows command-output code page parsing and decoding.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
createWindowsOutputDecoder,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers WSL detection from platform and release files.
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { captureEnv } from "../test-utils/env.js";
|
||||
import { mockProcessPlatform } from "../test-utils/vitest-spies.js";
|
||||
|
||||
Reference in New Issue
Block a user