/**
* `ContextProvider` is a pre-fetched data source attached to an Agent.
*
* Unlike Tools (which the LLM explicitly invokes), context providers run
* automatically before every turn and inject their output into the system
* prompt. Good for "the agent should always know X" data: my calendar, recent
* Slack messages, current SQL row counts, file contents the agent referenced.
*
* Typical usage:
*
* ```ts
* const calendar = new FilesystemContextProvider({ basePath: "./notes", glob: "*.md" });
* const agent = new Agent({ context: [calendar], ... });
* ```
*/
export interface ContextProvider {
readonly name: string;
/**
* Fetch the current context. Called once per agent run before the LLM is invoked.
* Returning an empty string causes the provider to contribute nothing.
*/
fetchContext(query: string, ctx: RunContext): Promise<string>;
}