@@ -4,7 +4,7 @@ import type { AgentProfile } from "../agent/profiles.js";
44import { AgentProfileSchema } from "../agent/profiles.js" ;
55import type { PluginModule } from "./loader.js" ;
66import type { PluginConfig } from "../config/settings.js" ;
7- import { isPluginEnabled } from "./register.js" ;
7+ import { isPluginModuleEnabled } from "./register.js" ;
88import {
99 pluginWarningSink ,
1010 type PluginLoadDiagnostics ,
@@ -34,7 +34,12 @@ function resolveAgentProfileWarningHandler(
3434// validated against the AgentProfileSchema so a malformed entry is skipped
3535// rather than crashing the sub-agent dispatcher. Enabled-only gating (no
3636// consent) is sufficient: an agent profile is configuration data (tier,
37- // capabilities, role prompt), not in-process code execution.
37+ // capabilities, role prompt), not in-process code execution. Gating uses
38+ // isPluginModuleEnabled (same as skills), so a first-party repo plugin with
39+ // manifest.defaultEnabled loads its profiles without an explicit settings
40+ // entry. This differs from tool plugins (isToolPluginActive), which require
41+ // explicit enabled+consented in settings even for repo plugins, because a
42+ // tool plugin runs in-process code rather than declaring configuration data.
3843//
3944// Warnings fire whenever a profile is rejected so JS-plugin authors get the
4045// same feedback loop data-only plugin authors already enjoy. Pass `diagnostics`
@@ -49,7 +54,7 @@ export async function resolveAgentPluginProfiles(
4954 for ( const mod of modules ) {
5055 if ( mod . manifest ?. kind !== "agent" ) continue ;
5156 if ( mod . agentPlugin === undefined ) continue ;
52- if ( ! isPluginEnabled ( config , mod . manifest . id ) ) continue ;
57+ if ( ! isPluginModuleEnabled ( mod , config ) ) continue ;
5358
5459 const rawAgents = mod . agentPlugin . agents ;
5560 if ( ! Array . isArray ( rawAgents ) ) continue ;
0 commit comments