agent-file
Version:
Self-contained HTML agent format with built-in security
52 lines • 1.17 kB
TypeScript
/**
* AgentFile - Self-contained HTML agent format
* Single unified implementation with built-in security
*/
export interface MCPServerConfig {
name: string;
url: string;
description?: string;
auth?: {
type: 'none' | 'bearer' | 'oauth';
token?: string;
};
}
export interface AgentManifest {
id: string;
name: string;
version: string;
description?: string;
author?: string;
permissions?: {
network?: string[];
storage?: boolean;
code?: boolean;
};
capabilities?: {
memory?: boolean;
code?: boolean;
browser?: boolean;
};
mcp?: {
servers?: MCPServerConfig[];
};
}
export interface AgentFileOptions {
manifest: AgentManifest;
code: string;
memory?: string;
styles?: string;
ui?: 'minimal' | 'full' | 'none';
}
export declare class AgentFile {
static create(options: AgentFileOptions): Promise<string>;
/**
* Extract agent from HTML
*/
static extract(html: string): {
manifest: AgentManifest;
code: string;
memory?: string;
};
}
//# sourceMappingURL=agent-file.d.ts.map