feat(core): persist v2 session context epochs (#30789)
This commit is contained in:
parent
c47cb28781
commit
1af8dafd3e
45 changed files with 4861 additions and 521 deletions
|
|
@ -21,6 +21,7 @@ export type Event =
|
|||
| EventSessionNextPrompted
|
||||
| EventSessionNextPromptAdmitted
|
||||
| EventSessionNextPromptPromoted
|
||||
| EventSessionNextContextUpdated
|
||||
| EventSessionNextSynthetic
|
||||
| EventSessionNextShellStarted
|
||||
| EventSessionNextShellEnded
|
||||
|
|
@ -867,6 +868,16 @@ export type GlobalEvent = {
|
|||
timeCreated: number
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "session.next.context.updated"
|
||||
properties: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
messageID: string
|
||||
text: string
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "session.next.synthetic"
|
||||
|
|
@ -1615,6 +1626,7 @@ export type GlobalEvent = {
|
|||
| SyncEventSessionNextPrompted
|
||||
| SyncEventSessionNextPromptAdmitted
|
||||
| SyncEventSessionNextPromptPromoted
|
||||
| SyncEventSessionNextContextUpdated
|
||||
| SyncEventSessionNextSynthetic
|
||||
| SyncEventSessionNextShellStarted
|
||||
| SyncEventSessionNextShellEnded
|
||||
|
|
@ -3259,6 +3271,23 @@ export type SyncEventSessionNextPromptPromoted = {
|
|||
}
|
||||
}
|
||||
|
||||
export type SyncEventSessionNextContextUpdated = {
|
||||
type: "sync"
|
||||
id: string
|
||||
syncEvent: {
|
||||
type: "session.next.context.updated.1"
|
||||
id: string
|
||||
seq: number
|
||||
aggregateID: string
|
||||
data: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
messageID: string
|
||||
text: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export type SyncEventSessionNextSynthetic = {
|
||||
type: "sync"
|
||||
id: string
|
||||
|
|
@ -3822,6 +3851,18 @@ export type SessionMessageSynthetic = {
|
|||
type: "synthetic"
|
||||
}
|
||||
|
||||
export type SessionMessageSystem = {
|
||||
id: string
|
||||
metadata?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
time: {
|
||||
created: number
|
||||
}
|
||||
type: "system"
|
||||
text: string
|
||||
}
|
||||
|
||||
export type SessionMessageShell = {
|
||||
id: string
|
||||
metadata?: {
|
||||
|
|
@ -3980,6 +4021,7 @@ export type SessionMessage =
|
|||
| SessionMessageModelSwitched
|
||||
| SessionMessageUser
|
||||
| SessionMessageSynthetic
|
||||
| SessionMessageSystem
|
||||
| SessionMessageShell
|
||||
| SessionMessageAssistant
|
||||
| SessionMessageCompaction
|
||||
|
|
@ -4339,6 +4381,17 @@ export type EventSessionNextPromptPromoted = {
|
|||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextContextUpdated = {
|
||||
id: string
|
||||
type: "session.next.context.updated"
|
||||
properties: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
messageID: string
|
||||
text: string
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextSynthetic = {
|
||||
id: string
|
||||
type: "session.next.synthetic"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue