feat(FN-3096): update restart integration store mock for plugin templates
Updates the restart integration test mock to account for plugin template behavior, keeping the test in sync with recent plugin template changes. Fusion-Task-Id: FN-3096
This commit is contained in:
@@ -266,6 +266,7 @@ function createMockStore() {
|
||||
updateStep: vi.fn().mockResolvedValue({}),
|
||||
getWorkflowStep: vi.fn().mockResolvedValue(undefined),
|
||||
listWorkflowSteps: vi.fn().mockResolvedValue([]),
|
||||
setPluginWorkflowStepTemplates: vi.fn(),
|
||||
appendAgentLog: vi.fn().mockResolvedValue(undefined),
|
||||
getFusionDir: vi.fn().mockReturnValue("/tmp/test/.fusion"),
|
||||
clearStaleBaseBranchReferences: vi.fn().mockReturnValue([]),
|
||||
@@ -7732,6 +7733,88 @@ describe("Workflow Steps Execution", () => {
|
||||
expect(store.moveTask).toHaveBeenCalledWith("FN-001", "in-review");
|
||||
});
|
||||
|
||||
it("executes plugin-prefixed workflow steps", async () => {
|
||||
const store = createMockStore();
|
||||
|
||||
store.getTask.mockResolvedValue({
|
||||
id: "FN-001",
|
||||
title: "Test",
|
||||
description: "Test task",
|
||||
column: "in-progress",
|
||||
dependencies: [],
|
||||
steps: [{ name: "Preflight", status: "pending" }],
|
||||
currentStep: 0,
|
||||
log: [],
|
||||
enabledWorkflowSteps: ["plugin:agent-browser:workflow-check"],
|
||||
prompt: "# test\n## Steps\n### Step 0: Preflight\n- [ ] check",
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
});
|
||||
|
||||
store.getWorkflowStep.mockResolvedValue({
|
||||
id: "plugin:agent-browser:workflow-check",
|
||||
name: "Plugin Workflow Check",
|
||||
description: "Plugin contributed step",
|
||||
prompt: "Run plugin check",
|
||||
enabled: true,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
});
|
||||
|
||||
let callIdx = 0;
|
||||
mockedCreateFnAgent.mockImplementation((async (opts: any) => {
|
||||
callIdx++;
|
||||
if (callIdx === 1) {
|
||||
const customTools = opts.customTools || [];
|
||||
return {
|
||||
session: {
|
||||
prompt: vi.fn().mockImplementation(async () => {
|
||||
const taskDoneTool = customTools.find((t: any) => t.name === "fn_task_done");
|
||||
if (taskDoneTool) await taskDoneTool.execute("tool-1", {});
|
||||
}),
|
||||
dispose: vi.fn(),
|
||||
subscribe: vi.fn(),
|
||||
on: vi.fn(),
|
||||
sessionManager: { getLeafId: vi.fn().mockReturnValue("leaf-1") },
|
||||
state: {},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
session: {
|
||||
prompt: vi.fn().mockResolvedValue(undefined),
|
||||
dispose: vi.fn(),
|
||||
subscribe: vi.fn(),
|
||||
on: vi.fn(),
|
||||
state: {},
|
||||
},
|
||||
};
|
||||
}) as any);
|
||||
|
||||
const executor = new TaskExecutor(store, "/tmp/test", {});
|
||||
|
||||
await executor.execute({
|
||||
id: "FN-001",
|
||||
title: "Test",
|
||||
description: "Test task",
|
||||
column: "in-progress",
|
||||
dependencies: [],
|
||||
steps: [{ name: "Preflight", status: "pending" }],
|
||||
currentStep: 0,
|
||||
log: [],
|
||||
enabledWorkflowSteps: ["plugin:agent-browser:workflow-check"],
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
});
|
||||
|
||||
expect(store.setPluginWorkflowStepTemplates).toHaveBeenCalledWith([]);
|
||||
expect(store.logEntry).toHaveBeenCalledWith(
|
||||
"FN-001",
|
||||
"[pre-merge] Starting plugin workflow step: Plugin Workflow Check (plugin:agent-browser:workflow-check)",
|
||||
);
|
||||
});
|
||||
|
||||
it("runs browser verification workflow steps with coding tools", async () => {
|
||||
const store = createMockStore();
|
||||
|
||||
@@ -8274,6 +8357,152 @@ describe("Workflow Steps Execution", () => {
|
||||
expect(JSON.stringify(updatePayloads)).not.toContain("all tests passed");
|
||||
});
|
||||
|
||||
it("executes plugin script-mode workflow step successfully", async () => {
|
||||
const store = createMockStore();
|
||||
|
||||
store.getSettings.mockResolvedValue({
|
||||
maxConcurrent: 2,
|
||||
maxWorktrees: 4,
|
||||
scripts: { test: "echo 'all tests passed'" },
|
||||
});
|
||||
|
||||
store.getTask.mockResolvedValue({
|
||||
id: "FN-001",
|
||||
title: "Test",
|
||||
description: "Test task",
|
||||
column: "in-progress",
|
||||
dependencies: [],
|
||||
steps: [{ name: "Preflight", status: "pending" }],
|
||||
currentStep: 0,
|
||||
log: [],
|
||||
enabledWorkflowSteps: ["plugin:agent-browser:script-check"],
|
||||
prompt: "# test\n## Steps\n### Step 0: Preflight\n- [ ] check",
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
});
|
||||
|
||||
store.getWorkflowStep.mockResolvedValue({
|
||||
id: "plugin:agent-browser:script-check",
|
||||
name: "Plugin Script Check",
|
||||
description: "Execute plugin script",
|
||||
mode: "script",
|
||||
prompt: "",
|
||||
scriptName: "test",
|
||||
enabled: true,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
});
|
||||
|
||||
mockedExecSync.mockImplementation((cmd: string | string[]) => {
|
||||
if (typeof cmd === "string" && cmd.includes("echo")) return Buffer.from("all tests passed\n");
|
||||
return Buffer.from("");
|
||||
});
|
||||
|
||||
createAgentWithTaskDone();
|
||||
const executor = new TaskExecutor(store, "/tmp/test", {});
|
||||
|
||||
await executor.execute({
|
||||
id: "FN-001",
|
||||
title: "Test",
|
||||
description: "Test task",
|
||||
column: "in-progress",
|
||||
dependencies: [],
|
||||
steps: [{ name: "Preflight", status: "pending" }],
|
||||
currentStep: 0,
|
||||
log: [],
|
||||
enabledWorkflowSteps: ["plugin:agent-browser:script-check"],
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
});
|
||||
|
||||
expect(mockedCreateFnAgent).toHaveBeenCalledTimes(1);
|
||||
expect(store.updateTask).toHaveBeenCalledWith(
|
||||
"FN-001",
|
||||
expect.objectContaining({
|
||||
workflowStepResults: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
workflowStepId: "plugin:agent-browser:script-check",
|
||||
status: "passed",
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it("executes mixed db and plugin workflow steps in sequence", async () => {
|
||||
const store = createMockStore();
|
||||
|
||||
store.getTask.mockResolvedValue({
|
||||
id: "FN-001",
|
||||
title: "Test",
|
||||
description: "Test task",
|
||||
column: "in-progress",
|
||||
dependencies: [],
|
||||
steps: [{ name: "Preflight", status: "pending" }],
|
||||
currentStep: 0,
|
||||
log: [],
|
||||
enabledWorkflowSteps: ["WS-001", "plugin:agent-browser:workflow-check"],
|
||||
prompt: "# test\n## Steps\n### Step 0: Preflight\n- [ ] check",
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
});
|
||||
|
||||
store.getWorkflowStep.mockImplementation(async (id: string) => id === "WS-001"
|
||||
? {
|
||||
id: "WS-001", name: "DB Step", description: "DB", prompt: "Run DB step", enabled: true,
|
||||
createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(),
|
||||
}
|
||||
: {
|
||||
id: "plugin:agent-browser:workflow-check", name: "Plugin Step", description: "Plugin", prompt: "Run plugin step", enabled: true,
|
||||
createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(),
|
||||
});
|
||||
|
||||
let callIdx = 0;
|
||||
mockedCreateFnAgent.mockImplementation((async (opts: any) => {
|
||||
callIdx++;
|
||||
if (callIdx === 1) {
|
||||
const customTools = opts.customTools || [];
|
||||
return { session: { prompt: vi.fn().mockImplementation(async () => {
|
||||
const taskDoneTool = customTools.find((t: any) => t.name === "fn_task_done");
|
||||
if (taskDoneTool) await taskDoneTool.execute("tool-1", {});
|
||||
}), dispose: vi.fn(), subscribe: vi.fn(), on: vi.fn(), sessionManager: { getLeafId: vi.fn().mockReturnValue("leaf-1") }, state: {} } };
|
||||
}
|
||||
return { session: { prompt: vi.fn().mockResolvedValue(undefined), dispose: vi.fn(), subscribe: vi.fn(), on: vi.fn(), state: {} } };
|
||||
}) as any);
|
||||
|
||||
const executor = new TaskExecutor(store, "/tmp/test", {});
|
||||
await executor.execute({
|
||||
id: "FN-001", title: "Test", description: "Test task", column: "in-progress", dependencies: [],
|
||||
steps: [{ name: "Preflight", status: "pending" }], currentStep: 0, log: [],
|
||||
enabledWorkflowSteps: ["WS-001", "plugin:agent-browser:workflow-check"], createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(),
|
||||
});
|
||||
|
||||
expect(store.getWorkflowStep).toHaveBeenNthCalledWith(1, "WS-001");
|
||||
expect(store.getWorkflowStep).toHaveBeenNthCalledWith(2, "plugin:agent-browser:workflow-check");
|
||||
expect(mockedCreateFnAgent).toHaveBeenCalledTimes(3);
|
||||
});
|
||||
|
||||
it("skips missing plugin workflow step IDs with warning log", async () => {
|
||||
const store = createMockStore();
|
||||
|
||||
store.getTask.mockResolvedValue({
|
||||
id: "FN-001", title: "Test", description: "Test task", column: "in-progress", dependencies: [],
|
||||
steps: [{ name: "Preflight", status: "pending" }], currentStep: 0, log: [],
|
||||
enabledWorkflowSteps: ["plugin:missing:step"], prompt: "# test", createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(),
|
||||
});
|
||||
store.getWorkflowStep.mockResolvedValue(undefined);
|
||||
createAgentWithTaskDone();
|
||||
|
||||
const executor = new TaskExecutor(store, "/tmp/test", {});
|
||||
await executor.execute({
|
||||
id: "FN-001", title: "Test", description: "Test task", column: "in-progress", dependencies: [],
|
||||
steps: [{ name: "Preflight", status: "pending" }], currentStep: 0, log: [], enabledWorkflowSteps: ["plugin:missing:step"],
|
||||
createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(),
|
||||
});
|
||||
|
||||
expect(store.logEntry).toHaveBeenCalledWith("FN-001", "[pre-merge] Workflow step plugin:missing:step not found — skipping");
|
||||
});
|
||||
|
||||
it("sends task back to in-progress when script-mode workflow step fails with exhausted retries", async () => {
|
||||
const store = createMockStore();
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ describe("PluginRunner", () => {
|
||||
getPluginRuntimes: ReturnType<typeof vi.fn>;
|
||||
getPluginSkills: ReturnType<typeof vi.fn>;
|
||||
getPluginWorkflowSteps: ReturnType<typeof vi.fn>;
|
||||
getPluginWorkflowStepTemplates: ReturnType<typeof vi.fn>;
|
||||
getPluginPromptContributions: ReturnType<typeof vi.fn>;
|
||||
getPluginSetupInfo: ReturnType<typeof vi.fn>;
|
||||
getLoadedPlugins: ReturnType<typeof vi.fn>;
|
||||
@@ -96,6 +97,7 @@ describe("PluginRunner", () => {
|
||||
getPluginRuntimes: vi.fn().mockReturnValue([]),
|
||||
getPluginSkills: vi.fn().mockReturnValue([]),
|
||||
getPluginWorkflowSteps: vi.fn().mockReturnValue([]),
|
||||
getPluginWorkflowStepTemplates: vi.fn().mockReturnValue([]),
|
||||
getPluginPromptContributions: vi.fn().mockReturnValue([]),
|
||||
getPluginSetupInfo: vi.fn().mockReturnValue([]),
|
||||
getLoadedPlugins: vi.fn().mockReturnValue([]),
|
||||
@@ -793,15 +795,18 @@ describe("PluginRunner", () => {
|
||||
expect(second).toBe(first);
|
||||
});
|
||||
|
||||
it("returns workflow steps, prompt contributions, and setup info", async () => {
|
||||
it("returns workflow steps, workflow step templates, prompt contributions, and setup info", async () => {
|
||||
const steps = [{ pluginId: "test-plugin", step: { stepId: "ws1", name: "Step", description: "d", mode: "prompt", prompt: "Run checks" } }];
|
||||
const templates = [{ pluginId: "test-plugin", template: { id: "plugin:test-plugin:ws1", name: "Step", description: "d", prompt: "Run checks", category: "Plugin", icon: "puzzle" } }];
|
||||
const prompts = [{ pluginId: "test-plugin", contribution: { surface: "executor-system", content: "extra" }, config: { enabledByDefault: true, contributions: [] } }];
|
||||
const setups = [{ pluginId: "test-plugin", manifest: { binaryName: "agent-browser", description: "Do it" }, hooks: { checkSetup: vi.fn().mockResolvedValue({ status: "installed" }) } }];
|
||||
mockPluginLoader.getPluginWorkflowSteps.mockReturnValue(steps);
|
||||
mockPluginLoader.getPluginWorkflowStepTemplates.mockReturnValue(templates);
|
||||
mockPluginLoader.getPluginPromptContributions.mockReturnValue(prompts);
|
||||
mockPluginLoader.getPluginSetupInfo.mockReturnValue(setups);
|
||||
await pluginRunner.init();
|
||||
expect(pluginRunner.getPluginWorkflowSteps()).toEqual(steps);
|
||||
expect(pluginRunner.getPluginWorkflowStepTemplates()).toEqual(templates);
|
||||
expect(pluginRunner.getPluginPromptContributions()).toEqual(prompts);
|
||||
expect(pluginRunner.getPluginSetupInfo()).toEqual(setups);
|
||||
});
|
||||
@@ -832,6 +837,7 @@ describe("PluginRunner", () => {
|
||||
await pluginRunner.init();
|
||||
pluginRunner.getPluginSkills();
|
||||
pluginRunner.getPluginWorkflowSteps();
|
||||
pluginRunner.getPluginWorkflowStepTemplates();
|
||||
pluginRunner.getPluginPromptContributions();
|
||||
pluginRunner.getPluginSetupInfo();
|
||||
|
||||
@@ -839,6 +845,7 @@ describe("PluginRunner", () => {
|
||||
stateChanged?.();
|
||||
pluginRunner.getPluginSkills();
|
||||
pluginRunner.getPluginWorkflowSteps();
|
||||
pluginRunner.getPluginWorkflowStepTemplates();
|
||||
pluginRunner.getPluginPromptContributions();
|
||||
pluginRunner.getPluginSetupInfo();
|
||||
|
||||
@@ -846,11 +853,13 @@ describe("PluginRunner", () => {
|
||||
loaded?.({ pluginId: "test-plugin" });
|
||||
pluginRunner.getPluginSkills();
|
||||
pluginRunner.getPluginWorkflowSteps();
|
||||
pluginRunner.getPluginWorkflowStepTemplates();
|
||||
pluginRunner.getPluginPromptContributions();
|
||||
pluginRunner.getPluginSetupInfo();
|
||||
|
||||
expect(mockPluginLoader.getPluginSkills).toHaveBeenCalledTimes(3);
|
||||
expect(mockPluginLoader.getPluginWorkflowSteps).toHaveBeenCalledTimes(3);
|
||||
expect(mockPluginLoader.getPluginWorkflowStepTemplates).toHaveBeenCalledTimes(3);
|
||||
expect(mockPluginLoader.getPluginPromptContributions).toHaveBeenCalledTimes(3);
|
||||
expect(mockPluginLoader.getPluginSetupInfo).toHaveBeenCalledTimes(3);
|
||||
});
|
||||
|
||||
@@ -212,6 +212,7 @@ function createMockStore(overrides: Record<string, any> = {}) {
|
||||
parseStepsFromPrompt: vi.fn().mockResolvedValue([]),
|
||||
parseFileScopeFromPrompt: vi.fn().mockResolvedValue([]),
|
||||
getSettings: vi.fn().mockResolvedValue({ ...DEFAULT_SETTINGS }),
|
||||
setPluginWorkflowStepTemplates: vi.fn(),
|
||||
getRootDir: vi.fn().mockReturnValue("/tmp/root"),
|
||||
getFusionDir: vi.fn().mockReturnValue("/tmp/root/.fusion"),
|
||||
getTasksDir: vi.fn().mockReturnValue("/tmp/root/.fusion/tasks"),
|
||||
|
||||
@@ -2004,6 +2004,12 @@ export class TaskExecutor {
|
||||
// Fetch settings early — needed for worktree naming and later configuration
|
||||
const settings = await this.store.getSettings();
|
||||
|
||||
// Keep runtime plugin workflow step templates synchronized into TaskStore.
|
||||
// TaskStore resolves plugin-prefixed workflow IDs from this injected cache
|
||||
// to avoid a PluginLoader↔TaskStore circular dependency.
|
||||
const pluginWorkflowStepTemplates = this.options.pluginRunner?.getPluginWorkflowStepTemplates() ?? [];
|
||||
this.store.setPluginWorkflowStepTemplates(pluginWorkflowStepTemplates);
|
||||
|
||||
// Read execution mode to determine whether to skip review and workflow steps
|
||||
const executionMode = task.executionMode ?? "standard";
|
||||
|
||||
@@ -4927,7 +4933,11 @@ ${failureFeedback}
|
||||
return "deferred-paused";
|
||||
}
|
||||
|
||||
await this.store.logEntry(task.id, `[pre-merge] Starting workflow step: ${ws.name} (${stepMode} mode)`);
|
||||
if (ws.id.startsWith("plugin:")) {
|
||||
await this.store.logEntry(task.id, `[pre-merge] Starting plugin workflow step: ${ws.name} (${ws.id})`);
|
||||
} else {
|
||||
await this.store.logEntry(task.id, `[pre-merge] Starting workflow step: ${ws.name} (${stepMode} mode)`);
|
||||
}
|
||||
executorLog.log(`${task.id} — [pre-merge] running workflow step: ${ws.name} (${stepMode} mode)`);
|
||||
|
||||
const startedAt = new Date().toISOString();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* and provides plugin tools to agent sessions.
|
||||
*/
|
||||
|
||||
import type { TaskStore, Task } from "@fusion/core";
|
||||
import type { TaskStore, Task, WorkflowStepTemplate } from "@fusion/core";
|
||||
import type {
|
||||
PluginLoader,
|
||||
PluginStore,
|
||||
@@ -86,6 +86,11 @@ interface CachedWorkflowSteps {
|
||||
version: number;
|
||||
}
|
||||
|
||||
interface CachedWorkflowStepTemplates {
|
||||
templates: Array<{ pluginId: string; template: WorkflowStepTemplate }>;
|
||||
version: number;
|
||||
}
|
||||
|
||||
interface CachedPromptContributions {
|
||||
contributions: Array<{
|
||||
pluginId: string;
|
||||
@@ -110,6 +115,7 @@ export class PluginRunner {
|
||||
private cachedRuntimes: CachedRuntimes | null = null;
|
||||
private cachedSkills: CachedSkills | null = null;
|
||||
private cachedWorkflowSteps: CachedWorkflowSteps | null = null;
|
||||
private cachedWorkflowStepTemplates: CachedWorkflowStepTemplates | null = null;
|
||||
private cachedPromptContributions: CachedPromptContributions | null = null;
|
||||
private cachedSetupInfo: CachedSetupInfo | null = null;
|
||||
private toolsCacheVersion = 0;
|
||||
@@ -118,6 +124,7 @@ export class PluginRunner {
|
||||
private runtimesCacheVersion = 0;
|
||||
private skillsCacheVersion = 0;
|
||||
private workflowStepsCacheVersion = 0;
|
||||
private workflowStepTemplatesCacheVersion = 0;
|
||||
private promptContributionsCacheVersion = 0;
|
||||
private setupCacheVersion = 0;
|
||||
private hookTimeoutMs: number;
|
||||
@@ -192,6 +199,7 @@ export class PluginRunner {
|
||||
this.invalidateRuntimesCache();
|
||||
this.invalidateSkillsCache();
|
||||
this.invalidateWorkflowStepsCache();
|
||||
this.invalidateWorkflowStepTemplatesCache();
|
||||
this.invalidatePromptContributionsCache();
|
||||
this.invalidateSetupCache();
|
||||
}
|
||||
@@ -310,6 +318,16 @@ export class PluginRunner {
|
||||
return this.cachedWorkflowSteps.steps;
|
||||
}
|
||||
|
||||
getPluginWorkflowStepTemplates(): Array<{ pluginId: string; template: WorkflowStepTemplate }> {
|
||||
if (!this.cachedWorkflowStepTemplates || this.cachedWorkflowStepTemplates.version !== this.workflowStepTemplatesCacheVersion) {
|
||||
this.cachedWorkflowStepTemplates = {
|
||||
templates: this.options.pluginLoader.getPluginWorkflowStepTemplates(),
|
||||
version: this.workflowStepTemplatesCacheVersion,
|
||||
};
|
||||
}
|
||||
return this.cachedWorkflowStepTemplates.templates;
|
||||
}
|
||||
|
||||
getPluginPromptContributions(): Array<{
|
||||
pluginId: string;
|
||||
contribution: PluginPromptContribution;
|
||||
@@ -389,6 +407,7 @@ export class PluginRunner {
|
||||
this.invalidateRuntimesCache();
|
||||
this.invalidateSkillsCache();
|
||||
this.invalidateWorkflowStepsCache();
|
||||
this.invalidateWorkflowStepTemplatesCache();
|
||||
this.invalidatePromptContributionsCache();
|
||||
this.invalidateSetupCache();
|
||||
executorLog.log(`Plugin ${pluginId} reloaded`);
|
||||
@@ -407,6 +426,7 @@ export class PluginRunner {
|
||||
this.invalidateRuntimesCache();
|
||||
this.invalidateSkillsCache();
|
||||
this.invalidateWorkflowStepsCache();
|
||||
this.invalidateWorkflowStepTemplatesCache();
|
||||
this.invalidatePromptContributionsCache();
|
||||
this.invalidateSetupCache();
|
||||
|
||||
@@ -430,6 +450,7 @@ export class PluginRunner {
|
||||
this.invalidateRuntimesCache();
|
||||
this.invalidateSkillsCache();
|
||||
this.invalidateWorkflowStepsCache();
|
||||
this.invalidateWorkflowStepTemplatesCache();
|
||||
this.invalidatePromptContributionsCache();
|
||||
this.invalidateSetupCache();
|
||||
|
||||
@@ -453,6 +474,7 @@ export class PluginRunner {
|
||||
this.invalidateRuntimesCache();
|
||||
this.invalidateSkillsCache();
|
||||
this.invalidateWorkflowStepsCache();
|
||||
this.invalidateWorkflowStepTemplatesCache();
|
||||
this.invalidatePromptContributionsCache();
|
||||
this.invalidateSetupCache();
|
||||
|
||||
@@ -475,6 +497,7 @@ export class PluginRunner {
|
||||
this.invalidateRuntimesCache();
|
||||
this.invalidateSkillsCache();
|
||||
this.invalidateWorkflowStepsCache();
|
||||
this.invalidateWorkflowStepTemplatesCache();
|
||||
this.invalidatePromptContributionsCache();
|
||||
this.invalidateSetupCache();
|
||||
}
|
||||
@@ -489,6 +512,7 @@ export class PluginRunner {
|
||||
this.invalidateRuntimesCache();
|
||||
this.invalidateSkillsCache();
|
||||
this.invalidateWorkflowStepsCache();
|
||||
this.invalidateWorkflowStepTemplatesCache();
|
||||
this.invalidatePromptContributionsCache();
|
||||
this.invalidateSetupCache();
|
||||
}
|
||||
@@ -503,6 +527,7 @@ export class PluginRunner {
|
||||
this.invalidateRuntimesCache();
|
||||
this.invalidateSkillsCache();
|
||||
this.invalidateWorkflowStepsCache();
|
||||
this.invalidateWorkflowStepTemplatesCache();
|
||||
this.invalidatePromptContributionsCache();
|
||||
this.invalidateSetupCache();
|
||||
}
|
||||
@@ -517,6 +542,7 @@ export class PluginRunner {
|
||||
this.invalidateRuntimesCache();
|
||||
this.invalidateSkillsCache();
|
||||
this.invalidateWorkflowStepsCache();
|
||||
this.invalidateWorkflowStepTemplatesCache();
|
||||
this.invalidatePromptContributionsCache();
|
||||
this.invalidateSetupCache();
|
||||
}
|
||||
@@ -531,6 +557,7 @@ export class PluginRunner {
|
||||
this.invalidateRuntimesCache();
|
||||
this.invalidateSkillsCache();
|
||||
this.invalidateWorkflowStepsCache();
|
||||
this.invalidateWorkflowStepTemplatesCache();
|
||||
this.invalidatePromptContributionsCache();
|
||||
this.invalidateSetupCache();
|
||||
}
|
||||
@@ -748,6 +775,11 @@ export class PluginRunner {
|
||||
this.log.log(`Workflow steps cache invalidated (version: ${this.workflowStepsCacheVersion})`);
|
||||
}
|
||||
|
||||
private invalidateWorkflowStepTemplatesCache(): void {
|
||||
this.workflowStepTemplatesCacheVersion++;
|
||||
this.log.log(`Workflow step templates cache invalidated (version: ${this.workflowStepTemplatesCacheVersion})`);
|
||||
}
|
||||
|
||||
private invalidatePromptContributionsCache(): void {
|
||||
this.promptContributionsCacheVersion++;
|
||||
this.log.log(`Prompt contributions cache invalidated (version: ${this.promptContributionsCacheVersion})`);
|
||||
|
||||
Reference in New Issue
Block a user