refactor(sdk): narrow response fallbacks

Replace unsafe unknown-array assertions with generic fallback types and explicit todo status narrowing.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-15 16:31:13 +09:00
parent 4785767a0c
commit d92e78c956
3 changed files with 19 additions and 15 deletions
@@ -62,7 +62,7 @@ export async function readMessagesFromSDK(
): Promise<StoredMessageMeta[]> {
try {
const response = await client.session.messages({ path: { id: sessionID } })
const data = normalizeSDKResponse(response, [] as unknown[], {
const data = normalizeSDKResponse<unknown[]>(response, [], {
preferResponseOnMissingData: true,
})
if (!Array.isArray(data)) return []