chore: Enable typescript/no-explicit-any rule.

This commit is contained in:
cpojer
2026-02-02 15:45:05 +09:00
parent baa1e95b9d
commit 935a0e5708
65 changed files with 248 additions and 80 deletions
+8
View File
@@ -15,7 +15,9 @@ async function loadRunEmbeddedPiAgent(): Promise<RunEmbeddedPiAgentFn> {
// Source checkout (tests/dev)
try {
const mod = await import("../../../src/agents/pi-embedded-runner.js");
// oxlint-disable-next-line typescript/no-explicit-any
if (typeof (mod as any).runEmbeddedPiAgent === "function") {
// oxlint-disable-next-line typescript/no-explicit-any
return (mod as any).runEmbeddedPiAgent;
}
} catch {
@@ -111,7 +113,9 @@ export function createLlmTaskTool(api: OpenClawPluginApi) {
undefined;
const authProfileId =
// oxlint-disable-next-line typescript/no-explicit-any
(typeof (params as any).authProfileId === "string" &&
// oxlint-disable-next-line typescript/no-explicit-any
(params as any).authProfileId.trim()) ||
(typeof pluginCfg.defaultAuthProfileId === "string" &&
pluginCfg.defaultAuthProfileId.trim()) ||
@@ -150,6 +154,7 @@ export function createLlmTaskTool(api: OpenClawPluginApi) {
: undefined,
};
// oxlint-disable-next-line typescript/no-explicit-any
const input = (params as any).input as unknown;
let inputJson: string;
try {
@@ -192,6 +197,7 @@ export function createLlmTaskTool(api: OpenClawPluginApi) {
disableTools: true,
});
// oxlint-disable-next-line typescript/no-explicit-any
const text = collectText((result as any).payloads);
if (!text) {
throw new Error("LLM returned empty output");
@@ -205,9 +211,11 @@ export function createLlmTaskTool(api: OpenClawPluginApi) {
throw new Error("LLM returned invalid JSON");
}
// oxlint-disable-next-line typescript/no-explicit-any
const schema = (params as any).schema as unknown;
if (schema && typeof schema === "object" && !Array.isArray(schema)) {
const ajv = new Ajv({ allErrors: true, strict: false });
// oxlint-disable-next-line typescript/no-explicit-any
const validate = ajv.compile(schema as any);
const ok = validate(parsed);
if (!ok) {