fix(background-agent): exempt council members from TTL pruning + fix promptFileMoved scope
Council members now skip TTL check in poller via isCouncilMemberAgent() prefix match, covering both interactive (task tool) and bulk (athena_council) launch paths. Users can cancel manually if needed. Also fix promptFileMoved variable scoping: move declaration before try block so finally block can access it. Dynamic timeout in error messages.
This commit is contained in:
@@ -44,6 +44,7 @@ export function createCouncilFinalize(
|
|||||||
|
|
||||||
const base = basePath ?? process.cwd()
|
const base = basePath ?? process.cwd()
|
||||||
|
|
||||||
|
let promptFileMoved = false
|
||||||
try {
|
try {
|
||||||
const hexId = randomBytes(COUNCIL_DEFAULTS.ARCHIVE_ID_BYTES).toString("hex")
|
const hexId = randomBytes(COUNCIL_DEFAULTS.ARCHIVE_ID_BYTES).toString("hex")
|
||||||
const safeName = slugify(args.name) || "unnamed"
|
const safeName = slugify(args.name) || "unnamed"
|
||||||
@@ -144,7 +145,7 @@ export function createCouncilFinalize(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
let promptFileMoved = false
|
|
||||||
const relPromptFile = args.prompt_file
|
const relPromptFile = args.prompt_file
|
||||||
? await movePromptFile(args.prompt_file, base, absArchiveDir, relArchiveDir).then((result) => {
|
? await movePromptFile(args.prompt_file, base, absArchiveDir, relArchiveDir).then((result) => {
|
||||||
promptFileMoved = true
|
promptFileMoved = true
|
||||||
|
|||||||
Reference in New Issue
Block a user