refactor: trim config helper types

This commit is contained in:
Peter Steinberger
2026-05-02 03:45:23 +01:00
parent 78161e1212
commit ec55307df2
3 changed files with 10 additions and 10 deletions

View File

@@ -13,9 +13,9 @@ import {
type ToolsBySenderKeyType, type ToolsBySenderKeyType,
} from "./types.tools.js"; } from "./types.tools.js";
export type GroupPolicyChannel = ChannelId; type GroupPolicyChannel = ChannelId;
export type ChannelGroupConfig = { type ChannelGroupConfig = {
requireMention?: boolean; requireMention?: boolean;
ingest?: boolean; ingest?: boolean;
tools?: GroupToolPolicyConfig; tools?: GroupToolPolicyConfig;
@@ -56,7 +56,7 @@ function resolveChannelGroupConfig(
return groups[matchedKey]; return groups[matchedKey];
} }
export type GroupToolPolicySender = { type GroupToolPolicySender = {
senderId?: string | null; senderId?: string | null;
senderName?: string | null; senderName?: string | null;
senderUsername?: string | null; senderUsername?: string | null;

View File

@@ -32,7 +32,7 @@ export type IncludeResolver = {
parseJson: (raw: string) => unknown; parseJson: (raw: string) => unknown;
}; };
export type IncludeFileReadParams = { type IncludeFileReadParams = {
includePath: string; includePath: string;
resolvedPath: string; resolvedPath: string;
rootRealDir: string; rootRealDir: string;
@@ -40,7 +40,7 @@ export type IncludeFileReadParams = {
maxBytes?: number; maxBytes?: number;
}; };
export type ResolveConfigIncludesOptions = { type ResolveConfigIncludesOptions = {
/** /**
* Additional directories outside the config directory that `$include` paths * Additional directories outside the config directory that `$include` paths
* may resolve into. Typically populated from `OPENCLAW_INCLUDE_ROOTS`. * may resolve into. Typically populated from `OPENCLAW_INCLUDE_ROOTS`.

View File

@@ -135,7 +135,7 @@ const CONFIG_AUDIT_LOG_FILENAME = "config-audit.jsonl";
export type ConfigWriteAuditResult = "rename" | "copy-fallback" | "failed" | "rejected"; export type ConfigWriteAuditResult = "rename" | "copy-fallback" | "failed" | "rejected";
export type ConfigWriteAuditRecord = { type ConfigWriteAuditRecord = {
ts: string; ts: string;
source: "config-io"; source: "config-io";
event: "config.write"; event: "config.write";
@@ -231,9 +231,9 @@ export type ConfigObserveAuditRecord = {
restoreErrorMessage: string | null; restoreErrorMessage: string | null;
}; };
export type ConfigAuditRecord = ConfigWriteAuditRecord | ConfigObserveAuditRecord; type ConfigAuditRecord = ConfigWriteAuditRecord | ConfigObserveAuditRecord;
export type ConfigAuditStatMetadata = { type ConfigAuditStatMetadata = {
dev: string | null; dev: string | null;
ino: string | null; ino: string | null;
mode: number | null; mode: number | null;
@@ -242,7 +242,7 @@ export type ConfigAuditStatMetadata = {
gid: number | null; gid: number | null;
}; };
export type ConfigAuditProcessInfo = { type ConfigAuditProcessInfo = {
pid: number; pid: number;
ppid: number; ppid: number;
cwd: string; cwd: string;
@@ -250,7 +250,7 @@ export type ConfigAuditProcessInfo = {
execArgv: string[]; execArgv: string[];
}; };
export type ConfigWriteAuditRecordBase = Omit< type ConfigWriteAuditRecordBase = Omit<
ConfigWriteAuditRecord, ConfigWriteAuditRecord,
| "result" | "result"
| "nextDev" | "nextDev"