chore: rebase local deployment features onto hapi v0.30.3

This commit is contained in:
2026-09-13 15:55:04 +08:00
parent 95b06bd502
commit cb0dbd7d22
210 changed files with 16517 additions and 2811 deletions
+31
View File
@@ -2,6 +2,7 @@ import { describe, expect, it } from 'vitest'
import {
ClearOpencodeSessionCallbackRequestSchema,
ClearOpencodeSessionResponseSchema,
ListClaudeSessionsRpcResponseSchema,
ListCodexSessionsRpcResponseSchema,
ListPiSessionsRpcResponseSchema,
MessagesQuerySchema,
@@ -37,6 +38,36 @@ describe('ListCodexSessionsRpcResponseSchema', () => {
})
})
describe('ListClaudeSessionsRpcResponseSchema', () => {
it('preserves Claude transcript messages when parsing runner RPC responses', () => {
const parsed = ListClaudeSessionsRpcResponseSchema.parse({
success: true,
sessions: [{
id: 'claude-session-id',
title: 'Claude Session',
file: '/home/user/.claude/projects/project/session.jsonl',
modifiedAt: 1_000,
messageCount: 1,
messages: [{
localId: 'claude:claude-session-id:user-1',
createdAt: 900,
content: {
role: 'user',
content: { type: 'text', text: 'hello' },
meta: { sentFrom: 'cli' }
}
}]
}]
})
expect(parsed.success).toBe(true)
if (parsed.success) {
const first = parsed.sessions[0]
expect(first && 'messages' in first ? first.messages : []).toHaveLength(1)
}
})
})
describe('ListPiSessionsRpcResponseSchema', () => {
it('preserves stable Pi entry and local ids', () => {
const parsed = ListPiSessionsRpcResponseSchema.parse({