Skip to content

Commit a8154f4

Browse files
committed
docs: document gateway tool methods
1 parent a6ecc4b commit a8154f4

13 files changed

Lines changed: 26 additions & 0 deletions

src/gateway/server-methods.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Gateway method registry aggregator wires core and plugin RPC descriptors to
2+
// lazy-loaded handler families, role checks, scopes, and control-plane budgets.
13
import { ErrorCodes, errorShape } from "../../packages/gateway-protocol/src/index.js";
24
import {
35
gatewayStartupUnavailableDetails,

src/gateway/server-methods/tasks.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Task gateway methods expose detached task list/get/cancel operations with
2+
// bounded public summaries over the runtime task registry.
13
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
24
import {
35
ErrorCodes,

src/gateway/server-methods/tools-effective.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Effective tools tests cover session-scoped tool inventory, MCP catalog state,
2+
// caching behavior, delivery context, and policy filtering.
13
import { beforeEach, describe, expect, it, vi } from "vitest";
24
import { ErrorCodes } from "../../../packages/gateway-protocol/src/index.js";
35
import type { McpToolCatalog, SessionMcpRuntime } from "../../agents/agent-bundle-mcp-types.js";

src/gateway/server-methods/tools-effective.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Effective tools methods resolve the tools available to a session by combining
2+
// bundled tools, MCP tools, plugin policy, model context, and cache state.
13
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
24
import {
35
ErrorCodes,

src/gateway/server-methods/tools-invoke.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Tool invocation methods adapt gateway-visible tools to RPC callers with
2+
// protocol-shaped success, approval-required, validation, and error payloads.
13
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
24
import {
35
ErrorCodes,

src/gateway/server-methods/update-managed-service-handoff.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Managed-service update handoff starts a detached process that can finish an
2+
// update after the gateway exits under launchd/systemd-style supervisors.
13
import { spawn } from "node:child_process";
24
import fs from "node:fs/promises";
35
import os from "node:os";

src/gateway/server-methods/update.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Update method tests cover update.run/status, restart sentinel metadata,
2+
// managed-service handoff, restart scheduling, and delivery context preservation.
13
import { beforeEach, describe, expect, it, vi } from "vitest";
24
import type { RestartSentinelPayload } from "../../infra/restart-sentinel.js";
35
import type { RespawnSupervisor } from "../../infra/supervisor-markers.js";

src/gateway/server-methods/update.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Update gateway methods run self-update flows, report status, write restart
2+
// sentinels, and hand off managed-service restarts when needed.
13
import { randomUUID } from "node:crypto";
24
import os from "node:os";
35
import {

src/gateway/server-methods/usage.sessions-usage.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Session usage tests cover aggregate cost/token usage across configured and
2+
// discovered agent session logs.
13
import fs from "node:fs";
24
import os from "node:os";
35
import path from "node:path";

src/gateway/server-methods/usage.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Usage gateway methods aggregate provider and session cost/token metrics from
2+
// caches, logs, session stores, and discovered transcript files.
13
import fs from "node:fs";
24
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
35
import {

0 commit comments

Comments
 (0)