fix(athena): remove duplicate council prompt, add temp file cleanup, fix code quality
- Remove COUNCIL_MEMBER_PROMPT from temp file content since it's already provided as the council member's system prompt via agent config, saving ~350+ tokens per council member per invocation - Add startup cleanup for stale athena-council-*.md files older than 30 minutes in .sisyphus/tmp/ to handle cases where process exits before setTimeout cleanup fires - Remove redundant intermediate permission object spread in createAthenaAgent - Fix test style: it() -> test(), add #given/#then prefixes per conventions
This commit is contained in:
@@ -236,9 +236,6 @@ export function createAthenaAgent(model: string): AgentConfig {
|
||||
const restrictions = createAgentToolRestrictions(["write", "edit", "call_omo_agent"])
|
||||
|
||||
// question permission is set by tool-config-handler.ts based on CLI mode (allow/deny)
|
||||
const permission = {
|
||||
...restrictions.permission,
|
||||
}
|
||||
|
||||
const base = {
|
||||
description:
|
||||
@@ -246,7 +243,7 @@ export function createAthenaAgent(model: string): AgentConfig {
|
||||
mode: MODE,
|
||||
model,
|
||||
temperature: 0.1,
|
||||
permission,
|
||||
permission: restrictions.permission,
|
||||
prompt: ATHENA_SYSTEM_PROMPT,
|
||||
color: "#1F8EFA",
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, expect, it } from "bun:test"
|
||||
import { describe, expect, test } from "bun:test"
|
||||
import type { AgentConfig } from "@opencode-ai/sdk"
|
||||
import { applyModelThinkingConfig } from "./model-thinking-config"
|
||||
|
||||
@@ -10,20 +10,20 @@ const BASE_CONFIG: AgentConfig = {
|
||||
}
|
||||
|
||||
describe("applyModelThinkingConfig", () => {
|
||||
describe("given a GPT model", () => {
|
||||
it("returns reasoningEffort medium", () => {
|
||||
describe("#given a GPT model", () => {
|
||||
test("#then returns reasoningEffort medium", () => {
|
||||
const result = applyModelThinkingConfig(BASE_CONFIG, "gpt-5.2")
|
||||
expect(result).toEqual({ ...BASE_CONFIG, reasoningEffort: "medium" })
|
||||
})
|
||||
|
||||
it("returns reasoningEffort medium for openai-prefixed model", () => {
|
||||
test("#then returns reasoningEffort medium for openai-prefixed model", () => {
|
||||
const result = applyModelThinkingConfig(BASE_CONFIG, "openai/gpt-5.2")
|
||||
expect(result).toEqual({ ...BASE_CONFIG, reasoningEffort: "medium" })
|
||||
})
|
||||
})
|
||||
|
||||
describe("given an Anthropic model", () => {
|
||||
it("returns thinking config with budgetTokens 32000", () => {
|
||||
describe("#given an Anthropic model", () => {
|
||||
test("#then returns thinking config with budgetTokens 32000", () => {
|
||||
const result = applyModelThinkingConfig(BASE_CONFIG, "anthropic/claude-opus-4-6")
|
||||
expect(result).toEqual({
|
||||
...BASE_CONFIG,
|
||||
@@ -32,29 +32,29 @@ describe("applyModelThinkingConfig", () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe("given a Google model", () => {
|
||||
it("returns base config unchanged", () => {
|
||||
describe("#given a Google model", () => {
|
||||
test("#then returns base config unchanged", () => {
|
||||
const result = applyModelThinkingConfig(BASE_CONFIG, "google/gemini-3-pro")
|
||||
expect(result).toBe(BASE_CONFIG)
|
||||
})
|
||||
})
|
||||
|
||||
describe("given a Kimi model", () => {
|
||||
it("returns base config unchanged", () => {
|
||||
describe("#given a Kimi model", () => {
|
||||
test("#then returns base config unchanged", () => {
|
||||
const result = applyModelThinkingConfig(BASE_CONFIG, "kimi/kimi-k2.5")
|
||||
expect(result).toBe(BASE_CONFIG)
|
||||
})
|
||||
})
|
||||
|
||||
describe("given a model with no provider prefix", () => {
|
||||
it("returns base config unchanged for non-GPT model", () => {
|
||||
describe("#given a model with no provider prefix", () => {
|
||||
test("#then returns base config unchanged for non-GPT model", () => {
|
||||
const result = applyModelThinkingConfig(BASE_CONFIG, "gemini-3-pro")
|
||||
expect(result).toBe(BASE_CONFIG)
|
||||
})
|
||||
})
|
||||
|
||||
describe("given a Claude model through a non-Anthropic provider", () => {
|
||||
it("returns thinking config for github-copilot/claude-opus-4-6", () => {
|
||||
describe("#given a Claude model through a non-Anthropic provider", () => {
|
||||
test("#then returns thinking config for github-copilot/claude-opus-4-6", () => {
|
||||
const result = applyModelThinkingConfig(BASE_CONFIG, "github-copilot/claude-opus-4-6")
|
||||
expect(result).toEqual({
|
||||
...BASE_CONFIG,
|
||||
@@ -62,7 +62,7 @@ describe("applyModelThinkingConfig", () => {
|
||||
})
|
||||
})
|
||||
|
||||
it("returns thinking config for opencode/claude-opus-4-6", () => {
|
||||
test("#then returns thinking config for opencode/claude-opus-4-6", () => {
|
||||
const result = applyModelThinkingConfig(BASE_CONFIG, "opencode/claude-opus-4-6")
|
||||
expect(result).toEqual({
|
||||
...BASE_CONFIG,
|
||||
@@ -70,7 +70,7 @@ describe("applyModelThinkingConfig", () => {
|
||||
})
|
||||
})
|
||||
|
||||
it("returns thinking config for opencode/claude-sonnet-4-6", () => {
|
||||
test("#then returns thinking config for opencode/claude-sonnet-4-6", () => {
|
||||
const result = applyModelThinkingConfig(BASE_CONFIG, "opencode/claude-sonnet-4-6")
|
||||
expect(result).toEqual({
|
||||
...BASE_CONFIG,
|
||||
|
||||
Reference in New Issue
Block a user