fix(council): increase archive ID entropy and remove unused toolContext param
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -3,5 +3,5 @@ export const COUNCIL_DEFAULTS = {
|
|||||||
BACKGROUND_WAIT_TIMEOUT_MS: 30000,
|
BACKGROUND_WAIT_TIMEOUT_MS: 30000,
|
||||||
STUCK_THRESHOLD_SECONDS: 120,
|
STUCK_THRESHOLD_SECONDS: 120,
|
||||||
MEMBER_MAX_RUNNING_SECONDS: 1800,
|
MEMBER_MAX_RUNNING_SECONDS: 1800,
|
||||||
ARCHIVE_ID_BYTES: 2,
|
ARCHIVE_ID_BYTES: 8,
|
||||||
} as const
|
} as const
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ describe("council archive integration flow", () => {
|
|||||||
)
|
)
|
||||||
const result: CouncilFinalizeResult = JSON.parse(extractJson(resultStr))
|
const result: CouncilFinalizeResult = JSON.parse(extractJson(resultStr))
|
||||||
|
|
||||||
expect(result.archive_dir).toMatch(/\.sisyphus\/athena\/council-test-[a-f0-9]{4}$/)
|
expect(result.archive_dir).toMatch(/\.sisyphus\/athena\/council-test-[a-f0-9]{16}$/)
|
||||||
expect(result.meta_file).toMatch(/meta\.yaml$/)
|
expect(result.meta_file).toMatch(/meta\.yaml$/)
|
||||||
expect(result.members).toHaveLength(3)
|
expect(result.members).toHaveLength(3)
|
||||||
|
|
||||||
|
|||||||
@@ -73,8 +73,8 @@ describe("createCouncilFinalize", () => {
|
|||||||
)
|
)
|
||||||
const result: CouncilFinalizeResult = JSON.parse(extractJson(resultStr))
|
const result: CouncilFinalizeResult = JSON.parse(extractJson(resultStr))
|
||||||
|
|
||||||
expect(result.archive_dir).toMatch(/\.sisyphus\/athena\/council-test-[a-f0-9]{4}$/)
|
expect(result.archive_dir).toMatch(/\.sisyphus\/athena\/council-test-[a-f0-9]{16}$/)
|
||||||
expect(result.meta_file).toMatch(/\.sisyphus\/athena\/council-test-[a-f0-9]{4}\/meta\.yaml$/)
|
expect(result.meta_file).toMatch(/\.sisyphus\/athena\/council-test-[a-f0-9]{16}\/meta\.yaml$/)
|
||||||
expect(result.members).toHaveLength(3)
|
expect(result.members).toHaveLength(3)
|
||||||
|
|
||||||
for (let i = 0; i < agents.length; i++) {
|
for (let i = 0; i < agents.length; i++) {
|
||||||
@@ -517,7 +517,7 @@ describe("createCouncilFinalize", () => {
|
|||||||
)
|
)
|
||||||
const result: CouncilFinalizeResult = JSON.parse(extractJson(resultStr))
|
const result: CouncilFinalizeResult = JSON.parse(extractJson(resultStr))
|
||||||
|
|
||||||
expect(result.archive_dir).toMatch(/^\.sisyphus\/athena\/council-unnamed-[a-f0-9]{4}$/)
|
expect(result.archive_dir).toMatch(/^\.sisyphus\/athena\/council-unnamed-[a-f0-9]{16}$/)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -13,9 +13,6 @@ import {
|
|||||||
} from "../../agents/athena"
|
} from "../../agents/athena"
|
||||||
import type { CouncilFinalizeArgs, CouncilMemberResult, CouncilFinalizeResult } from "./types"
|
import type { CouncilFinalizeArgs, CouncilMemberResult, CouncilFinalizeResult } from "./types"
|
||||||
|
|
||||||
type CouncilFinalizeToolContext = {
|
|
||||||
sessionID?: string
|
|
||||||
}
|
|
||||||
export function createCouncilFinalize(
|
export function createCouncilFinalize(
|
||||||
basePath?: string,
|
basePath?: string,
|
||||||
): ToolDefinition {
|
): ToolDefinition {
|
||||||
@@ -34,7 +31,7 @@ export function createCouncilFinalize(
|
|||||||
question: tool.schema.string().optional().describe("Original user question that triggered the council"),
|
question: tool.schema.string().optional().describe("Original user question that triggered the council"),
|
||||||
prompt_file: tool.schema.string().optional().describe("Path to the council prompt temp file (will be moved into the archive)"),
|
prompt_file: tool.schema.string().optional().describe("Path to the council prompt temp file (will be moved into the archive)"),
|
||||||
},
|
},
|
||||||
async execute(args: CouncilFinalizeArgs, toolContext: CouncilFinalizeToolContext) {
|
async execute(args: CouncilFinalizeArgs, toolContext) {
|
||||||
const resolvedIntent = resolveCouncilIntent(args.intent)
|
const resolvedIntent = resolveCouncilIntent(args.intent)
|
||||||
if (!resolvedIntent) {
|
if (!resolvedIntent) {
|
||||||
return `Invalid intent: "${args.intent}". Valid intents: ${getValidCouncilIntents().join(", ")}.`
|
return `Invalid intent: "${args.intent}". Valid intents: ${getValidCouncilIntents().join(", ")}.`
|
||||||
|
|||||||
Reference in New Issue
Block a user