refactor(core): simplify session input promotion (#33443)
This commit is contained in:
+5
-3
@@ -12,8 +12,8 @@ sessions.create({ id?, location, ... })
|
||||
|
||||
sessions.prompt({ id?, sessionID, prompt, delivery?, resume? })
|
||||
-> omitted ID generates one internal message ID
|
||||
-> supplied ID admits one durable Session input when absent
|
||||
-> exact reuse returns the same admitted lifecycle receipt
|
||||
-> supplied ID inserts one durable Session inbox row when absent
|
||||
-> exact reuse returns the same admission receipt
|
||||
-> reusing one message ID for another Session, prompt, or delivery mode fails
|
||||
-> exact retry schedules another wake unless resume is false
|
||||
-> resume omitted or true schedules execution after admission
|
||||
@@ -27,7 +27,9 @@ sessions.interrupt(sessionID)
|
||||
-> idle or missing Session is a no-op
|
||||
```
|
||||
|
||||
`session_input` is the durable admission inbox. Admitted inputs remain outside model-visible Session history until the serialized runner publishes `PromptLifecycle.Promoted`. The projector atomically writes the visible user message and marks its inbox row promoted in the same event transaction. The legacy V1-to-V2 shadow bridge continues publishing ordinary `Prompted` events for already-visible V1 prompts.
|
||||
`session_input` is the durable admission inbox. `PromptAdmitted` records and projects accepted input so pending queue state can be replayed, replicated, and observed by clients. Admitted inputs remain outside model-visible Session history until the serialized runner publishes `Prompted`. Its projector atomically writes the visible user message and marks the inbox row promoted in the same event transaction. The V1-to-V2 shadow bridge publishes the same `Prompted` event for already-visible V1 prompts.
|
||||
|
||||
`admittedSeq` is the durable Session event sequence of `PromptAdmitted`. Clients may use the admission event to represent queued input before `Prompted` makes it part of visible conversation history.
|
||||
|
||||
Execution routing starts from only the Session ID:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user