@openai/agents-core
Version:
The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.
58 lines (57 loc) • 2.24 kB
TypeScript
import { type Tool } from '../../tool';
import { type Dir, type Entry, type File, type GitRepo, type LocalDir, type LocalFile } from '../entries';
import { type Manifest } from '../manifest';
import { Capability } from './base';
export type SkillIndexEntry = {
name: string;
description: string;
path?: string;
};
export type LocalDirLazySkillSource = {
source: Dir | LocalDir | GitRepo;
index?: SkillIndexEntry[];
getIndex?: (manifest: Manifest, skillsPath: string) => SkillIndexEntry[];
};
export type SkillDescriptor = {
name: string;
description: string;
content: string | Uint8Array | File | LocalFile;
scripts?: Record<string, Entry>;
references?: Record<string, Entry>;
assets?: Record<string, Entry>;
compatibility?: string[];
deferred?: boolean;
};
export type SkillsArgs = {
skills?: SkillDescriptor[];
from?: Entry;
lazyFrom?: LocalDirLazySkillSource;
index?: SkillIndexEntry[];
skillsPath?: string;
};
declare class SkillsCapability extends Capability {
readonly type = "skills";
readonly skills: SkillDescriptor[];
readonly from?: Entry;
readonly lazyFrom?: LocalDirLazySkillSource;
readonly index?: SkillIndexEntry[];
readonly skillsPath: string;
constructor(args: SkillsArgs);
tools(): Tool<any>[];
processManifest(manifest: Manifest): Manifest;
instructions(manifest: Manifest): Promise<string | null>;
private resolveRuntimeMetadata;
}
export type Skills = SkillsCapability;
export declare function skills(args: SkillsArgs): Skills;
/**
* Read string metadata, including wrapped plain values and folded/literal blocks.
* Block indentation/chomping indicators and header comments are accepted, but
* outer block whitespace is trimmed for the skill index regardless of chomping.
* This is not a YAML loader: tags, aliases, collections, multiline quoted values,
* and quoted escapes are not interpreted. Use explicit skill metadata or a lazy
* source index for those formats. Single-line quotes and inline hashes retain
* their existing behavior; nested fields are never promoted to root metadata.
*/
export declare function parseSkillFrontmatter(markdown: string): Record<string, string>;
export {};