refactor(core): simplify session input promotion (#33443)
This commit is contained in:
parent
34b3d59a23
commit
f48f24ec4e
21 changed files with 160 additions and 493 deletions
|
|
@ -20,7 +20,6 @@ export type Event =
|
|||
| EventSessionNextMoved
|
||||
| EventSessionNextPrompted
|
||||
| EventSessionNextPromptAdmitted
|
||||
| EventSessionNextPromptPromoted
|
||||
| EventSessionNextContextUpdated
|
||||
| EventSessionNextSynthetic
|
||||
| EventSessionNextShellStarted
|
||||
|
|
@ -864,17 +863,6 @@ export type GlobalEvent = {
|
|||
delivery: "steer" | "queue"
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "session.next.prompt.promoted"
|
||||
properties: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
messageID: string
|
||||
prompt: Prompt
|
||||
timeCreated: number
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "session.next.context.updated"
|
||||
|
|
@ -1628,7 +1616,6 @@ export type GlobalEvent = {
|
|||
| SyncEventSessionNextMoved
|
||||
| SyncEventSessionNextPrompted
|
||||
| SyncEventSessionNextPromptAdmitted
|
||||
| SyncEventSessionNextPromptPromoted
|
||||
| SyncEventSessionNextContextUpdated
|
||||
| SyncEventSessionNextSynthetic
|
||||
| SyncEventSessionNextShellStarted
|
||||
|
|
@ -2770,7 +2757,6 @@ export type V2Event =
|
|||
| V2EventSessionNextMoved
|
||||
| V2EventSessionNextPrompted
|
||||
| V2EventSessionNextPromptAdmitted
|
||||
| V2EventSessionNextPromptPromoted
|
||||
| V2EventSessionNextContextUpdated
|
||||
| V2EventSessionNextSynthetic
|
||||
| V2EventSessionNextShellStarted
|
||||
|
|
@ -3220,24 +3206,6 @@ export type SyncEventSessionNextPromptAdmitted = {
|
|||
}
|
||||
}
|
||||
|
||||
export type SyncEventSessionNextPromptPromoted = {
|
||||
type: "sync"
|
||||
id: string
|
||||
syncEvent: {
|
||||
type: "session.next.prompt.promoted.1"
|
||||
id: string
|
||||
seq: number
|
||||
aggregateID: string
|
||||
data: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
messageID: string
|
||||
prompt: Prompt
|
||||
timeCreated: number
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export type SyncEventSessionNextContextUpdated = {
|
||||
type: "sync"
|
||||
id: string
|
||||
|
|
@ -4523,27 +4491,6 @@ export type V2EventSessionNextPromptAdmitted = {
|
|||
}
|
||||
}
|
||||
|
||||
export type V2EventSessionNextPromptPromoted = {
|
||||
id: string
|
||||
metadata?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
durable?: {
|
||||
aggregateID: string
|
||||
seq: number
|
||||
version: number
|
||||
}
|
||||
location?: LocationRef
|
||||
type: "session.next.prompt.promoted"
|
||||
data: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
messageID: string
|
||||
prompt: Prompt
|
||||
timeCreated: number
|
||||
}
|
||||
}
|
||||
|
||||
export type V2EventSessionNextContextUpdated = {
|
||||
id: string
|
||||
metadata?: {
|
||||
|
|
@ -6168,18 +6115,6 @@ export type EventSessionNextPromptAdmitted = {
|
|||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextPromptPromoted = {
|
||||
id: string
|
||||
type: "session.next.prompt.promoted"
|
||||
properties: {
|
||||
timestamp: number
|
||||
sessionID: string
|
||||
messageID: string
|
||||
prompt: Prompt
|
||||
timeCreated: number
|
||||
}
|
||||
}
|
||||
|
||||
export type EventSessionNextContextUpdated = {
|
||||
id: string
|
||||
type: "session.next.context.updated"
|
||||
|
|
|
|||
|
|
@ -14686,9 +14686,6 @@
|
|||
{
|
||||
"$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/EventSessionNextPromptPromoted"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/EventSessionNextContextUpdated"
|
||||
},
|
||||
|
|
@ -17255,45 +17252,6 @@
|
|||
"required": ["id", "type", "properties"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^evt_"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["session.next.prompt.promoted"]
|
||||
},
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"timestamp": {
|
||||
"type": "number"
|
||||
},
|
||||
"sessionID": {
|
||||
"type": "string",
|
||||
"pattern": "^ses"
|
||||
},
|
||||
"messageID": {
|
||||
"type": "string",
|
||||
"pattern": "^msg_"
|
||||
},
|
||||
"prompt": {
|
||||
"$ref": "#/components/schemas/Prompt"
|
||||
},
|
||||
"timeCreated": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "properties"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -19832,9 +19790,6 @@
|
|||
{
|
||||
"$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
|
||||
},
|
||||
|
|
@ -23073,9 +23028,6 @@
|
|||
{
|
||||
"$ref": "#/components/schemas/V2EventSessionNextPromptAdmitted"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/V2EventSessionNextPromptPromoted"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/V2EventSessionNextContextUpdated"
|
||||
},
|
||||
|
|
@ -24400,66 +24352,6 @@
|
|||
"required": ["type", "id", "syncEvent"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"SyncEventSessionNextPromptPromoted": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["sync"]
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^evt_"
|
||||
},
|
||||
"syncEvent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["session.next.prompt.promoted.1"]
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^evt_"
|
||||
},
|
||||
"seq": {
|
||||
"type": "number"
|
||||
},
|
||||
"aggregateID": {
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"timestamp": {
|
||||
"type": "number"
|
||||
},
|
||||
"sessionID": {
|
||||
"type": "string",
|
||||
"pattern": "^ses"
|
||||
},
|
||||
"messageID": {
|
||||
"type": "string",
|
||||
"pattern": "^msg_"
|
||||
},
|
||||
"prompt": {
|
||||
"$ref": "#/components/schemas/Prompt"
|
||||
},
|
||||
"timeCreated": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "id", "seq", "aggregateID", "data"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["type", "id", "syncEvent"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"SyncEventSessionNextContextUpdated": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -28622,67 +28514,6 @@
|
|||
"required": ["id", "type", "data"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"V2EventSessionNextPromptPromoted": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^evt_"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object"
|
||||
},
|
||||
"durable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"aggregateID": {
|
||||
"type": "string"
|
||||
},
|
||||
"seq": {
|
||||
"type": "integer"
|
||||
},
|
||||
"version": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": ["aggregateID", "seq", "version"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"location": {
|
||||
"$ref": "#/components/schemas/LocationRef"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["session.next.prompt.promoted"]
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"timestamp": {
|
||||
"type": "number"
|
||||
},
|
||||
"sessionID": {
|
||||
"type": "string",
|
||||
"pattern": "^ses"
|
||||
},
|
||||
"messageID": {
|
||||
"type": "string",
|
||||
"pattern": "^msg_"
|
||||
},
|
||||
"prompt": {
|
||||
"$ref": "#/components/schemas/Prompt"
|
||||
},
|
||||
"timeCreated": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "data"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"V2EventSessionNextContextUpdated": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -33282,45 +33113,6 @@
|
|||
"required": ["id", "type", "properties"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"EventSessionNextPromptPromoted": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^evt_"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["session.next.prompt.promoted"]
|
||||
},
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"timestamp": {
|
||||
"type": "number"
|
||||
},
|
||||
"sessionID": {
|
||||
"type": "string",
|
||||
"pattern": "^ses"
|
||||
},
|
||||
"messageID": {
|
||||
"type": "string",
|
||||
"pattern": "^msg_"
|
||||
},
|
||||
"prompt": {
|
||||
"$ref": "#/components/schemas/Prompt"
|
||||
},
|
||||
"timeCreated": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "properties"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"EventSessionNextContextUpdated": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue