style: lint cleanup
This commit is contained in:
@@ -73,9 +73,11 @@ describe("agents_list", () => {
|
||||
if (!tool) throw new Error("missing agents_list tool");
|
||||
|
||||
const result = await tool.execute("call2", {});
|
||||
const agents = (result.details as {
|
||||
agents?: Array<{ id: string }>;
|
||||
}).agents;
|
||||
const agents = (
|
||||
result.details as {
|
||||
agents?: Array<{ id: string }>;
|
||||
}
|
||||
).agents;
|
||||
expect(agents?.map((agent) => agent.id)).toEqual(["main", "research"]);
|
||||
});
|
||||
|
||||
@@ -111,9 +113,11 @@ describe("agents_list", () => {
|
||||
expect(result.details).toMatchObject({
|
||||
allowAny: true,
|
||||
});
|
||||
const agents = (result.details as {
|
||||
agents?: Array<{ id: string }>;
|
||||
}).agents;
|
||||
const agents = (
|
||||
result.details as {
|
||||
agents?: Array<{ id: string }>;
|
||||
}
|
||||
).agents;
|
||||
expect(agents?.map((agent) => agent.id)).toEqual([
|
||||
"main",
|
||||
"coder",
|
||||
@@ -144,9 +148,11 @@ describe("agents_list", () => {
|
||||
if (!tool) throw new Error("missing agents_list tool");
|
||||
|
||||
const result = await tool.execute("call4", {});
|
||||
const agents = (result.details as {
|
||||
agents?: Array<{ id: string; configured: boolean }>;
|
||||
}).agents;
|
||||
const agents = (
|
||||
result.details as {
|
||||
agents?: Array<{ id: string; configured: boolean }>;
|
||||
}
|
||||
).agents;
|
||||
expect(agents?.map((agent) => agent.id)).toEqual(["main", "research"]);
|
||||
const research = agents?.find((agent) => agent.id === "research");
|
||||
expect(research?.configured).toBe(false);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import { createAgentsListTool } from "./tools/agents-list-tool.js";
|
||||
import { createBrowserTool } from "./tools/browser-tool.js";
|
||||
import { createCanvasTool } from "./tools/canvas-tool.js";
|
||||
import { createAgentsListTool } from "./tools/agents-list-tool.js";
|
||||
import type { AnyAgentTool } from "./tools/common.js";
|
||||
import { createCronTool } from "./tools/cron-tool.js";
|
||||
import { createDiscordTool } from "./tools/discord-tool.js";
|
||||
|
||||
@@ -28,14 +28,14 @@ export async function runAgentStep(params: {
|
||||
const stepIdem = crypto.randomUUID();
|
||||
const response = (await callGateway({
|
||||
method: "agent",
|
||||
params: {
|
||||
message: params.message,
|
||||
sessionKey: params.sessionKey,
|
||||
idempotencyKey: stepIdem,
|
||||
deliver: false,
|
||||
lane: params.lane ?? "nested",
|
||||
extraSystemPrompt: params.extraSystemPrompt,
|
||||
},
|
||||
params: {
|
||||
message: params.message,
|
||||
sessionKey: params.sessionKey,
|
||||
idempotencyKey: stepIdem,
|
||||
deliver: false,
|
||||
lane: params.lane ?? "nested",
|
||||
extraSystemPrompt: params.extraSystemPrompt,
|
||||
},
|
||||
timeoutMs: 10_000,
|
||||
})) as { runId?: string; acceptedAt?: number };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user