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:
+13
-15
@@ -68,12 +68,11 @@ export function createManagers(args: {
|
||||
},
|
||||
})
|
||||
|
||||
const backgroundManager = new deps.BackgroundManagerClass(
|
||||
ctx,
|
||||
pluginConfig.background_task,
|
||||
{
|
||||
tmuxConfig,
|
||||
onSubagentSessionCreated: async (event: SubagentSessionCreatedEvent) => {
|
||||
const backgroundManager = new deps.BackgroundManagerClass({
|
||||
pluginContext: ctx,
|
||||
config: pluginConfig.background_task,
|
||||
tmuxConfig,
|
||||
onSubagentSessionCreated: async (event: SubagentSessionCreatedEvent) => {
|
||||
log("[create-managers] onSubagentSessionCreated callback received", {
|
||||
sessionID: event.sessionID,
|
||||
parentID: event.parentID,
|
||||
@@ -104,16 +103,15 @@ export function createManagers(args: {
|
||||
}
|
||||
|
||||
log("[create-managers] onSubagentSessionCreated callback completed")
|
||||
},
|
||||
onShutdown: async () => {
|
||||
await tmuxSessionManager.cleanup().catch((error) => {
|
||||
log("[create-managers] tmux cleanup error during shutdown:", error)
|
||||
})
|
||||
},
|
||||
enableParentSessionNotifications: backgroundNotificationHookEnabled,
|
||||
modelFallbackControllerAccessor,
|
||||
},
|
||||
)
|
||||
onShutdown: async () => {
|
||||
await tmuxSessionManager.cleanup().catch((error) => {
|
||||
log("[create-managers] tmux cleanup error during shutdown:", error)
|
||||
})
|
||||
},
|
||||
enableParentSessionNotifications: backgroundNotificationHookEnabled,
|
||||
modelFallbackControllerAccessor,
|
||||
})
|
||||
|
||||
deps.initTaskToastManagerFn(ctx.client)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user