This commit is contained in:
Ryan Ragona
2025-04-26 14:25:35 -07:00
parent 96d8d2a37a
commit 337164738a
11 changed files with 25 additions and 20 deletions
-1
View File
@@ -7,4 +7,3 @@
pub fn git_sha() -> &'static str {
env!("GIT_SHA")
}
+6 -5
View File
@@ -8,7 +8,8 @@
//! The `create` command therefore has mutually exclusive sub-commands so the appropriate
//! arguments can be forwarded to the underlying agent binaries.
use crate::meta::{AgentCli, SessionMeta};
use crate::meta::AgentCli;
use crate::meta::SessionMeta;
use crate::spawn;
use crate::store;
use anyhow::Context;
@@ -146,10 +147,10 @@ impl CreateCmd {
// Capture the child PID *and* the full CLI config so we can persist it
// in the metadata file.
let spawn_result: Result<(
u32, // pid
Option<String>, // prompt preview
store::SessionKind, // kind
AgentCli, // full CLI config
u32, // pid
Option<String>, // prompt preview
store::SessionKind, // kind
AgentCli, // full CLI config
)> = (|| match self.agent {
AgentKind::Exec(cmd) => {
let args = build_exec_args(&cmd.exec_cli);
+3 -3
View File
@@ -5,11 +5,11 @@
//! This library is thin: it only re-exports the clap CLI and helpers so
//! the binary can stay small and unit tests can call into pure Rust APIs.
pub mod build;
pub mod cli; // public so main.rs can access it.
mod spawn; // process creation helpers
pub mod store; // on-disk bookkeeping (public for tests)
pub mod meta; // richer on-disk metadata envelope
pub mod build; // build-time information helpers
mod spawn; // process creation helpers
pub mod store; // on-disk bookkeeping (public for tests) // build-time information helpers
pub use cli::Cli;
+4 -3
View File
@@ -6,8 +6,10 @@
//! bits of contextual information (like the git commit of the build) makes
//! debugging and reproducibility significantly easier.
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use chrono::DateTime;
use chrono::Utc;
use serde::Deserialize;
use serde::Serialize;
use crate::store::SessionKind;
@@ -86,4 +88,3 @@ impl SessionMeta {
}
}
}
+2 -1
View File
@@ -10,7 +10,8 @@ use anyhow::Result;
// The rich metadata envelope lives in its own module so other parts of the
// crate can import it without pulling in the whole `store` implementation.
use crate::meta::SessionMeta;
use serde::{Deserialize, Serialize};
use serde::Deserialize;
use serde::Serialize;
use std::path::PathBuf;
#[derive(Clone, Debug)]