refactor: add authoritative revalidation on app resume and reconnect
This commit is contained in:
@@ -1631,6 +1631,7 @@ describe('DaemonClient', () => {
|
||||
payload: {
|
||||
requestId: 'req-1',
|
||||
agentId: 'agent_cli',
|
||||
agent: null,
|
||||
direction: 'tail',
|
||||
projection: 'projected',
|
||||
epoch: 'epoch-1',
|
||||
@@ -1724,6 +1725,7 @@ describe('DaemonClient', () => {
|
||||
payload: {
|
||||
requestId: 'req-invalid',
|
||||
agentId: 'agent_cli',
|
||||
agent: null,
|
||||
direction: 'tail',
|
||||
projection: 'projected',
|
||||
epoch: 'epoch-1',
|
||||
|
||||
@@ -5975,6 +5975,7 @@ export class Session {
|
||||
|
||||
try {
|
||||
const snapshot = await this.ensureAgentLoaded(msg.agentId)
|
||||
const agentPayload = await this.buildAgentPayload(snapshot)
|
||||
|
||||
let timeline = this.agentManager.fetchTimeline(msg.agentId, {
|
||||
direction,
|
||||
@@ -6065,6 +6066,7 @@ export class Session {
|
||||
payload: {
|
||||
requestId: msg.requestId,
|
||||
agentId: msg.agentId,
|
||||
agent: agentPayload,
|
||||
direction,
|
||||
projection,
|
||||
epoch: timeline.epoch,
|
||||
@@ -6090,6 +6092,7 @@ export class Session {
|
||||
payload: {
|
||||
requestId: msg.requestId,
|
||||
agentId: msg.agentId,
|
||||
agent: null,
|
||||
direction,
|
||||
projection,
|
||||
epoch: '',
|
||||
|
||||
@@ -15,6 +15,7 @@ describe('shared messages stream parsing', () => {
|
||||
payload: {
|
||||
requestId: 'req-1',
|
||||
agentId: 'agent_live',
|
||||
agent: null,
|
||||
direction: 'tail',
|
||||
projection: 'projected',
|
||||
epoch: 'epoch-1',
|
||||
|
||||
@@ -1594,6 +1594,7 @@ export const FetchAgentTimelineResponseMessageSchema = z.object({
|
||||
payload: z.object({
|
||||
requestId: z.string(),
|
||||
agentId: z.string(),
|
||||
agent: AgentSnapshotPayloadSchema.nullable(),
|
||||
direction: z.enum(['tail', 'before', 'after']),
|
||||
projection: z.enum(['projected', 'canonical']),
|
||||
epoch: z.string(),
|
||||
|
||||
Reference in New Issue
Block a user