style: format agent.wait imports
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
|||||||
type AgentEvent,
|
type AgentEvent,
|
||||||
AgentEventSchema,
|
AgentEventSchema,
|
||||||
AgentParamsSchema,
|
AgentParamsSchema,
|
||||||
|
type AgentWaitParams,
|
||||||
AgentWaitParamsSchema,
|
AgentWaitParamsSchema,
|
||||||
type ChatAbortParams,
|
type ChatAbortParams,
|
||||||
ChatAbortParamsSchema,
|
ChatAbortParamsSchema,
|
||||||
@@ -78,7 +79,6 @@ import {
|
|||||||
type ResponseFrame,
|
type ResponseFrame,
|
||||||
ResponseFrameSchema,
|
ResponseFrameSchema,
|
||||||
SendParamsSchema,
|
SendParamsSchema,
|
||||||
type AgentWaitParams,
|
|
||||||
type SessionsCompactParams,
|
type SessionsCompactParams,
|
||||||
SessionsCompactParamsSchema,
|
SessionsCompactParamsSchema,
|
||||||
type SessionsDeleteParams,
|
type SessionsDeleteParams,
|
||||||
@@ -148,8 +148,9 @@ export const validateResponseFrame =
|
|||||||
export const validateEventFrame = ajv.compile<EventFrame>(EventFrameSchema);
|
export const validateEventFrame = ajv.compile<EventFrame>(EventFrameSchema);
|
||||||
export const validateSendParams = ajv.compile(SendParamsSchema);
|
export const validateSendParams = ajv.compile(SendParamsSchema);
|
||||||
export const validateAgentParams = ajv.compile(AgentParamsSchema);
|
export const validateAgentParams = ajv.compile(AgentParamsSchema);
|
||||||
export const validateAgentWaitParams =
|
export const validateAgentWaitParams = ajv.compile<AgentWaitParams>(
|
||||||
ajv.compile<AgentWaitParams>(AgentWaitParamsSchema);
|
AgentWaitParamsSchema,
|
||||||
|
);
|
||||||
export const validateWakeParams = ajv.compile<WakeParams>(WakeParamsSchema);
|
export const validateWakeParams = ajv.compile<WakeParams>(WakeParamsSchema);
|
||||||
export const validateNodePairRequestParams = ajv.compile<NodePairRequestParams>(
|
export const validateNodePairRequestParams = ajv.compile<NodePairRequestParams>(
|
||||||
NodePairRequestParamsSchema,
|
NodePairRequestParamsSchema,
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ import { type DiscordProbe, probeDiscord } from "../discord/probe.js";
|
|||||||
import { shouldLogVerbose } from "../globals.js";
|
import { shouldLogVerbose } from "../globals.js";
|
||||||
import { sendMessageIMessage } from "../imessage/index.js";
|
import { sendMessageIMessage } from "../imessage/index.js";
|
||||||
import { type IMessageProbe, probeIMessage } from "../imessage/probe.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 type { startNodeBridgeServer } from "../infra/bridge/server.js";
|
||||||
import { getLastHeartbeatEvent } from "../infra/heartbeat-events.js";
|
import { getLastHeartbeatEvent } from "../infra/heartbeat-events.js";
|
||||||
import { onAgentEvent } from "../infra/agent-events.js";
|
|
||||||
import { setHeartbeatsEnabled } from "../infra/heartbeat-runner.js";
|
import { setHeartbeatsEnabled } from "../infra/heartbeat-runner.js";
|
||||||
import {
|
import {
|
||||||
approveNodePairing,
|
approveNodePairing,
|
||||||
@@ -100,6 +100,7 @@ import { getWebAuthAgeMs, logoutWeb, readWebSelfId } from "../web/session.js";
|
|||||||
import { WizardSession } from "../wizard/session.js";
|
import { WizardSession } from "../wizard/session.js";
|
||||||
import { buildMessageWithAttachments } from "./chat-attachments.js";
|
import { buildMessageWithAttachments } from "./chat-attachments.js";
|
||||||
import {
|
import {
|
||||||
|
type AgentWaitParams,
|
||||||
type ConnectParams,
|
type ConnectParams,
|
||||||
ErrorCodes,
|
ErrorCodes,
|
||||||
type ErrorShape,
|
type ErrorShape,
|
||||||
@@ -111,7 +112,6 @@ import {
|
|||||||
type SessionsListParams,
|
type SessionsListParams,
|
||||||
type SessionsPatchParams,
|
type SessionsPatchParams,
|
||||||
type SessionsResetParams,
|
type SessionsResetParams,
|
||||||
type AgentWaitParams,
|
|
||||||
validateAgentParams,
|
validateAgentParams,
|
||||||
validateAgentWaitParams,
|
validateAgentWaitParams,
|
||||||
validateChatAbortParams,
|
validateChatAbortParams,
|
||||||
@@ -245,7 +245,9 @@ function ensureAgentJobListener() {
|
|||||||
? (evt.data.endedAt as number)
|
? (evt.data.endedAt as number)
|
||||||
: undefined;
|
: undefined;
|
||||||
const error =
|
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);
|
agentRunStarts.delete(evt.runId);
|
||||||
recordAgentJobSnapshot({
|
recordAgentJobSnapshot({
|
||||||
runId: evt.runId,
|
runId: evt.runId,
|
||||||
@@ -306,7 +308,9 @@ async function waitForAgentJob(params: {
|
|||||||
? (evt.data.endedAt as number)
|
? (evt.data.endedAt as number)
|
||||||
: undefined;
|
: undefined;
|
||||||
const error =
|
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 = {
|
const snapshot: AgentJobSnapshot = {
|
||||||
runId: evt.runId,
|
runId: evt.runId,
|
||||||
state: state === "error" ? "error" : "done",
|
state: state === "error" ? "error" : "done",
|
||||||
|
|||||||
Reference in New Issue
Block a user