style: format files and fix safe-bins e2e typing

This commit is contained in:
Peter Steinberger
2026-02-19 14:26:04 +01:00
parent e3e0ffd801
commit 0e85380e56
12 changed files with 34 additions and 33 deletions

View File

@@ -1,13 +1,7 @@
import path from "node:path";
import { finalizeInboundContext } from "../auto-reply/reply/inbound-context.js";
import type { MsgContext } from "../auto-reply/templating.js";
import type { OpenClawConfig } from "../config/config.js";
import type {
MediaUnderstandingCapability,
MediaUnderstandingDecision,
MediaUnderstandingOutput,
MediaUnderstandingProvider,
} from "./types.js";
import { finalizeInboundContext } from "../auto-reply/reply/inbound-context.js";
import { logVerbose, shouldLogVerbose } from "../globals.js";
import {
extractFileContentFromSource,
@@ -30,6 +24,12 @@ import {
resolveMediaAttachmentLocalRoots,
runCapability,
} from "./runner.js";
import type {
MediaUnderstandingCapability,
MediaUnderstandingDecision,
MediaUnderstandingOutput,
MediaUnderstandingProvider,
} from "./types.js";
export type ApplyMediaUnderstandingResult = {
outputs: MediaUnderstandingOutput[];

View File

@@ -3,7 +3,6 @@ import path from "node:path";
import { fileURLToPath } from "node:url";
import type { MsgContext } from "../auto-reply/templating.js";
import type { MediaUnderstandingAttachmentsConfig } from "../config/types.tools.js";
import type { MediaAttachment, MediaUnderstandingCapability } from "./types.js";
import { logVerbose, shouldLogVerbose } from "../globals.js";
import { isAbortError } from "../infra/unhandled-rejections.js";
import { fetchRemoteMedia, MediaFetchError } from "../media/fetch.js";
@@ -17,6 +16,7 @@ import { detectMime, getFileExtension, isAudioFileName, kindFromMime } from "../
import { buildRandomTempFilePath } from "../plugin-sdk/temp-path.js";
import { MediaUnderstandingSkipError } from "./errors.js";
import { fetchWithTimeout } from "./providers/shared.js";
import type { MediaAttachment, MediaUnderstandingCapability } from "./types.js";
type MediaBufferResult = {
buffer: Buffer;

View File

@@ -1,6 +1,5 @@
import type { MsgContext } from "../auto-reply/templating.js";
import type { OpenClawConfig } from "../config/config.js";
import type { MediaUnderstandingProvider } from "./types.js";
import { logVerbose, shouldLogVerbose } from "../globals.js";
import { isAudioAttachment } from "./attachments.js";
import {
@@ -11,6 +10,7 @@ import {
resolveMediaAttachmentLocalRoots,
runCapability,
} from "./runner.js";
import type { MediaUnderstandingProvider } from "./types.js";
/**
* Transcribes the first audio attachment BEFORE mention checking.

View File

@@ -2,26 +2,18 @@ import { constants as fsConstants } from "node:fs";
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import type { MsgContext } from "../auto-reply/templating.js";
import type { OpenClawConfig } from "../config/config.js";
import type {
MediaUnderstandingConfig,
MediaUnderstandingModelConfig,
} from "../config/types.tools.js";
import type {
MediaAttachment,
MediaUnderstandingCapability,
MediaUnderstandingDecision,
MediaUnderstandingModelDecision,
MediaUnderstandingOutput,
MediaUnderstandingProvider,
} from "./types.js";
import { resolveApiKeyForProvider } from "../agents/model-auth.js";
import {
findModelInCatalog,
loadModelCatalog,
modelSupportsVision,
} from "../agents/model-catalog.js";
import type { MsgContext } from "../auto-reply/templating.js";
import type { OpenClawConfig } from "../config/config.js";
import type {
MediaUnderstandingConfig,
MediaUnderstandingModelConfig,
} from "../config/types.tools.js";
import { logVerbose, shouldLogVerbose } from "../globals.js";
import {
mergeInboundPathRoots,
@@ -56,6 +48,14 @@ import {
runCliEntry,
runProviderEntry,
} from "./runner.entries.js";
import type {
MediaAttachment,
MediaUnderstandingCapability,
MediaUnderstandingDecision,
MediaUnderstandingModelDecision,
MediaUnderstandingOutput,
MediaUnderstandingProvider,
} from "./types.js";
export type ActiveMediaModel = {
provider: string;