fix(agents): use lowercase agent names in API calls
- atlas/index.ts: agent: 'Atlas' -> 'atlas' - start-work/index.ts: updateSessionAgent(..., 'Atlas') -> 'atlas' - builtin-commands/commands.ts: agent: 'Atlas' -> 'atlas' - Updated tests to match lowercase convention
This commit is contained in:
parent
1c562a95d5
commit
7ed7bf5c66
@ -55,7 +55,7 @@ ${REFACTOR_TEMPLATE}
|
|||||||
},
|
},
|
||||||
"start-work": {
|
"start-work": {
|
||||||
description: "(builtin) Start Sisyphus work session from Prometheus plan",
|
description: "(builtin) Start Sisyphus work session from Prometheus plan",
|
||||||
agent: "Atlas",
|
agent: "atlas",
|
||||||
template: `<command-instruction>
|
template: `<command-instruction>
|
||||||
${START_WORK_TEMPLATE}
|
${START_WORK_TEMPLATE}
|
||||||
</command-instruction>
|
</command-instruction>
|
||||||
|
|||||||
@ -123,7 +123,7 @@ describe("atlas hook", () => {
|
|||||||
test("should append standalone verification when no boulder state but caller is Atlas", async () => {
|
test("should append standalone verification when no boulder state but caller is Atlas", async () => {
|
||||||
// #given - no boulder state, but caller is Atlas
|
// #given - no boulder state, but caller is Atlas
|
||||||
const sessionID = "session-no-boulder-test"
|
const sessionID = "session-no-boulder-test"
|
||||||
setupMessageStorage(sessionID, "Atlas")
|
setupMessageStorage(sessionID, "atlas")
|
||||||
|
|
||||||
const hook = createAtlasHook(createMockPluginInput())
|
const hook = createAtlasHook(createMockPluginInput())
|
||||||
const output = {
|
const output = {
|
||||||
@ -149,7 +149,7 @@ describe("atlas hook", () => {
|
|||||||
test("should transform output when caller is Atlas with boulder state", async () => {
|
test("should transform output when caller is Atlas with boulder state", async () => {
|
||||||
// #given - Atlas caller with boulder state
|
// #given - Atlas caller with boulder state
|
||||||
const sessionID = "session-transform-test"
|
const sessionID = "session-transform-test"
|
||||||
setupMessageStorage(sessionID, "Atlas")
|
setupMessageStorage(sessionID, "atlas")
|
||||||
|
|
||||||
const planPath = join(TEST_DIR, "test-plan.md")
|
const planPath = join(TEST_DIR, "test-plan.md")
|
||||||
writeFileSync(planPath, "# Plan\n- [ ] Task 1\n- [x] Task 2")
|
writeFileSync(planPath, "# Plan\n- [ ] Task 1\n- [x] Task 2")
|
||||||
@ -188,7 +188,7 @@ describe("atlas hook", () => {
|
|||||||
test("should still transform when plan is complete (shows progress)", async () => {
|
test("should still transform when plan is complete (shows progress)", async () => {
|
||||||
// #given - boulder state with complete plan, Atlas caller
|
// #given - boulder state with complete plan, Atlas caller
|
||||||
const sessionID = "session-complete-plan-test"
|
const sessionID = "session-complete-plan-test"
|
||||||
setupMessageStorage(sessionID, "Atlas")
|
setupMessageStorage(sessionID, "atlas")
|
||||||
|
|
||||||
const planPath = join(TEST_DIR, "complete-plan.md")
|
const planPath = join(TEST_DIR, "complete-plan.md")
|
||||||
writeFileSync(planPath, "# Plan\n- [x] Task 1\n- [x] Task 2")
|
writeFileSync(planPath, "# Plan\n- [x] Task 1\n- [x] Task 2")
|
||||||
@ -225,7 +225,7 @@ describe("atlas hook", () => {
|
|||||||
test("should append session ID to boulder state if not present", async () => {
|
test("should append session ID to boulder state if not present", async () => {
|
||||||
// #given - boulder state without session-append-test, Atlas caller
|
// #given - boulder state without session-append-test, Atlas caller
|
||||||
const sessionID = "session-append-test"
|
const sessionID = "session-append-test"
|
||||||
setupMessageStorage(sessionID, "Atlas")
|
setupMessageStorage(sessionID, "atlas")
|
||||||
|
|
||||||
const planPath = join(TEST_DIR, "test-plan.md")
|
const planPath = join(TEST_DIR, "test-plan.md")
|
||||||
writeFileSync(planPath, "# Plan\n- [ ] Task 1")
|
writeFileSync(planPath, "# Plan\n- [ ] Task 1")
|
||||||
@ -261,7 +261,7 @@ describe("atlas hook", () => {
|
|||||||
test("should not duplicate existing session ID", async () => {
|
test("should not duplicate existing session ID", async () => {
|
||||||
// #given - boulder state already has session-dup-test, Atlas caller
|
// #given - boulder state already has session-dup-test, Atlas caller
|
||||||
const sessionID = "session-dup-test"
|
const sessionID = "session-dup-test"
|
||||||
setupMessageStorage(sessionID, "Atlas")
|
setupMessageStorage(sessionID, "atlas")
|
||||||
|
|
||||||
const planPath = join(TEST_DIR, "test-plan.md")
|
const planPath = join(TEST_DIR, "test-plan.md")
|
||||||
writeFileSync(planPath, "# Plan\n- [ ] Task 1")
|
writeFileSync(planPath, "# Plan\n- [ ] Task 1")
|
||||||
@ -298,7 +298,7 @@ describe("atlas hook", () => {
|
|||||||
test("should include boulder.json path and notepad path in transformed output", async () => {
|
test("should include boulder.json path and notepad path in transformed output", async () => {
|
||||||
// #given - boulder state, Atlas caller
|
// #given - boulder state, Atlas caller
|
||||||
const sessionID = "session-path-test"
|
const sessionID = "session-path-test"
|
||||||
setupMessageStorage(sessionID, "Atlas")
|
setupMessageStorage(sessionID, "atlas")
|
||||||
|
|
||||||
const planPath = join(TEST_DIR, "my-feature.md")
|
const planPath = join(TEST_DIR, "my-feature.md")
|
||||||
writeFileSync(planPath, "# Plan\n- [ ] Task 1\n- [ ] Task 2\n- [x] Task 3")
|
writeFileSync(planPath, "# Plan\n- [ ] Task 1\n- [ ] Task 2\n- [x] Task 3")
|
||||||
@ -335,7 +335,7 @@ describe("atlas hook", () => {
|
|||||||
test("should include resume and checkbox instructions in reminder", async () => {
|
test("should include resume and checkbox instructions in reminder", async () => {
|
||||||
// #given - boulder state, Atlas caller
|
// #given - boulder state, Atlas caller
|
||||||
const sessionID = "session-resume-test"
|
const sessionID = "session-resume-test"
|
||||||
setupMessageStorage(sessionID, "Atlas")
|
setupMessageStorage(sessionID, "atlas")
|
||||||
|
|
||||||
const planPath = join(TEST_DIR, "test-plan.md")
|
const planPath = join(TEST_DIR, "test-plan.md")
|
||||||
writeFileSync(planPath, "# Plan\n- [ ] Task 1")
|
writeFileSync(planPath, "# Plan\n- [ ] Task 1")
|
||||||
|
|||||||
@ -498,7 +498,7 @@ export function createAtlasHook(
|
|||||||
await ctx.client.session.prompt({
|
await ctx.client.session.prompt({
|
||||||
path: { id: sessionID },
|
path: { id: sessionID },
|
||||||
body: {
|
body: {
|
||||||
agent: "Atlas",
|
agent: "atlas",
|
||||||
...(model !== undefined ? { model } : {}),
|
...(model !== undefined ? { model } : {}),
|
||||||
parts: [{ type: "text", text: prompt }],
|
parts: [{ type: "text", text: prompt }],
|
||||||
},
|
},
|
||||||
|
|||||||
@ -395,7 +395,7 @@ describe("start-work hook", () => {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// #then
|
// #then
|
||||||
expect(updateSpy).toHaveBeenCalledWith("ses-prometheus-to-sisyphus", "Atlas")
|
expect(updateSpy).toHaveBeenCalledWith("ses-prometheus-to-sisyphus", "atlas")
|
||||||
updateSpy.mockRestore()
|
updateSpy.mockRestore()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -71,7 +71,7 @@ export function createStartWorkHook(ctx: PluginInput) {
|
|||||||
sessionID: input.sessionID,
|
sessionID: input.sessionID,
|
||||||
})
|
})
|
||||||
|
|
||||||
updateSessionAgent(input.sessionID, "Atlas")
|
updateSessionAgent(input.sessionID, "atlas")
|
||||||
|
|
||||||
const existingState = readBoulderState(ctx.directory)
|
const existingState = readBoulderState(ctx.directory)
|
||||||
const sessionId = input.sessionID
|
const sessionId = input.sessionID
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user