1
>
/*---------------------------------------------------------------------------------------------
agentPluginParser.ts
2
>
* Copyright (c) Microsoft Corporation. All rights reserved.
3
>
* Licensed under the MIT License. See License.txt in the project root for license information.
4
>
*--------------------------------------------------------------------------------------------*/
5
>
6
>
import { parse as parseJSONC } from '../../../base/common/json.js';
7
>
import { joinPath } from '../../../base/common/resources.js';
8
>
import { URI } from '../../../base/common/uri.js';
9
>
import { IFileService } from '../../files/common/files.js';
10
>
11
>
export const AGENT_PLUGIN_SCHEMA = 'https://agent-plugins.org/schemas/1.0.0/plugin.schema.json';
12
>
export const AGENT_PLUGIN_MCP_SCHEMA = 'https://agent-plugins.org/schemas/1.0.0/mcp.schema.json';
13
>
14
>
const agentPluginSchemaPrefix = 'https://agent-plugins.org/schemas/';
15
>
16
>
export interface IAgentPluginManifest {
17
>
readonly $schema: string;
18
>
readonly name?: string;
19
>
readonly version?: string;
20
>
readonly description?: string;
21
>
}
22
>
23
export async function readAgentPluginManifest(pluginUri: URI, fileService: IFileService): Promise<IAgentPluginManifest | undefined> {
24
const manifestUri = joinPath(pluginUri, 'plugin.json');