fix(FN-1952): restore pi auth and extension loading

This commit is contained in:
gsxdsm
2026-04-16 21:42:16 -07:00
parent 22e411a82b
commit 32a92e961e
30 changed files with 644 additions and 72 deletions

View File

@@ -87,6 +87,10 @@ export class PluginLoader extends EventEmitter<{
super();
}
private getProjectRoot(): string {
return this.options.taskStore.getRootDir();
}
// ── Context Creation ───────────────────────────────────────────────
private async createContext(plugin: FusionPlugin): Promise<PluginContext> {
@@ -247,11 +251,11 @@ export class PluginLoader extends EventEmitter<{
if (path.startsWith("@") || path.includes("/")) {
// For npm packages, we'd use require.resolve in a real implementation
// For now, assume it's a local path relative to project root
return resolve(process.cwd(), path);
return resolve(this.getProjectRoot(), path);
}
// Default: resolve relative to project root
return resolve(process.cwd(), path);
return resolve(this.getProjectRoot(), path);
}
private async importPluginModule(path: string, bypassCache = false): Promise<unknown> {