docs: document repository scripts

This commit is contained in:
Peter Steinberger
2026-06-04 20:52:36 -04:00
parent 95d51c5fe8
commit b8d08f0cfd
173 changed files with 195 additions and 19 deletions

View File

@@ -1,3 +1,4 @@
// Cron Mcp Cleanup Docker Client script supports OpenClaw repository automation.
import { execFile } from "node:child_process";
import { randomUUID } from "node:crypto";
import fs from "node:fs/promises";

View File

@@ -1,3 +1,4 @@
// Cron Mcp Cleanup Seed script supports OpenClaw repository automation.
import fs from "node:fs/promises";
import { createRequire } from "node:module";
import os from "node:os";

View File

@@ -1,3 +1,4 @@
// Session Log Mentions script supports OpenClaw repository automation.
import fs from "node:fs/promises";
import path from "node:path";
import { readPositiveIntEnv } from "./env-limits.mjs";

View File

@@ -1,3 +1,4 @@
// Temp State Dir script supports OpenClaw repository automation.
import { rmSync } from "node:fs";
import fs from "node:fs/promises";
import os from "node:os";

View File

@@ -1,3 +1,4 @@
// Mcp Channel Limits script supports OpenClaw repository automation.
import { readPositiveIntEnv } from "./lib/env-limits.mjs";
export type McpChannelLimits = {

View File

@@ -1,3 +1,4 @@
// Mcp Channels Docker Client script supports OpenClaw repository automation.
import { randomUUID } from "node:crypto";
import {
assert,

View File

@@ -1,3 +1,4 @@
// Mcp Channels Seed script supports OpenClaw repository automation.
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Mcp Client Temp State script supports OpenClaw repository automation.
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Mcp Code Mode Gateway Client script supports OpenClaw repository automation.
import path from "node:path";
import { setTimeout as setNodeTimeout, clearTimeout as clearNodeTimeout } from "node:timers";
import { pathToFileURL } from "node:url";

View File

@@ -1,3 +1,4 @@
// Mcp Code Mode Gateway Seed script supports OpenClaw repository automation.
import fs from "node:fs/promises";
import { createRequire } from "node:module";
import os from "node:os";

View File

@@ -1,3 +1,4 @@
// Mcp Connect Timeout script supports OpenClaw repository automation.
type McpConnectTransport = {
close?(): Promise<void> | void;
};

View File

@@ -1,3 +1,4 @@
// Mcp Websocket Open script supports OpenClaw repository automation.
type WebSocketOpenHandle = {
close?: () => void;
off?: (event: "open" | "error" | "close", listener: (...args: unknown[]) => void) => void;

View File

@@ -1,3 +1,4 @@
// Openai Image Auth Docker Client script supports OpenClaw repository automation.
import http from "node:http";
import type { AddressInfo } from "node:net";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Agent Workspace script supports OpenClaw repository automation.
export function posixAgentWorkspaceScript(purpose: string): string {
return `set -eu
workspace="\${OPENCLAW_WORKSPACE_DIR:-$HOME/.openclaw/workspace}"

View File

@@ -1,3 +1,4 @@
// Common helper supports OpenClaw script workflows.
export * from "./filesystem.ts";
export * from "./env-limits.ts";
export * from "./host-command.ts";

View File

@@ -1,3 +1,4 @@
// Env Limits script supports OpenClaw repository automation.
import { die } from "./host-command.ts";
const positiveIntPattern = /^[1-9]\d*$/u;

View File

@@ -1,3 +1,4 @@
// Filesystem script supports OpenClaw repository automation.
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
import { access, mkdir, readFile, rm, writeFile } from "node:fs/promises";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Guest Transports script supports OpenClaw repository automation.
import { run } from "./host-command.ts";
import type { PhaseRunner } from "./phase-runner.ts";
import { encodePowerShell, psSingleQuote } from "./powershell.ts";

View File

@@ -1,3 +1,4 @@
// Host Command script supports OpenClaw repository automation.
import { spawn, spawnSync, type SpawnOptions, type SpawnSyncReturns } from "node:child_process";
import { writeFile } from "node:fs/promises";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Host Server script supports OpenClaw repository automation.
import { spawn, type ChildProcessWithoutNullStreams } from "node:child_process";
import { createServer } from "node:http";
import { createConnection } from "node:net";

View File

@@ -1,3 +1,4 @@
// Lane Runner script supports OpenClaw repository automation.
import { warn } from "./host-command.ts";
export type SmokeLane = "fresh" | "upgrade";

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env -S pnpm tsx
// Linux Smoke script supports OpenClaw repository automation.
import { mkdir, readFile } from "node:fs/promises";
import path from "node:path";
import { pathToFileURL } from "node:url";

View File

@@ -1,3 +1,4 @@
// Macos Discord script supports OpenClaw repository automation.
import { readFile, writeFile } from "node:fs/promises";
import path from "node:path";
import type { MacosGuest } from "./guest-transports.ts";

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env -S pnpm tsx
// Macos Smoke script supports OpenClaw repository automation.
import { readFile, rm } from "node:fs/promises";
import path from "node:path";
import { pathToFileURL } from "node:url";

View File

@@ -1,3 +1,4 @@
// Npm Update Scripts script supports OpenClaw repository automation.
import { posixAgentWorkspaceScript, windowsAgentWorkspaceScript } from "./agent-workspace.ts";
import { shellQuote } from "./host-command.ts";
import { posixProviderOnlyPluginIsolationScript } from "./plugin-isolation.ts";

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env -S pnpm tsx
// Npm Update Smoke script supports OpenClaw repository automation.
import { spawn } from "node:child_process";
import { appendFileSync, readFileSync, writeFileSync } from "node:fs";
import { readFile, rm } from "node:fs/promises";

View File

@@ -1,3 +1,4 @@
// Package Artifact script supports OpenClaw repository automation.
import { randomUUID } from "node:crypto";
import { copyFile, mkdir, readFile, rm, stat, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";

View File

@@ -1,3 +1,4 @@
// Parallels Vm script supports OpenClaw repository automation.
import { die, run, say, warn } from "./host-command.ts";
const PRLCTL_STATUS_TIMEOUT_MS = 30_000;

View File

@@ -1,3 +1,4 @@
// Phase Runner script supports OpenClaw repository automation.
import { appendFileSync } from "node:fs";
import { writeFile } from "node:fs/promises";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Plugin Isolation script supports OpenClaw repository automation.
import { shellQuote } from "./host-command.ts";
import { providerIdFromModelId } from "./provider-auth.ts";

View File

@@ -1,3 +1,4 @@
// Powershell script supports OpenClaw repository automation.
import {
configPathMapKey,
modelProviderConfigBatchJson,

View File

@@ -1,3 +1,4 @@
// Provider Auth script supports OpenClaw repository automation.
import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Smoke Common helper supports OpenClaw script workflows.
import { readFile, rm } from "node:fs/promises";
import path from "node:path";
import { run, say } from "./host-command.ts";

View File

@@ -1,3 +1,4 @@
// Snapshots script supports OpenClaw repository automation.
import { die, run } from "./host-command.ts";
import type { SnapshotInfo } from "./types.ts";

View File

@@ -1,3 +1,4 @@
// Types script supports OpenClaw repository automation.
export type Provider = "openai" | "anthropic" | "minimax";
export type Mode = "fresh" | "upgrade" | "both";
export type Platform = "macos" | "windows" | "linux";

View File

@@ -1,3 +1,4 @@
// Update Job Timeout script supports OpenClaw repository automation.
interface TimedUpdateJobOptions {
append(this: void, chunk: string): void;
label: string;

View File

@@ -1,3 +1,4 @@
// Windows Git script supports OpenClaw repository automation.
import path from "node:path";
import type { WindowsGuest } from "./guest-transports.ts";
import { die, run, say } from "./host-command.ts";

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env -S pnpm tsx
// Windows Smoke script supports OpenClaw repository automation.
import path from "node:path";
import { pathToFileURL } from "node:url";
import { windowsAgentWorkspaceScript } from "./agent-workspace.ts";

View File

@@ -1,3 +1,4 @@
// Telegram Bot Api script supports OpenClaw repository automation.
import { readBoundedResponseText } from "../lib/bounded-response.ts";
import { readPositiveIntEnv } from "./lib/env-limits.mjs";

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env -S node --import tsx
// Telegram User Crabbox Proof script supports OpenClaw repository automation.
import { type ChildProcess, spawn, type SpawnOptionsWithoutStdio } from "node:child_process";
import fs from "node:fs";

View File

@@ -1,3 +1,4 @@
// Telegram User Credential Io script supports OpenClaw repository automation.
import { spawn } from "node:child_process";
import { readBoundedResponseText } from "../lib/bounded-response.ts";
@@ -36,11 +37,15 @@ function readKillGraceMs() {
return 5_000;
}
if (!/^\d+$/u.test(raw)) {
throw new Error(`OPENCLAW_QA_CREDENTIAL_KILL_GRACE_MS must be a non-negative integer; got: ${raw}`);
throw new Error(
`OPENCLAW_QA_CREDENTIAL_KILL_GRACE_MS must be a non-negative integer; got: ${raw}`,
);
}
const parsed = Number(raw);
if (!Number.isSafeInteger(parsed)) {
throw new Error(`OPENCLAW_QA_CREDENTIAL_KILL_GRACE_MS must be a non-negative integer; got: ${raw}`);
throw new Error(
`OPENCLAW_QA_CREDENTIAL_KILL_GRACE_MS must be a non-negative integer; got: ${raw}`,
);
}
return parsed;
}
@@ -183,7 +188,9 @@ export function runCommand(
return;
}
if (forwardedSignalExitCode !== undefined) {
activeChildTree.unregister({ finishForwardedSignal: !childProcessTreeMayStillExist(child) });
activeChildTree.unregister({
finishForwardedSignal: !childProcessTreeMayStillExist(child),
});
return;
}
if (timedOutError && killTimer && childProcessTreeMayStillExist(child)) {

View File

@@ -1,3 +1,4 @@
// Telegram User Credential Paths script supports OpenClaw repository automation.
import { chmod, mkdir, writeFile } from "node:fs/promises";
import path from "node:path";

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env -S node --import tsx
// Telegram User Credential script supports OpenClaw repository automation.
import { createHash } from "node:crypto";
import { copyFile, mkdir, mkdtemp, readFile, rm, unlink, writeFile } from "node:fs/promises";