/**
 * Token injection library for subagent templates.
 * Ports lib/skills/token-inject.sh.
 *
 * Implements strict token replacement with validation to prevent hallucination.
 * All tokens use {{TOKEN_NAME}} format.
 *
 * @epic T4454
 * @task T4521
 */
/** Token values map: TOKEN_NAME -> value. */
export type TokenValues = Record<string, string>;
/** Token definition from placeholders.json. */
interface PlaceholderDef {
    token: string;
    description?: string;
    pattern?: string;
    default?: string;
}
/** Placeholders.json schema. */
interface PlaceholdersConfig {
    required?: PlaceholderDef[];
    context?: PlaceholderDef[];
    taskCommands?: {
        tokens: PlaceholderDef[];
    };
    taskContext?: {
        tokens: PlaceholderDef[];
    };
    skillSpecific?: {
        tokens: PlaceholderDef[];
    };
}
/**
 * Load token definitions from placeholders.json.
 * @task T4521
 */
export declare function loadPlaceholders(cwd?: string): PlaceholdersConfig | null;
/**
 * Build the full default values map (merging placeholders.json with hardcoded defaults).
 * @task T4521
 */
export declare function buildDefaults(cwd?: string): TokenValues;
/**
 * Validate a single token value against its pattern.
 * @task T4521
 */
export declare function validateTokenValue(token: string, value: string): {
    valid: boolean;
    error?: string;
};
/**
 * Validate all required tokens are present and valid.
 * @task T4521
 */
export declare function validateRequired(values: TokenValues): {
    valid: boolean;
    missing: string[];
    invalid: Array<{
        token: string;
        error: string;
    }>;
};
/**
 * Validate all tokens in a values map (required + optional).
 * @task T4521
 */
export declare function validateAllTokens(values: TokenValues): {
    valid: boolean;
    errors: Array<{
        token: string;
        error: string;
    }>;
};
/**
 * Inject token values into a template string.
 * Replaces all {{TOKEN_NAME}} patterns with corresponding values.
 * Unresolved tokens are left as-is (for debugging).
 * @task T4521
 */
export declare function injectTokens(template: string, values: TokenValues): string;
/**
 * Check if a template has unresolved tokens after injection.
 * @task T4521
 */
export declare function hasUnresolvedTokens(content: string): string[];
/**
 * Load a skill template and inject tokens.
 * @task T4521
 */
export declare function loadAndInject(templatePath: string, values: TokenValues): {
    content: string;
    unresolvedTokens: string[];
};
/**
 * Build a complete TokenValues map from a task, resolving all standard tokens.
 * Ports ti_set_full_context from lib/skills/token-inject.sh.
 *
 * This is the primary entry point for orchestrators to prepare token values
 * before spawning subagents. It populates: TASK_ID, DATE, TOPIC_SLUG, EPIC_ID,
 * TITLE, TASK_TITLE, TASK_DESCRIPTION, TOPICS_JSON, DEPENDS_LIST, RESEARCH_ID,
 * OUTPUT_DIR, MANIFEST_PATH, and all command defaults.
 *
 * @task T4712
 * @epic T4663
 */
export declare function setFullContext(task: {
    id: string;
    title: string;
    description?: string;
    parentId?: string;
    labels?: string[];
    depends?: string[];
}, options?: {
    date?: string;
    topicSlug?: string;
    outputDir?: string;
    manifestPath?: string;
}): TokenValues;
export {};
//# sourceMappingURL=token.d.ts.map