Expand thread source taxonomy

This commit is contained in:
Mark Steinbrick
2026-06-07 23:30:54 -07:00
parent ed6e5cf919
commit ececf1a6ff
18 changed files with 73 additions and 1 deletions

View File

@@ -3795,9 +3795,12 @@
"type": "string"
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -4575,9 +4575,12 @@
"type": "object"
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -18017,9 +18017,12 @@
"type": "string"
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -15834,9 +15834,12 @@
"type": "string"
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -73,9 +73,12 @@
"type": "string"
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -1790,9 +1790,12 @@
]
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -1605,9 +1605,12 @@
]
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -1605,9 +1605,12 @@
]
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -1605,9 +1605,12 @@
]
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -1790,9 +1790,12 @@
]
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -1605,9 +1605,12 @@
]
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -107,9 +107,12 @@
"type": "string"
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -1790,9 +1790,12 @@
]
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -1605,9 +1605,12 @@
]
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -1605,9 +1605,12 @@
]
},
"ThreadSource": {
"description": "Optional caller-supplied classification of who or what owns a thread's execution.",
"enum": [
"user",
"subagent",
"system",
"automation",
"memory_consolidation"
],
"type": "string"

View File

@@ -2,4 +2,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type ThreadSource = "user" | "subagent" | "memory_consolidation";
/**
* Optional caller-supplied classification of who or what owns a thread's execution.
*/
export type ThreadSource = "user" | "subagent" | "system" | "automation" | "memory_consolidation";

View File

@@ -61,12 +61,20 @@ impl From<SessionSource> for CoreSessionSource {
}
}
/// Optional caller-supplied classification of who or what owns a thread's execution.
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "snake_case")]
#[ts(rename_all = "snake_case", export_to = "v2/")]
pub enum ThreadSource {
// Primary work attributed to an active user workflow.
User,
// Work delegated by an agent into a child or worker thread.
Subagent,
// Product-owned helper, safety, repair, or auxiliary work.
System,
// Top-level work started by a schedule or autonomous trigger.
Automation,
// Internal memory-consolidation work.
MemoryConsolidation,
}
@@ -75,6 +83,8 @@ impl From<CoreThreadSource> for ThreadSource {
match value {
CoreThreadSource::User => ThreadSource::User,
CoreThreadSource::Subagent => ThreadSource::Subagent,
CoreThreadSource::System => ThreadSource::System,
CoreThreadSource::Automation => ThreadSource::Automation,
CoreThreadSource::MemoryConsolidation => ThreadSource::MemoryConsolidation,
}
}
@@ -85,6 +95,8 @@ impl From<ThreadSource> for CoreThreadSource {
match value {
ThreadSource::User => CoreThreadSource::User,
ThreadSource::Subagent => CoreThreadSource::Subagent,
ThreadSource::System => CoreThreadSource::System,
ThreadSource::Automation => CoreThreadSource::Automation,
ThreadSource::MemoryConsolidation => CoreThreadSource::MemoryConsolidation,
}
}

View File

@@ -2495,12 +2495,20 @@ pub enum SessionSource {
Unknown,
}
/// Optional caller-supplied classification of who or what owns a thread's execution.
#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "snake_case")]
#[ts(rename_all = "snake_case")]
pub enum ThreadSource {
// Primary work attributed to an active user workflow.
User,
// Work delegated by an agent into a child or worker thread.
Subagent,
// Product-owned helper, safety, repair, or auxiliary work.
System,
// Top-level work started by a schedule or autonomous trigger.
Automation,
// Internal memory-consolidation work.
MemoryConsolidation,
}
@@ -2509,6 +2517,8 @@ impl ThreadSource {
match self {
ThreadSource::User => "user",
ThreadSource::Subagent => "subagent",
ThreadSource::System => "system",
ThreadSource::Automation => "automation",
ThreadSource::MemoryConsolidation => "memory_consolidation",
}
}
@@ -2527,6 +2537,8 @@ impl FromStr for ThreadSource {
match value {
"user" => Ok(ThreadSource::User),
"subagent" => Ok(ThreadSource::Subagent),
"system" => Ok(ThreadSource::System),
"automation" => Ok(ThreadSource::Automation),
"memory_consolidation" => Ok(ThreadSource::MemoryConsolidation),
other => Err(format!("unknown thread source: {other}")),
}