chore(lint): fix unused vars and formatting

This commit is contained in:
Peter Steinberger
2026-01-18 05:38:23 +00:00
parent 2dabce59ce
commit 8350758635
5 changed files with 9 additions and 24 deletions

View File

@@ -58,7 +58,6 @@ async function resolveContextReport(
sessionKey: params.sessionKey, sessionKey: params.sessionKey,
sessionId: params.sessionEntry?.sessionId, sessionId: params.sessionEntry?.sessionId,
}); });
const bootstrapFiles: WorkspaceBootstrapFile[] = hookAdjustedBootstrapFiles;
const injectedFiles = buildBootstrapContextFiles(hookAdjustedBootstrapFiles, { const injectedFiles = buildBootstrapContextFiles(hookAdjustedBootstrapFiles, {
maxChars: bootstrapMaxChars, maxChars: bootstrapMaxChars,
}); });

View File

@@ -8,8 +8,7 @@ metadata:
{ {
"emoji": "😈", "emoji": "😈",
"events": ["agent:bootstrap"], "events": ["agent:bootstrap"],
"requires": "requires": { "config": ["hooks.internal.entries.soul-evil.enabled"] },
{ "config": ["hooks.internal.entries.soul-evil.enabled"] },
"install": [{ "id": "bundled", "kind": "bundled", "label": "Bundled with Clawdbot" }], "install": [{ "id": "bundled", "kind": "bundled", "label": "Bundled with Clawdbot" }],
}, },
} }

View File

@@ -2,10 +2,7 @@ import type { ClawdbotConfig } from "../../../config/config.js";
import { isSubagentSessionKey } from "../../../routing/session-key.js"; import { isSubagentSessionKey } from "../../../routing/session-key.js";
import { resolveHookConfig } from "../../config.js"; import { resolveHookConfig } from "../../config.js";
import type { AgentBootstrapHookContext, HookHandler } from "../../hooks.js"; import type { AgentBootstrapHookContext, HookHandler } from "../../hooks.js";
import { import { applySoulEvilOverride, type SoulEvilConfig } from "../../soul-evil.js";
applySoulEvilOverride,
type SoulEvilConfig,
} from "../../soul-evil.js";
const HOOK_KEY = "soul-evil"; const HOOK_KEY = "soul-evil";
@@ -16,9 +13,10 @@ function resolveSoulEvilConfig(entry: Record<string, unknown> | undefined): Soul
const purge = const purge =
entry.purge && typeof entry.purge === "object" entry.purge && typeof entry.purge === "object"
? { ? {
at: typeof (entry.purge as { at?: unknown }).at === "string" at:
? (entry.purge as { at?: string }).at typeof (entry.purge as { at?: unknown }).at === "string"
: undefined, ? (entry.purge as { at?: string }).at
: undefined,
duration: duration:
typeof (entry.purge as { duration?: unknown }).duration === "string" typeof (entry.purge as { duration?: unknown }).duration === "string"
? (entry.purge as { duration?: string }).duration ? (entry.purge as { duration?: string }).duration

View File

@@ -4,15 +4,8 @@ import path from "node:path";
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { import { applySoulEvilOverride, decideSoulEvil, DEFAULT_SOUL_EVIL_FILENAME } from "./soul-evil.js";
applySoulEvilOverride, import { DEFAULT_SOUL_FILENAME, type WorkspaceBootstrapFile } from "../agents/workspace.js";
decideSoulEvil,
DEFAULT_SOUL_EVIL_FILENAME,
} from "./soul-evil.js";
import {
DEFAULT_SOUL_FILENAME,
type WorkspaceBootstrapFile,
} from "../agents/workspace.js";
const makeFiles = (overrides?: Partial<WorkspaceBootstrapFile>) => [ const makeFiles = (overrides?: Partial<WorkspaceBootstrapFile>) => [
{ {

View File

@@ -73,11 +73,7 @@ function timeOfDayMsInTimezone(date: Date, timeZone: string): number | null {
const hour = Number.parseInt(map.hour, 10); const hour = Number.parseInt(map.hour, 10);
const minute = Number.parseInt(map.minute, 10); const minute = Number.parseInt(map.minute, 10);
const second = Number.parseInt(map.second, 10); const second = Number.parseInt(map.second, 10);
if ( if (!Number.isFinite(hour) || !Number.isFinite(minute) || !Number.isFinite(second)) {
!Number.isFinite(hour) ||
!Number.isFinite(minute) ||
!Number.isFinite(second)
) {
return null; return null;
} }
return (hour * 3600 + minute * 60 + second) * 1000 + date.getMilliseconds(); return (hour * 3600 + minute * 60 + second) * 1000 + date.getMilliseconds();