feat(atlas): update resolvers and index for lineage-aware session resolution

- Update recent-model-resolver for session origin awareness
- Update resolve-active-boulder-session with lineage support
- Add comprehensive test coverage for boulder session resolution
- Add fallback tests for recent model resolver
- Update index tests for new lineage tracking

🤖 Generated with assistance of OhMyOpenCode
This commit is contained in:
YeonGyu-Kim
2026-04-05 17:15:17 +09:00
parent d12c74120d
commit d1be22fb1b
6 changed files with 281 additions and 43 deletions
+12 -3
View File
@@ -18,16 +18,25 @@ export async function resolveRecentPromptContextForSession(
try {
const messagesResp = await ctx.client.session.messages({ path: { id: sessionID } })
const messages = normalizeSDKResponse(messagesResp, [] as Array<{
id?: string
info?: {
model?: ModelInfo
modelID?: string
providerID?: string
tools?: Record<string, boolean | "allow" | "deny" | "ask">
time?: { created?: number }
}
}>)
}>).sort((left, right) => {
const leftTime = left.info?.time?.created ?? Number.NEGATIVE_INFINITY
const rightTime = right.info?.time?.created ?? Number.NEGATIVE_INFINITY
if (leftTime !== rightTime) return rightTime - leftTime
const leftId = typeof left.id === "string" ? left.id : ""
const rightId = typeof right.id === "string" ? right.id : ""
return rightId.localeCompare(leftId)
})
for (let i = messages.length - 1; i >= 0; i--) {
const info = messages[i].info
for (const message of messages) {
const info = message.info
const model = info?.model
const tools = normalizePromptTools(info?.tools)
if (model?.providerID && model?.modelID) {