Fix TTLCache import and rename schedule provider resolver

This commit is contained in:
Mohamed Boudra
2026-04-21 14:19:51 +07:00
parent 515ba62be6
commit ebf8a21c08
3 changed files with 3 additions and 6 deletions
@@ -10,10 +10,7 @@ import { createAgentMcpServer } from "./mcp-server.js";
import type { AgentManager, ManagedAgent } from "./agent-manager.js";
import type { AgentStorage, StoredAgentRecord } from "./agent-storage.js";
import type { ProviderDefinition } from "./provider-registry.js";
import {
AgentListItemPayloadSchema,
AgentSnapshotPayloadSchema,
} from "../../shared/messages.js";
import { AgentListItemPayloadSchema, AgentSnapshotPayloadSchema } from "../../shared/messages.js";
import type { PersistedProjectRecord, PersistedWorkspaceRecord } from "../workspace-registry.js";
import type { CreateScheduleInput, StoredSchedule } from "../schedule/types.js";
import {
@@ -1408,7 +1408,7 @@ export async function createAgentMcpServer(options: AgentMcpServerOptions): Prom
throw new Error("cwd can only differ from the caller agent when target=new-agent");
}
if (provider !== undefined) {
const resolved = resolveProviderAndModel({
const resolved = resolveScheduleProviderAndModel({
provider,
defaultProvider: callerAgent.provider,
});
+1 -1
View File
@@ -1,7 +1,7 @@
import { resolve, dirname, basename } from "path";
import { existsSync, realpathSync } from "fs";
import { open as openFile, stat as statFile } from "fs/promises";
import TTLCache from "@isaacs/ttlcache";
import { TTLCache } from "@isaacs/ttlcache";
import type { ParsedDiffFile } from "../server/utils/diff-highlighter.js";
import { parseAndHighlightDiff } from "../server/utils/diff-highlighter.js";
import {