fix(athena): address 11 audit findings (H2,H3,H5,M1-M4,M8-M11)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import type { PluginInput } from "@opencode-ai/plugin"
|
||||
import { log, normalizeSDKResponse } from "../../shared"
|
||||
import { hasCouncilResponseTag } from "./council-continuation-enforcer"
|
||||
|
||||
type OpencodeClient = PluginInput["client"]
|
||||
|
||||
const COUNCIL_RESPONSE_TAG = "</COUNCIL_MEMBER_RESPONSE>"
|
||||
|
||||
export async function sessionHasCouncilResponse(
|
||||
client: OpencodeClient,
|
||||
sessionID: string,
|
||||
@@ -20,18 +19,7 @@ export async function sessionHasCouncilResponse(
|
||||
{ preferResponseOnMissingData: true },
|
||||
)
|
||||
|
||||
for (let i = messages.length - 1; i >= 0; i--) {
|
||||
const msg = messages[i]
|
||||
if (msg.info?.role !== "assistant") continue
|
||||
const parts = msg.parts ?? []
|
||||
for (const part of parts) {
|
||||
if (part.type === "text" && part.text?.includes(COUNCIL_RESPONSE_TAG)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
return hasCouncilResponseTag(messages)
|
||||
} catch (error) {
|
||||
log("[council-response-checker] Error checking session for response tag:", {
|
||||
sessionID,
|
||||
|
||||
Reference in New Issue
Block a user