vik 0.1.2

Vik is an issue-driven coding workflow automation tool.
//! MiniJinja rendering and prompt-local command expansion.
//!
//! Two distinct surfaces share the renderer:
//!
//! - Hooks render Jinja only — no `!`exec(...)`` substitution.
//! - Prompts render Jinja first, then expand `!`exec(...)`` and ``exec(...)``
//!   markers as a second pass. The shell commands run with a 30s timeout.
#![allow(dead_code)]

mod jinja;
mod prompt;

use thiserror::Error;

pub use jinja::*;
pub use prompt::*;

use crate::shell::CommandExecError;

#[derive(Debug, Error)]
pub enum TemplateError {
  #[error(transparent)]
  Render(#[from] minijinja::Error),

  /// `stderr_tail` would belong here too, but the prompt expander is a
  /// thin wrapper and the lower layer captures stderr inside the
  /// `CommandExecError`. Bound any new tail field with a byte cap so
  /// log output stays readable.
  #[error("prompt injection command `{command}` failed: {source}")]
  PromptCommandFailed {
    command: String,
    #[source]
    source: CommandExecError,
  },

  #[error(transparent)]
  Io(#[from] std::io::Error),
}