overmind-mcp
Version:
Orchestrateur universel agents IA multi-modeles via MCP. Inclut le protocole 'Custom-Nickname' pour identifier vos agents avec des surnoms originaux (The Chaos Prophet, Shadow Sniper, etc.), l'isolation mémoire (Private Memory Context) et le support pour
66 lines • 3.58 kB
TypeScript
/**
* ╔══════════════════════════════════════════════════════════════════════╗
* ║ OVERMIND BRIDGE — PromptSource (Multi-Input Prompt Resolver) ║
* ║ ║
* ║ Résout un prompt depuis 8 sources différentes : ║
* ║ 1. --prompt "..." (string literal) ║
* ║ 2. --prompt-file path.txt (fichier local) ║
* ║ 3. --prompt-stdin (lit stdin si pipe) ║
* ║ 4. --prompt-base64 "..." (binaire décodé) ║
* ║ 5. --prompt-url "https://" (fetch HTTP/HTTPS) ║
* ║ 6. --prompt-file-base64 b (fichier binaire décodé) ║
* ║ 7. --prompt-json '{"k":"v"}' (objet JSON, reformaté) ║
* ║ 8. --prompt-template t (template avec ${var} interpolation) ║
* ║ ║
* ║ Ordre de priorité (1er match gagne) : ║
* ║ 1. --prompt (literal) ║
* ║ 2. --prompt-file ║
* ║ 3. --prompt-stdin (si TTY absent) ║
* ║ 4. --prompt-base64 ║
* ║ 5. --prompt-url ║
* ╚══════════════════════════════════════════════════════════════════════╝
*/
export interface ResolvePromptOptions {
/** --prompt "..." (string literal) */
prompt?: string;
/** --prompt-file path.txt */
promptFile?: string;
/** --prompt-stdin (true = lit stdin) */
promptStdin?: boolean;
/** --prompt-base64 "..." (données binaires) */
promptBase64?: string;
/** --prompt-file-base64 path (fichier binaire) */
promptFileBase64?: string;
/** --prompt-url "https://..." */
promptUrl?: string;
/** --prompt-json '{"k":"v"}' (objet → reformaté en texte) */
promptJson?: string;
/** --prompt-template "Bonjour ${name}" avec --var name=Monde */
promptTemplate?: string;
/** Variables pour --prompt-template et --prompt-file templating */
vars?: Record<string, string>;
}
export interface ResolvedPrompt {
/** Le texte résolu */
text: string;
/** Source effective (pour debug) */
source: PromptSource;
/** Métadonnées additionnelles (taille, encoding, etc.) */
meta: {
bytes: number;
encoding: 'utf-8' | 'base64' | 'binary';
origin: string;
};
}
export type PromptSource = 'literal' | 'file' | 'stdin' | 'base64' | 'file-base64' | 'url' | 'json' | 'template' | 'fallback';
/**
* Résout le prompt depuis la première source valide.
* Throw si aucune source ne fournit du contenu.
*/
export declare function resolvePrompt(opts: ResolvePromptOptions): Promise<ResolvedPrompt>;
/**
* Parse les --var key=value passés en argv.
* Ex: --var name=Monde --var lang=fr → { name: 'Monde', lang: 'fr' }
*/
export declare function parseVars(values: string[] | string | undefined): Record<string, string>;
//# sourceMappingURL=PromptSource.d.ts.map