import { DeclarativeAgentManifest, DeclarativeAgentManifestLatest } from "../generated-types"; import { BaseManifest } from "./BaseManifest"; type LatestManifestType = DeclarativeAgentManifestLatest; type ActionElementType = NonNullable[number]; type CapabilityElementType = NonNullable[number]; type ConversationStarterElementType = NonNullable[number]; type WorkerAgentElementType = NonNullable[number]; export type ActionElement = ActionElementType; export type ConversationStarterElement = ConversationStarterElementType; export type WorkerAgentElement = WorkerAgentElementType; export type SensitivityLabel = LatestManifestType["sensitivity_label"]; export type BehaviorOverrides = LatestManifestType["behavior_overrides"]; /** * Capability name type derived from the latest manifest schema. * This type is auto-generated from the JSON schema and represents all valid capability names. */ export type CapabilityNameValue = CapabilityElementType["name"]; /** * Capability names supported by Declarative Agents. * These values match the auto-generated Name type from the schema. * @see CapabilityNameValue for the type definition */ export declare const CapabilityName: { readonly [K in CapabilityNameValue]: K; }; /** * OOP wrapper for Declarative Agent Manifest. * * Provides a fluent API for manipulating declarative agent manifests with * type safety, state tracking, and convenient operations. * * @example * ```typescript * // Read existing manifest * const agent = await DeclarativeAgentManifestWrapper.read("agent.json"); * * // Modify with fluent API * agent * .setInstructions("You are a helpful assistant...") * .addAction("action1", "plugin.json") * .addWebSearchCapability([{ url: "https://docs.microsoft.com" }]) * .addConversationStarter("How can I help you today?"); * * // Save changes * await agent.save(); * ``` */ export declare class DeclarativeAgentManifestWrapper extends BaseManifest { private constructor(); /** * Reads a declarative agent manifest from a file. * @param filePath - Path to the manifest JSON file. * @returns A new DeclarativeAgentManifestWrapper instance. */ static read(filePath: string): Promise; /** * Reads a declarative agent manifest from a file synchronously. * @param filePath - Path to the manifest JSON file. * @returns A new DeclarativeAgentManifestWrapper instance. */ static readSync(filePath: string): DeclarativeAgentManifestWrapper; /** * Creates a DeclarativeAgentManifestWrapper from a JSON string. * @param json - JSON string representing the manifest. * @returns A new DeclarativeAgentManifestWrapper instance. */ static fromJSON(json: string): DeclarativeAgentManifestWrapper; /** * Creates a new declarative agent manifest with required fields. * @param init - Initial manifest data with required fields. * @returns A new DeclarativeAgentManifestWrapper instance. */ static create(init: { version: DeclarativeAgentManifest["version"]; name: string; description: string; instructions?: string; }): DeclarativeAgentManifestWrapper; /** * Returns the version of the manifest. */ get version(): string; /** * Returns the name of the agent. */ get name(): string; /** * Returns the description of the agent. */ get description(): string; /** * Returns the instructions for the agent. */ get instructions(): string | undefined; /** * Returns a readonly array of actions. */ get actions(): readonly ActionElementType[]; /** * Returns a readonly array of capabilities. */ get capabilities(): readonly CapabilityElementType[]; /** * Returns a readonly array of conversation starters. */ get conversationStarters(): readonly ConversationStarterElementType[]; /** * Returns a readonly array of worker agents. */ get workerAgents(): readonly WorkerAgentElementType[]; /** * Sets the name of the agent. */ setName(name: string): this; /** * Sets the description of the agent. */ setDescription(description: string): this; /** * Sets the instructions for the agent. */ setInstructions(instructions: string): this; /** * Adds an action (API plugin) to the agent. * @param id - Unique identifier for the action. * @param file - Relative path to the plugin manifest file. */ addAction(id: string, file: string): this; /** * Removes an action by ID. * @param id - The ID of the action to remove. */ removeAction(id: string): this; /** * Checks if an action exists by ID. */ hasAction(id: string): boolean; /** * Gets an action by ID. */ getAction(id: string): ActionElementType | undefined; /** * Returns all action plugin file paths. */ getActionPluginPaths(): string[]; /** * Adds or updates a capability. * If a capability with the same name exists, it will be replaced. * @param capability - The capability to add or update. */ addCapability(capability: CapabilityElementType): this; /** * Removes a capability by name. * @param name - The name of the capability to remove. */ removeCapability(name: CapabilityNameValue | string): this; /** * Checks if a capability exists by name. */ hasCapability(name: CapabilityNameValue | string): boolean; /** * Gets a capability by name. */ getCapability(name: CapabilityNameValue | string): T | undefined; /** * Adds or updates the WebSearch capability. * @param sites - Optional array of site URLs to constrain search. */ addWebSearchCapability(sites?: Array<{ url: string; }>): this; /** * Adds or updates the OneDriveAndSharePoint capability. * @param options - Configuration for SharePoint/OneDrive sources. */ addOneDriveSharePointCapability(options?: { items_by_url?: Array<{ url: string; }>; items_by_sharepoint_ids?: Array<{ site_id?: string; web_id?: string; list_id?: string; unique_id?: string; }>; }): this; /** * Adds or updates the GraphConnectors capability. * @param connectionIds - Array of Graph connector connection IDs. */ addGraphConnectorsCapability(connectionIds: string[]): this; /** * Adds or updates the EmbeddedKnowledge capability. * @param files - Array of embedded knowledge files. */ addEmbeddedKnowledgeCapability(files: Array<{ file: string; }>): this; /** * Adds or updates the CodeInterpreter capability. */ addCodeInterpreterCapability(): this; /** * Adds or updates the GraphicArt capability. */ addGraphicArtCapability(): this; /** * Adds a conversation starter. * Maximum 12 starters are allowed. * @param text - The text of the conversation starter. * @param title - Optional title for the starter. */ addConversationStarter(text: string, title?: string): this; /** * Removes a conversation starter by text. */ removeConversationStarter(text: string): this; /** * Clears all conversation starters. */ clearConversationStarters(): this; /** * Adds a worker agent. * @param id - The ID of the worker agent. */ addWorkerAgent(id: string): this; /** * Removes a worker agent by ID. */ removeWorkerAgent(id: string): this; /** * Validates the manifest against its JSON schema. * @returns Array of validation error messages, empty if valid. */ validate(): Promise; /** * Converts the manifest to a formatted JSON string. */ toJSON(): string; /** * Creates a deep clone of this manifest. */ clone(): DeclarativeAgentManifestWrapper; } export {};