fix(coding): remediate ML-07 plugin authority
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
BUNDLED_CODING_PLUGIN_DEFINITIONS,
|
||||
type CodingPluginDefinition,
|
||||
type CodingPluginToolDefinition,
|
||||
type PluginBillingMode,
|
||||
@@ -120,7 +119,7 @@ export interface CodingCapabilityRegistryOptions {
|
||||
getEnabledPluginIds(projectPath: string): Promise<readonly string[]>;
|
||||
};
|
||||
adapters: readonly CodingPluginAdapter[];
|
||||
definitions?: readonly CodingPluginDefinition[];
|
||||
definitions: readonly CodingPluginDefinition[];
|
||||
getDurableProjectId?: (projectPath: string, localProjectId: string) => Promise<string> | string;
|
||||
}
|
||||
|
||||
@@ -340,7 +339,7 @@ export class CodingCapabilityRegistryImpl implements CodingCapabilityRegistryPor
|
||||
private readonly adaptersByPluginId: ReadonlyMap<string, CodingPluginAdapter>;
|
||||
|
||||
constructor(private readonly options: CodingCapabilityRegistryOptions) {
|
||||
const definitions = (options.definitions ?? BUNDLED_CODING_PLUGIN_DEFINITIONS).filter(definitionValid);
|
||||
const definitions = options.definitions.filter(definitionValid);
|
||||
this.definitions = Object.freeze([...definitions]);
|
||||
const tools = new Map<string, { definition: CodingPluginDefinition; tool: CodingPluginToolDefinition }>();
|
||||
for (const definition of this.definitions) {
|
||||
|
||||
Reference in New Issue
Block a user