Skip to content

Commit f24ae91

Browse files
committed
docs: document gateway server runtime
1 parent ec22756 commit f24ae91

21 files changed

Lines changed: 21 additions & 0 deletions

src/gateway/server/close-reason.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Close reason helpers keep WebSocket handshake failure text within RFC byte limits.
12
import { Buffer } from "node:buffer";
23

34
/**

src/gateway/server/event-loop-health.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Event-loop health tests cover delay, CPU, and utilization degradation classification.
12
import type { monitorEventLoopDelay, performance } from "node:perf_hooks";
23
import { describe, expect, it, vi } from "vitest";
34
import {

src/gateway/server/event-loop-health.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Event-loop health monitor samples delay, utilization, and CPU pressure for gateway readiness snapshots.
12
import { monitorEventLoopDelay, performance } from "node:perf_hooks";
23

34
const EVENT_LOOP_MONITOR_RESOLUTION_MS = 20;

src/gateway/server/health-state.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Health-state tests cover probe coalescing, sensitive snapshots, and broadcast version behavior.
12
import { beforeEach, describe, expect, it, vi } from "vitest";
23
import type { HealthSummary } from "../../commands/health.js";
34

src/gateway/server/health-state.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Gateway health state builds snapshots, caches health probes, and broadcasts health/presence version changes.
12
import type { Snapshot } from "../../../packages/gateway-protocol/src/index.js";
23
import { resolveDefaultAgentId } from "../../agents/agent-scope.js";
34
import { getHealthSnapshot, type HealthSummary } from "../../commands/health.js";

src/gateway/server/hook-client-ip-config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Hook client-IP config adapts gateway trusted-proxy settings for hook request handling.
12
import type { OpenClawConfig } from "../../config/types.openclaw.js";
23
import type { HookClientIpConfig } from "./hooks-request-handler.js";
34

src/gateway/server/hooks-request-handler.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Hook request handler validates hook tokens, applies mappings, dedupes requests, and dispatches wake or agent work.
12
import { createHash } from "node:crypto";
23
import type { IncomingMessage, ServerResponse } from "node:http";
34
import type { createSubsystemLogger } from "../../logging/subsystem.js";

src/gateway/server/hooks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Gateway hook server wiring translates external hook requests into wake events or isolated agent runs.
12
import { randomUUID } from "node:crypto";
23
import {
34
resolveDateTimestampMs,

src/gateway/server/http-listen.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Gateway HTTP listener tests cover retry behavior for lock contention and listen failures.
12
import { EventEmitter } from "node:events";
23
import type { Server as HttpServer } from "node:http";
34
import { describe, expect, it, vi } from "vitest";

src/gateway/server/plugin-node-capability-auth.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Plugin node capability auth lets node-issued route capabilities supplement normal bearer gateway auth.
12
import type { IncomingMessage } from "node:http";
23
import type { AuthRateLimiter } from "../auth-rate-limit.js";
34
import {

0 commit comments

Comments
 (0)