mirror of
https://github.com/stablyai/orca.git
synced 2026-10-20 08:03:28 +00:00
docs(native-chat): stop citing the removed handoff in lifecycle comments
Six comments still named the handoff coordinator, a handoff suspend, or a terminal-owned session as live participants in the flows they describe. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { AgentJournalCursor } from '../../../shared/agent-session-journal-types'
|
||||
import type { AgentSessionJournalBatch } from '../../../shared/agent-session-wire'
|
||||
|
||||
/** A batch that advances nothing: the carrier for fence, handoff, roster, and clock updates. */
|
||||
/** A batch that advances nothing: the carrier for fence, roster, and clock updates. */
|
||||
export function emptyAgentSessionBatch(cursor: AgentJournalCursor): AgentSessionJournalBatch {
|
||||
return { cursor, items: [], removedItemIds: [], submissions: [] }
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ export type AttachedJournal = {
|
||||
* record store handed this host the lease and before `onAttached` starts a
|
||||
* provider child, so nothing can be appending to the provider's history while it
|
||||
* is read, and the window stays valid until the resume consumes it. Every other
|
||||
* settlement site — a proven child exit, a handoff suspend — runs while the host
|
||||
* settlement site — a proven child exit — runs while the host
|
||||
* may still start another child, and a read there could be overtaken before it
|
||||
* is acted on. Orca still never re-sends: this decides state only.
|
||||
*/
|
||||
|
||||
@@ -56,8 +56,8 @@ function hasProviderChild(
|
||||
}
|
||||
|
||||
/** The wind-down this host owes for the session's child. A live child always owes one, whatever a
|
||||
* previous childless eviction recorded — the same session object is re-acquired in place on a
|
||||
* handoff back to native, so a remembered `false` must never outrank the child in front of it. */
|
||||
* previous childless eviction recorded: a remembered `false` must never outrank the child in front
|
||||
* of it. */
|
||||
function owesProviderChildWindDown(session: StructuredAgentSessionHostSession): boolean {
|
||||
return session.hasProviderChild || session.owesProviderChildWindDown === true
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ export type StructuredAgentSessionHostSession = {
|
||||
params: AgentSessionAttachParams
|
||||
fence: number
|
||||
/** Whether THIS host generation is running the provider process behind the session. A journal
|
||||
* restored for reading has none, and neither has a session a TUI owns — so neither may be
|
||||
* evicted to free a child, and neither may have its lease released as an observed exit. */
|
||||
* restored for reading has none — so it may not be evicted to free a child, nor have its lease
|
||||
* released as an observed exit. */
|
||||
hasProviderChild: boolean
|
||||
/** Whether the child behind `hasProviderChild` has proven its start. A publish-first acquire
|
||||
* is `starting` until the adapter's `started` event; only then are its reported options fact. */
|
||||
|
||||
@@ -264,8 +264,8 @@ export class StructuredAgentSessionStatusFeed {
|
||||
}
|
||||
const record = this.deps.getRecord(sessionId)
|
||||
const providerSession = structuredAgentSessionProviderSessionMetadata(record)
|
||||
// The journal has no model: the record's acknowledged options are where an owner
|
||||
// handoff or a mid-session switch lands, so the row follows whichever is in force.
|
||||
// The journal has no model: the record's acknowledged options are where a mid-session
|
||||
// switch lands, so the row follows whichever is in force.
|
||||
const model = normalizeOptionalField(record?.options?.model, AGENT_MODEL_MAX_LENGTH)
|
||||
// Usage is dropped here on purpose: a `task_progress` tick would otherwise fail the
|
||||
// equality check and re-broadcast a full summary to every remote subscriber for a
|
||||
|
||||
@@ -73,7 +73,7 @@ export async function settleUnexpectedStructuredAgentSessionExit<
|
||||
}
|
||||
const record = context.store.getRecord(unexpectedEvent.sessionId)
|
||||
if (!record || record.lease.handoffStage !== null) {
|
||||
// The handoff coordinator owns an already-started transition.
|
||||
// An acquisition or recovery already owns this lease's transition.
|
||||
session.hasProviderChild = false
|
||||
context.publishStatus?.(unexpectedEvent.sessionId)
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user