






















@@ -15,7 +15,7 @@ import { scheduleGatewaySigusr1Restart } from "../../infra/restart.js";
1515import { createSubsystemLogger } from "../../logging/subsystem.js";
1616import { collectEnabledInsecureOrDangerousFlags } from "../../security/dangerous-config-flags.js";
1717import { normalizeOptionalString, readStringValue } from "../../shared/string-coerce.js";
18-import { optionalStringEnum, stringEnum } from "../schema/typebox.js";
18+import { stringEnum } from "../schema/typebox.js";
1919import { type AnyAgentTool, jsonResult, readStringParam } from "./common.js";
2020import { callGatewayTool, readGatewayCallOptions } from "./gateway.js";
2121import { isOpenClawOwnerOnlyCoreToolName } from "./owner-only-tools.js";
@@ -290,7 +290,6 @@ const GatewayToolSchema = Type.Object({
290290// restart
291291delayMs: Type.Optional(Type.Number()),
292292reason: Type.Optional(Type.String()),
293-continuationKind: optionalStringEnum(["systemEvent", "agentTurn"] as const),
294293continuationMessage: Type.Optional(Type.String()),
295294// config.get, config.schema.lookup, config.apply, update.run
296295gatewayUrl: Type.Optional(Type.String()),
@@ -320,7 +319,7 @@ export function createGatewayTool(opts?: {
320319name: "gateway",
321320ownerOnly: isOpenClawOwnerOnlyCoreToolName("gateway"),
322321description:
323-"Restart, inspect a specific config schema path, apply config, or update the gateway in-place (SIGUSR1). Use config.schema.lookup with a targeted dot path before config edits. Use config.patch for safe partial config updates (merges with existing). Use config.apply only when replacing entire config. Config writes hot-reload when possible and restart when required. Always pass a human-readable completion message via the `note` parameter so the system can deliver it to the user after restart. If restarting during a user task and you still owe the user a reply, pass a specific one-shot `continuationMessage` for what to verify or report after boot; do not write restart sentinel files directly. Use `continuationKind` only when it should be a system event instead of a normal agent turn.",
322+"Restart, inspect a specific config schema path, apply config, or update the gateway in-place (SIGUSR1). Use config.schema.lookup with a targeted dot path before config edits. Use config.patch for safe partial config updates (merges with existing). Use config.apply only when replacing entire config. Config writes hot-reload when possible and restart when required. Always pass a human-readable completion message via the `note` parameter so the system can deliver it to the user after restart. If restarting during a user task and you still owe the user a reply, pass a specific one-shot `continuationMessage` for what to verify or report after boot; do not write restart sentinel files directly.",
324323parameters: GatewayToolSchema,
325324execute: async (_toolCallId, args) => {
326325const params = args as Record<string, unknown>;
@@ -339,7 +338,6 @@ export function createGatewayTool(opts?: {
339338const reason = normalizeOptionalString(params.reason)?.slice(0, 200);
340339const note = normalizeOptionalString(params.note);
341340const continuationMessage = normalizeOptionalString(params.continuationMessage);
342-const continuationKind = normalizeOptionalString(params.continuationKind);
343341// Extract channel + threadId for routing after restart.
344342// Uses generic :thread: parsing plus plugin-owned session grammars.
345343const { deliveryContext, threadId } = extractDeliveryInfo(sessionKey);
@@ -353,7 +351,6 @@ export function createGatewayTool(opts?: {
353351message: note ?? reason ?? null,
354352continuation: buildRestartSuccessContinuation({
355353 sessionKey,
356- continuationKind,
357354 continuationMessage,
358355}),
359356doctorHint: formatDoctorNonInteractiveHint(),
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。