Merge nucleic/brisk-slate-viper-tkai into dev

This commit is contained in:
2026-07-22 22:03:55 -07:00
parent 7443a7f431
commit 24c953d39b
2 changed files with 40 additions and 0 deletions
+15
View File
@@ -105,6 +105,12 @@ struct Batch<'a> {
batch_type: &'static str,
source: &'static str,
session_id: Option<&'a str>,
#[serde(skip_serializing_if = "Option::is_none")]
environment_kind: Option<&'a str>,
#[serde(skip_serializing_if = "Option::is_none")]
environment_id: Option<&'a str>,
#[serde(skip_serializing_if = "Option::is_none")]
environment_label: Option<&'a str>,
shell_id: &'a str,
parent_shell: Option<&'a str>,
events: &'a [Event],
@@ -119,6 +125,9 @@ struct Config {
hook_url: Option<HookUrl>,
token: Option<String>,
session_id: Option<String>,
environment_kind: Option<String>,
environment_id: Option<String>,
environment_label: Option<String>,
spool: Option<PathBuf>,
}
@@ -159,6 +168,9 @@ impl Config {
hook_url,
token: std::env::var("NUCLEIC_HOOK_TOKEN").ok(),
session_id: std::env::var("NUCLEIC_SESSION_ID").ok(),
environment_kind: std::env::var("NUCLEIC_SHELL_ENVIRONMENT_KIND").ok(),
environment_id: std::env::var("NUCLEIC_SHELL_ENVIRONMENT_ID").ok(),
environment_label: std::env::var("NUCLEIC_SHELL_ENVIRONMENT_LABEL").ok(),
spool,
})
}
@@ -609,6 +621,9 @@ fn flusher(cfg: Config, shell_id: String, parent_shell: Option<String>, rx: mpsc
batch_type: "shell-batch",
source: "nash",
session_id: cfg.session_id.as_deref(),
environment_kind: cfg.environment_kind.as_deref(),
environment_id: cfg.environment_id.as_deref(),
environment_label: cfg.environment_label.as_deref(),
shell_id: &shell_id,
parent_shell: parent_shell.as_deref(),
events: buf,