style: oxfmt fixes (#925) (thanks @grp06)

This commit is contained in:
Peter Steinberger
2026-01-15 03:22:54 +00:00
parent 8f797f213e
commit 5c52dbf661
5 changed files with 11 additions and 11 deletions

View File

@@ -1,5 +1,9 @@
import { resolveChannelDefaultAccountId } from "../channels/plugins/helpers.js";
import { getChannelPlugin, listChannelPlugins, normalizeChannelId } from "../channels/plugins/index.js";
import {
getChannelPlugin,
listChannelPlugins,
normalizeChannelId,
} from "../channels/plugins/index.js";
import type { ChannelId } from "../channels/plugins/types.js";
import type { ClawdbotConfig } from "../config/config.js";
import type { AgentBinding } from "../config/types.js";

View File

@@ -9,10 +9,7 @@ describe("sandbox docker config", () => {
defaults: {
sandbox: {
docker: {
binds: [
"/var/run/docker.sock:/var/run/docker.sock",
"/home/user/source:/source:rw",
],
binds: ["/var/run/docker.sock:/var/run/docker.sock", "/home/user/source:/source:rw"],
},
},
},

View File

@@ -141,8 +141,7 @@ const listHookChannelValues = () => ["last", ...listChannelPlugins().map((plugin
export type HookMessageChannel = ChannelId | "last";
const getHookChannelSet = () => new Set<string>(listHookChannelValues());
export const getHookChannelError = () =>
`channel must be ${listHookChannelValues().join("|")}`;
export const getHookChannelError = () => `channel must be ${listHookChannelValues().join("|")}`;
export function resolveHookChannel(raw: unknown): HookMessageChannel | null {
if (raw === undefined) return "last";

View File

@@ -112,9 +112,7 @@ export type ClawdbotPluginApi = {
tool: AnyAgentTool | ClawdbotPluginToolFactory,
opts?: { name?: string; names?: string[] },
) => void;
registerChannel: (
registration: ClawdbotPluginChannelRegistration | ChannelPlugin,
) => void;
registerChannel: (registration: ClawdbotPluginChannelRegistration | ChannelPlugin) => void;
registerGatewayMethod: (method: string, handler: GatewayRequestHandler) => void;
registerCli: (registrar: ClawdbotPluginCliRegistrar, opts?: { commands?: string[] }) => void;
registerService: (service: ClawdbotPluginService) => void;

View File

@@ -86,7 +86,9 @@ export const listGatewayAgentChannelAliases = (): string[] =>
export type GatewayAgentChannelHint = GatewayMessageChannel | "last";
export const listGatewayAgentChannelValues = (): string[] =>
Array.from(new Set([...listGatewayMessageChannels(), "last", ...listGatewayAgentChannelAliases()]));
Array.from(
new Set([...listGatewayMessageChannels(), "last", ...listGatewayAgentChannelAliases()]),
);
export function isGatewayMessageChannel(value: string): value is GatewayMessageChannel {
return listGatewayMessageChannels().includes(value as GatewayMessageChannel);