style: fix lint formatting
This commit is contained in:
@@ -983,15 +983,8 @@ export function shouldEmitDiscordReactionNotification(params: {
|
||||
userTag?: string | null;
|
||||
allowlist?: Array<string | number> | null;
|
||||
}) {
|
||||
const {
|
||||
mode,
|
||||
botId,
|
||||
messageAuthorId,
|
||||
userId,
|
||||
userName,
|
||||
userTag,
|
||||
allowlist,
|
||||
} = params;
|
||||
const { mode, botId, messageAuthorId, userId, userName, userTag, allowlist } =
|
||||
params;
|
||||
const effectiveMode = mode ?? "own";
|
||||
if (effectiveMode === "off") return false;
|
||||
if (effectiveMode === "own") {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import fs from "node:fs";
|
||||
import { randomUUID } from "node:crypto";
|
||||
import fs from "node:fs";
|
||||
import { DEFAULT_MODEL, DEFAULT_PROVIDER } from "../agents/defaults.js";
|
||||
import type { ModelCatalogEntry } from "../agents/model-catalog.js";
|
||||
import {
|
||||
buildAllowedModelSet,
|
||||
buildModelAliasIndex,
|
||||
@@ -14,7 +15,9 @@ import {
|
||||
normalizeThinkLevel,
|
||||
normalizeVerboseLevel,
|
||||
} from "../auto-reply/thinking.js";
|
||||
import { buildConfigSchema } from "../config/schema.js";
|
||||
import type { CliDeps } from "../cli/deps.js";
|
||||
import { agentCommand } from "../commands/agent.js";
|
||||
import type { HealthSummary } from "../commands/health.js";
|
||||
import {
|
||||
CONFIG_PATH_CLAWDIS,
|
||||
loadConfig,
|
||||
@@ -23,29 +26,19 @@ import {
|
||||
validateConfigObject,
|
||||
writeConfigFile,
|
||||
} from "../config/config.js";
|
||||
import { buildConfigSchema } from "../config/schema.js";
|
||||
import {
|
||||
loadSessionStore,
|
||||
resolveStorePath,
|
||||
type SessionEntry,
|
||||
saveSessionStore,
|
||||
} from "../config/sessions.js";
|
||||
import type { CliDeps } from "../cli/deps.js";
|
||||
import { agentCommand } from "../commands/agent.js";
|
||||
import { type HealthSummary } from "../commands/health.js";
|
||||
import { defaultRuntime } from "../runtime.js";
|
||||
import { loadVoiceWakeConfig, setVoiceWakeTriggers } from "../infra/voicewake.js";
|
||||
import {
|
||||
archiveFileOnDisk,
|
||||
capArrayByJsonBytes,
|
||||
listSessionsFromStore,
|
||||
loadSessionEntry,
|
||||
readSessionMessages,
|
||||
resolveSessionModelRef,
|
||||
resolveSessionTranscriptCandidates,
|
||||
type SessionsPatchResult,
|
||||
} from "./session-utils.js";
|
||||
loadVoiceWakeConfig,
|
||||
setVoiceWakeTriggers,
|
||||
} from "../infra/voicewake.js";
|
||||
import { defaultRuntime } from "../runtime.js";
|
||||
import { buildMessageWithAttachments } from "./chat-attachments.js";
|
||||
import { normalizeVoiceWakeTriggers } from "./server-utils.js";
|
||||
import {
|
||||
ErrorCodes,
|
||||
errorShape,
|
||||
@@ -69,18 +62,32 @@ import {
|
||||
validateSessionsResetParams,
|
||||
validateTalkModeParams,
|
||||
} from "./protocol/index.js";
|
||||
import type { ChatRunEntry } from "./server-chat.js";
|
||||
import {
|
||||
HEALTH_REFRESH_INTERVAL_MS,
|
||||
MAX_CHAT_HISTORY_MESSAGES_BYTES,
|
||||
} from "./server-constants.js";
|
||||
import { formatForLog } from "./ws-log.js";
|
||||
import type { ChatRunEntry } from "./server-chat.js";
|
||||
import type { DedupeEntry } from "./server-shared.js";
|
||||
import type { ModelCatalogEntry } from "../agents/model-catalog.js";
|
||||
import { normalizeVoiceWakeTriggers } from "./server-utils.js";
|
||||
import {
|
||||
archiveFileOnDisk,
|
||||
capArrayByJsonBytes,
|
||||
listSessionsFromStore,
|
||||
loadSessionEntry,
|
||||
readSessionMessages,
|
||||
resolveSessionModelRef,
|
||||
resolveSessionTranscriptCandidates,
|
||||
type SessionsPatchResult,
|
||||
} from "./session-utils.js";
|
||||
import { formatForLog } from "./ws-log.js";
|
||||
|
||||
export type BridgeHandlersContext = {
|
||||
deps: CliDeps;
|
||||
broadcast: (event: string, payload: unknown, opts?: { dropIfSlow?: boolean }) => void;
|
||||
broadcast: (
|
||||
event: string,
|
||||
payload: unknown,
|
||||
opts?: { dropIfSlow?: boolean },
|
||||
) => void;
|
||||
bridgeSendToSession: (
|
||||
sessionKey: string,
|
||||
event: string,
|
||||
|
||||
@@ -2,9 +2,7 @@ export type BrowserControlServer = {
|
||||
stop: () => Promise<void>;
|
||||
};
|
||||
|
||||
export async function startBrowserControlServerIfEnabled(): Promise<
|
||||
BrowserControlServer | null
|
||||
> {
|
||||
export async function startBrowserControlServerIfEnabled(): Promise<BrowserControlServer | null> {
|
||||
if (process.env.CLAWDIS_SKIP_BROWSER_CONTROL_SERVER === "1") return null;
|
||||
// Lazy import: keeps startup fast, but still bundles for the embedded
|
||||
// gateway (bun --compile) via the static specifier path.
|
||||
|
||||
@@ -28,10 +28,7 @@ import {
|
||||
STATE_DIR_CLAWDIS,
|
||||
writeConfigFile,
|
||||
} from "../config/config.js";
|
||||
import {
|
||||
loadSessionStore,
|
||||
resolveStorePath,
|
||||
} from "../config/sessions.js";
|
||||
import { loadSessionStore, resolveStorePath } from "../config/sessions.js";
|
||||
import { runCronIsolatedAgentTurn } from "../cron/isolated-agent.js";
|
||||
import { appendCronRunLog, resolveCronRunLogPath } from "../cron/run-log.js";
|
||||
import { CronService } from "../cron/service.js";
|
||||
@@ -69,9 +66,7 @@ import {
|
||||
enableTailscaleServe,
|
||||
getTailnetHostname,
|
||||
} from "../infra/tailscale.js";
|
||||
import {
|
||||
loadVoiceWakeConfig,
|
||||
} from "../infra/voicewake.js";
|
||||
import { loadVoiceWakeConfig } from "../infra/voicewake.js";
|
||||
import {
|
||||
WIDE_AREA_DISCOVERY_DOMAIN,
|
||||
writeWideAreaBridgeZone,
|
||||
@@ -98,6 +93,10 @@ import {
|
||||
isLoopbackHost,
|
||||
resolveGatewayBindHost,
|
||||
} from "./net.js";
|
||||
import { createBridgeHandlers } from "./server-bridge.js";
|
||||
import { createBridgeSubscriptionManager } from "./server-bridge-subscriptions.js";
|
||||
import { startBrowserControlServerIfEnabled } from "./server-browser.js";
|
||||
import { createAgentEventHandler, createChatRunState } from "./server-chat.js";
|
||||
import {
|
||||
DEDUPE_MAX,
|
||||
DEDUPE_TTL_MS,
|
||||
@@ -107,13 +106,6 @@ import {
|
||||
MAX_PAYLOAD_BYTES,
|
||||
TICK_INTERVAL_MS,
|
||||
} from "./server-constants.js";
|
||||
import { startBrowserControlServerIfEnabled } from "./server-browser.js";
|
||||
import { createBridgeHandlers } from "./server-bridge.js";
|
||||
import { createBridgeSubscriptionManager } from "./server-bridge-subscriptions.js";
|
||||
import {
|
||||
createAgentEventHandler,
|
||||
createChatRunState,
|
||||
} from "./server-chat.js";
|
||||
import {
|
||||
formatBonjourInstanceName,
|
||||
resolveBonjourCliPath,
|
||||
@@ -126,8 +118,8 @@ import {
|
||||
} from "./server-http.js";
|
||||
import { handleGatewayRequest } from "./server-methods.js";
|
||||
import { createProviderManager } from "./server-providers.js";
|
||||
import { formatError } from "./server-utils.js";
|
||||
import type { DedupeEntry } from "./server-shared.js";
|
||||
import { formatError } from "./server-utils.js";
|
||||
import { formatForLog, logWs, summarizeAgentEventForWsLog } from "./ws-log.js";
|
||||
|
||||
ensureClawdisCliOnPath();
|
||||
|
||||
Reference in New Issue
Block a user