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
@@ -18,7 +18,7 @@ function createManagerWithStatus(statusImpl: () => Promise<{ data: Record<string
},
}
return new BackgroundManager({ client, directory: tmpdir() } as unknown as PluginInput)
return new BackgroundManager({ pluginContext: { client, directory: tmpdir() } as unknown as PluginInput })
}
describe("BackgroundManager polling overlap", () => {
@@ -56,12 +56,12 @@ describe("BackgroundManager polling overlap", () => {
})
function createRunningTask(sessionID: string): BackgroundTask {
function createRunningTask(sessionId: string): BackgroundTask {
return {
id: `bg_test_${sessionID}`,
sessionID,
parentSessionID: "parent-session",
parentMessageID: "parent-msg",
id: `bg_test_${sessionId}`,
sessionId,
parentSessionId: "parent-session",
parentMessageId: "parent-msg",
description: "test task",
prompt: "test",
agent: "explore",
@@ -98,9 +98,7 @@ function createManagerWithClient(clientOverrides: Record<string, unknown> = {}):
},
}
return new BackgroundManager(
{ client, directory: tmpdir() } as unknown as PluginInput,
undefined,
{ enableParentSessionNotifications: false },
{ pluginContext: { client, directory: tmpdir() } as unknown as PluginInput, config: undefined, enableParentSessionNotifications: false },
)
}