From 53d954695e4b5bb4b7a4515d284b090b3c451f0c Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 4 Jan 2026 01:22:22 +0100 Subject: [PATCH] style: format agent.wait imports --- src/gateway/protocol/index.ts | 7 ++++--- src/gateway/server-methods.ts | 12 ++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/gateway/protocol/index.ts b/src/gateway/protocol/index.ts index 72083d427..3e39b0628 100644 --- a/src/gateway/protocol/index.ts +++ b/src/gateway/protocol/index.ts @@ -3,6 +3,7 @@ import { type AgentEvent, AgentEventSchema, AgentParamsSchema, + type AgentWaitParams, AgentWaitParamsSchema, type ChatAbortParams, ChatAbortParamsSchema, @@ -78,7 +79,6 @@ import { type ResponseFrame, ResponseFrameSchema, SendParamsSchema, - type AgentWaitParams, type SessionsCompactParams, SessionsCompactParamsSchema, type SessionsDeleteParams, @@ -148,8 +148,9 @@ export const validateResponseFrame = export const validateEventFrame = ajv.compile(EventFrameSchema); export const validateSendParams = ajv.compile(SendParamsSchema); export const validateAgentParams = ajv.compile(AgentParamsSchema); -export const validateAgentWaitParams = - ajv.compile(AgentWaitParamsSchema); +export const validateAgentWaitParams = ajv.compile( + AgentWaitParamsSchema, +); export const validateWakeParams = ajv.compile(WakeParamsSchema); export const validateNodePairRequestParams = ajv.compile( NodePairRequestParamsSchema, diff --git a/src/gateway/server-methods.ts b/src/gateway/server-methods.ts index 1334bf9ee..3debee59a 100644 --- a/src/gateway/server-methods.ts +++ b/src/gateway/server-methods.ts @@ -57,9 +57,9 @@ import { type DiscordProbe, probeDiscord } from "../discord/probe.js"; import { shouldLogVerbose } from "../globals.js"; import { sendMessageIMessage } from "../imessage/index.js"; import { type IMessageProbe, probeIMessage } from "../imessage/probe.js"; +import { onAgentEvent } from "../infra/agent-events.js"; import type { startNodeBridgeServer } from "../infra/bridge/server.js"; import { getLastHeartbeatEvent } from "../infra/heartbeat-events.js"; -import { onAgentEvent } from "../infra/agent-events.js"; import { setHeartbeatsEnabled } from "../infra/heartbeat-runner.js"; import { approveNodePairing, @@ -100,6 +100,7 @@ import { getWebAuthAgeMs, logoutWeb, readWebSelfId } from "../web/session.js"; import { WizardSession } from "../wizard/session.js"; import { buildMessageWithAttachments } from "./chat-attachments.js"; import { + type AgentWaitParams, type ConnectParams, ErrorCodes, type ErrorShape, @@ -111,7 +112,6 @@ import { type SessionsListParams, type SessionsPatchParams, type SessionsResetParams, - type AgentWaitParams, validateAgentParams, validateAgentWaitParams, validateChatAbortParams, @@ -245,7 +245,9 @@ function ensureAgentJobListener() { ? (evt.data.endedAt as number) : undefined; const error = - typeof evt.data?.error === "string" ? (evt.data.error as string) : undefined; + typeof evt.data?.error === "string" + ? (evt.data.error as string) + : undefined; agentRunStarts.delete(evt.runId); recordAgentJobSnapshot({ runId: evt.runId, @@ -306,7 +308,9 @@ async function waitForAgentJob(params: { ? (evt.data.endedAt as number) : undefined; const error = - typeof evt.data?.error === "string" ? (evt.data.error as string) : undefined; + typeof evt.data?.error === "string" + ? (evt.data.error as string) + : undefined; const snapshot: AgentJobSnapshot = { runId: evt.runId, state: state === "error" ? "error" : "done",