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,
sessionId: params.sessionEntry?.sessionId,
});
const bootstrapFiles: WorkspaceBootstrapFile[] = hookAdjustedBootstrapFiles;
const injectedFiles = buildBootstrapContextFiles(hookAdjustedBootstrapFiles, {
maxChars: bootstrapMaxChars,
});

View File

@@ -8,8 +8,7 @@ metadata:
{
"emoji": "😈",
"events": ["agent:bootstrap"],
"requires":
{ "config": ["hooks.internal.entries.soul-evil.enabled"] },
"requires": { "config": ["hooks.internal.entries.soul-evil.enabled"] },
"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 { resolveHookConfig } from "../../config.js";
import type { AgentBootstrapHookContext, HookHandler } from "../../hooks.js";
import {
applySoulEvilOverride,
type SoulEvilConfig,
} from "../../soul-evil.js";
import { applySoulEvilOverride, type SoulEvilConfig } from "../../soul-evil.js";
const HOOK_KEY = "soul-evil";
@@ -16,9 +13,10 @@ function resolveSoulEvilConfig(entry: Record<string, unknown> | undefined): Soul
const purge =
entry.purge && typeof entry.purge === "object"
? {
at: typeof (entry.purge as { at?: unknown }).at === "string"
? (entry.purge as { at?: string }).at
: undefined,
at:
typeof (entry.purge as { at?: unknown }).at === "string"
? (entry.purge as { at?: string }).at
: undefined,
duration:
typeof (entry.purge as { duration?: unknown }).duration === "string"
? (entry.purge as { duration?: string }).duration

View File

@@ -4,15 +4,8 @@ import path from "node:path";
import { describe, expect, it } from "vitest";
import {
applySoulEvilOverride,
decideSoulEvil,
DEFAULT_SOUL_EVIL_FILENAME,
} from "./soul-evil.js";
import {
DEFAULT_SOUL_FILENAME,
type WorkspaceBootstrapFile,
} from "../agents/workspace.js";
import { applySoulEvilOverride, decideSoulEvil, DEFAULT_SOUL_EVIL_FILENAME } from "./soul-evil.js";
import { DEFAULT_SOUL_FILENAME, type WorkspaceBootstrapFile } from "../agents/workspace.js";
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 minute = Number.parseInt(map.minute, 10);
const second = Number.parseInt(map.second, 10);
if (
!Number.isFinite(hour) ||
!Number.isFinite(minute) ||
!Number.isFinite(second)
) {
if (!Number.isFinite(hour) || !Number.isFinite(minute) || !Number.isFinite(second)) {
return null;
}
return (hour * 3600 + minute * 60 + second) * 1000 + date.getMilliseconds();