refactor(background-agent): normalize task ID field naming

Rename BackgroundTask and attempt ID fields to camelCase across background-agent consumers while moving BackgroundManager construction to a single config object.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-02 03:01:03 +09:00
parent 054ade9ced
commit da251c9b30
57 changed files with 1299 additions and 1327 deletions
@@ -11,16 +11,16 @@ export interface BackgroundTaskNotificationTask {
}
function formatAttemptModel(attempt: BackgroundTaskAttempt): string {
if (attempt.providerID && attempt.modelID) {
return `${attempt.providerID}/${attempt.modelID}`
if (attempt.providerId && attempt.modelId) {
return `${attempt.providerId}/${attempt.modelId}`
}
if (attempt.modelID) {
return attempt.modelID
if (attempt.modelId) {
return attempt.modelId
}
if (attempt.providerID) {
return attempt.providerID
if (attempt.providerId) {
return attempt.providerId
}
return "unknown-model"
@@ -34,7 +34,7 @@ function formatAttemptTimeline(task: BackgroundTaskNotificationTask): string {
const lines = task.attempts
.map((attempt) => {
const attemptLines = [
` - Attempt ${attempt.attemptNumber}${attempt.status.toUpperCase()}${formatAttemptModel(attempt)}${attempt.sessionID ?? "unknown"}`,
` - Attempt ${attempt.attemptNumber}${attempt.status.toUpperCase()}${formatAttemptModel(attempt)}${attempt.sessionId ?? "unknown"}`,
]
if (attempt.status !== "completed" && attempt.error) {