docs: document infra pairing helpers

This commit is contained in:
Peter Steinberger
2026-06-04 03:09:41 -04:00
parent 3c6259ebb7
commit f542e23a2f
24 changed files with 24 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
// Covers approval-not-found error detection.
import { describe, expect, it } from "vitest";
import { isApprovalNotFoundError } from "./approval-errors.js";

View File

@@ -1,3 +1,4 @@
// Exposes archive extraction helpers after applying fs-safe defaults.
import "./fs-safe-defaults.js";
// Archive extraction facade for size limits, staged writes, and traversal checks.

View File

@@ -1,3 +1,4 @@
// Exposes root-scoped file open helpers with fs-safe defaults.
import "./fs-safe-defaults.js";
// Root-scoped file open helpers. Use these for user paths that must stay under

View File

@@ -1,3 +1,4 @@
// Covers persistent device auth token storage and clearing.
import fs from "node:fs/promises";
import path from "node:path";
import { describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Stores and converts the gateway/device Ed25519 identity.
import crypto from "node:crypto";
import fs from "node:fs";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Manages device pairing requests, approvals, and token issuance.
import { randomUUID } from "node:crypto";
import { normalizeUniqueSingleOrTrimmedStringList } from "@openclaw/normalization-core/string-normalization";
import { normalizeDeviceAuthScopes } from "../shared/device-auth.js";

View File

@@ -1,3 +1,4 @@
// Runs the gateway-backed runtime that delivers native approval events.
import { readConnectErrorDetailCode } from "../../packages/gateway-protocol/src/connect-error-details.js";
import type { EventFrame } from "../../packages/gateway-protocol/src/index.js";
import { startGatewayClientWhenEventLoopReady } from "../gateway/client-start-readiness.js";

View File

@@ -1,3 +1,4 @@
// Covers shell parser and wrapper-resolution parity fixtures.
import path from "node:path";
import { describe, expect, it } from "vitest";
import {

View File

@@ -1,3 +1,4 @@
// Covers conservative default exec auto-review decisions.
import { describe, expect, it } from "vitest";
import { defaultExecAutoReviewer, type ExecAutoReviewInput } from "./exec-auto-review.js";

View File

@@ -1,3 +1,4 @@
// Covers heartbeat wake cooldown and flood-deferral decisions.
import { describe, expect, it } from "vitest";
import {
DEFAULT_FLOOD_THRESHOLD,

View File

@@ -1,3 +1,4 @@
// Covers heartbeat skipping while session lanes or cron jobs are busy.
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { resolveNestedAgentLaneForSession } from "../agents/lanes.js";
import {

View File

@@ -1,3 +1,4 @@
// Covers heartbeat tool-response handling and visible reply policy.
import fs from "node:fs/promises";
import path from "node:path";
import { afterEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Covers heartbeat visibility resolution across defaults and accounts.
import { describe, expect, it } from "vitest";
import type { OpenClawConfig } from "../config/config.js";
import { resolveHeartbeatVisibility } from "./heartbeat-visibility.js";

View File

@@ -1,3 +1,4 @@
// Covers safe network interface enumeration and address selection.
import { describe, expect, it } from "vitest";
import { makeNetworkInterfacesSnapshot } from "../test-helpers/network-interfaces.js";
import {

View File

@@ -1,3 +1,4 @@
// Inspects installed package metadata for update/install verification.
import fsSync from "node:fs";
import path from "node:path";
import { readRootJsonObjectSync } from "@openclaw/fs-safe/json";

View File

@@ -1,3 +1,4 @@
// Shared JSON state helpers for pairing namespaces.
import path from "node:path";
import { resolveStateDir } from "../config/paths.js";

View File

@@ -1,3 +1,4 @@
// Exposes cross-platform permission inspection helpers with fs-safe defaults.
import "./fs-safe-defaults.js";
// Permission inspection facades expose fs-safe POSIX and Windows ACL helpers

View File

@@ -1,3 +1,4 @@
// Resolves provider usage auth tokens from profiles, plugins, and env.
import { normalizeUniqueStringEntries } from "@openclaw/normalization-core/string-normalization";
import {
dedupeProfileIds,

View File

@@ -1,3 +1,4 @@
// Wraps fs-safe atomic replacement and move helpers for OpenClaw install flows.
import "./fs-safe-defaults.js";
import fs from "node:fs/promises";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Exposes root-scoped path resolution helpers with fs-safe defaults.
import "./fs-safe-defaults.js";
// Root path helpers resolve writable and existing paths without allowing

View File

@@ -1,3 +1,4 @@
// Covers in-memory system presence merging and expiry behavior.
import { randomUUID } from "node:crypto";
import { afterEach, describe, expect, it, vi } from "vitest";
import { listSystemPresence, updateSystemPresence, upsertPresence } from "./system-presence.js";

View File

@@ -1,3 +1,4 @@
// Verifies serialized system-run approval mismatch contract fixtures.
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";

View File

@@ -1,3 +1,4 @@
// Normalizes and validates system-run commands before approval binding.
import {
extractShellWrapperCommand,
hasEnvManipulationBeforeShellWrapper,

View File

@@ -1,3 +1,4 @@
// Covers transient and benign unhandled rejection classifiers.
import { describe, expect, it } from "vitest";
import {
isAbortError,