From f1f3e1054fab21ee0abbb02a8704633f8616234e Mon Sep 17 00:00:00 2001 From: yaroslav8765 Date: Tue, 28 Apr 2026 11:04:40 +0300 Subject: [PATCH] fix!: move plugin to the global scope BREAKING CHANGE: plugin should be moved to the index.ts to the globalPlugins --- index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index a6e9eda..6c4cf8f 100644 --- a/index.ts +++ b/index.ts @@ -76,6 +76,7 @@ export default class AdminForthAgentPlugin extends AdminForthPlugin { options: PluginOptions; apiBasedTools: Record = {}; agentSystemPromptPromise: Promise; + pluginsScope: "resource" | "global" = "global"; private checkpointer: BaseCheckpointSaver | null = null; private readonly modelsByModeName = new Map< string, @@ -181,8 +182,8 @@ export default class AdminForthAgentPlugin extends AdminForthPlugin { this.shouldHaveSingleInstancePerWholeApp = () => false; } - async modifyResourceConfig(adminforth: IAdminForth, resourceConfig: AdminForthResource) { - super.modifyResourceConfig(adminforth, resourceConfig); + async modifyGlobalConfig(adminforth: IAdminForth) { + super.modifyGlobalConfig(adminforth); if (!this.options.modes?.length) { throw new Error("modes is required for AdminForthAgentPlugin"); }