style: oxfmt fixes (#925) (thanks @grp06)
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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"],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user