Add Epiphany thin job launcher seam

This commit is contained in:
Meta Vens 2026-04-26 15:58:18 +01:00
commit c66695eefc
34 changed files with 1029 additions and 93 deletions

View file

@ -1821,6 +1821,10 @@ mod tests {
kind: v2::ThreadEpiphanyJobKind::Indexing,
scope: "/workspace".to_string(),
owner_role: "epiphany-core".to_string(),
launcher_job_id: None,
authority_scope: None,
backend_kind: None,
backend_job_id: None,
status: v2::ThreadEpiphanyJobStatus::Needed,
runtime_agent_job_id: None,
items_processed: Some(12),
@ -2566,6 +2570,10 @@ mod tests {
kind: v2::ThreadEpiphanyJobKind::Specialist,
scope: "runtime-bound specialist work".to_string(),
owner_role: "epiphany-harness".to_string(),
launcher_job_id: Some("launcher-specialist".to_string()),
authority_scope: Some("epiphany.specialist".to_string()),
backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::AgentJobs),
backend_job_id: Some("job-123".to_string()),
status: v2::ThreadEpiphanyJobStatus::Running,
runtime_agent_job_id: Some("job-123".to_string()),
items_processed: Some(1),
@ -2591,6 +2599,10 @@ mod tests {
"kind": "specialist",
"scope": "runtime-bound specialist work",
"ownerRole": "epiphany-harness",
"launcherJobId": "launcher-specialist",
"authorityScope": "epiphany.specialist",
"backendKind": "agentJobs",
"backendJobId": "job-123",
"status": "running",
"runtimeAgentJobId": "job-123",
"itemsProcessed": 1,
@ -3309,6 +3321,10 @@ mod tests {
kind: v2::ThreadEpiphanyJobKind::Specialist,
scope: "runtime-bound specialist work".to_string(),
owner_role: "epiphany-harness".to_string(),
launcher_job_id: Some("launcher-specialist".to_string()),
authority_scope: Some("epiphany.specialist".to_string()),
backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::AgentJobs),
backend_job_id: Some("job-123".to_string()),
status: v2::ThreadEpiphanyJobStatus::Running,
runtime_agent_job_id: Some("job-123".to_string()),
items_processed: Some(1),

View file

@ -4286,6 +4286,13 @@ pub enum ThreadEpiphanyJobKind {
Specialist,
}
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
pub enum ThreadEpiphanyJobBackendKind {
AgentJobs,
}
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
@ -4309,6 +4316,18 @@ pub struct ThreadEpiphanyJob {
pub kind: ThreadEpiphanyJobKind,
pub scope: String,
pub owner_role: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
#[ts(optional = nullable)]
pub launcher_job_id: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
#[ts(optional = nullable)]
pub authority_scope: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
#[ts(optional = nullable)]
pub backend_kind: Option<ThreadEpiphanyJobBackendKind>,
#[serde(default, skip_serializing_if = "Option::is_none")]
#[ts(optional = nullable)]
pub backend_job_id: Option<String>,
pub status: ThreadEpiphanyJobStatus,
#[serde(default, skip_serializing_if = "Option::is_none")]
#[ts(optional = nullable)]