feat(sisyphus-task): add skillContent support to background agent launching
- Add optional skillContent field to LaunchInput type
- Implement buildSystemContent utility to combine skill and category prompts
- Update BackgroundManager to pass skillContent as system parameter
- Add comprehensive tests for skillContent optionality and buildSystemContent logic
🤖 Generated with assistance of oh-my-opencode
This commit is contained in:
@@ -643,3 +643,34 @@ describe("BackgroundManager.resume", () => {
|
||||
expect(result.progress?.toolCalls).toBe(42)
|
||||
})
|
||||
})
|
||||
|
||||
describe("LaunchInput.skillContent", () => {
|
||||
test("skillContent should be optional in LaunchInput type", () => {
|
||||
// #given
|
||||
const input: import("./types").LaunchInput = {
|
||||
description: "test",
|
||||
prompt: "test prompt",
|
||||
agent: "explore",
|
||||
parentSessionID: "parent-session",
|
||||
parentMessageID: "parent-msg",
|
||||
}
|
||||
|
||||
// #when / #then - should compile without skillContent
|
||||
expect(input.skillContent).toBeUndefined()
|
||||
})
|
||||
|
||||
test("skillContent can be provided in LaunchInput", () => {
|
||||
// #given
|
||||
const input: import("./types").LaunchInput = {
|
||||
description: "test",
|
||||
prompt: "test prompt",
|
||||
agent: "explore",
|
||||
parentSessionID: "parent-session",
|
||||
parentMessageID: "parent-msg",
|
||||
skillContent: "You are a playwright expert",
|
||||
}
|
||||
|
||||
// #when / #then
|
||||
expect(input.skillContent).toBe("You are a playwright expert")
|
||||
})
|
||||
})
|
||||
|
||||
@@ -140,6 +140,7 @@ export class BackgroundManager {
|
||||
path: { id: sessionID },
|
||||
body: {
|
||||
agent: input.agent,
|
||||
system: input.skillContent,
|
||||
tools: {
|
||||
task: false,
|
||||
call_omo_agent: false,
|
||||
|
||||
@@ -41,6 +41,7 @@ export interface LaunchInput {
|
||||
parentModel?: { providerID: string; modelID: string }
|
||||
model?: { providerID: string; modelID: string }
|
||||
skills?: string[]
|
||||
skillContent?: string
|
||||
}
|
||||
|
||||
export interface ResumeInput {
|
||||
|
||||
Reference in New Issue
Block a user