diff --git a/src/main/native-chat/agent-session-wire/agent-session-empty-batch.ts b/src/main/native-chat/agent-session-wire/agent-session-empty-batch.ts index bc713f92171..fa4289da396 100644 --- a/src/main/native-chat/agent-session-wire/agent-session-empty-batch.ts +++ b/src/main/native-chat/agent-session-wire/agent-session-empty-batch.ts @@ -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: [] } } diff --git a/src/main/native-chat/agent-session-wire/structured-agent-session-attach.ts b/src/main/native-chat/agent-session-wire/structured-agent-session-attach.ts index 4a8bdd7c0a0..38595d4e6eb 100644 --- a/src/main/native-chat/agent-session-wire/structured-agent-session-attach.ts +++ b/src/main/native-chat/agent-session-wire/structured-agent-session-attach.ts @@ -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. */ diff --git a/src/main/native-chat/agent-session-wire/structured-agent-session-host-lifetime.ts b/src/main/native-chat/agent-session-wire/structured-agent-session-host-lifetime.ts index c602d3a9bb9..00df8b4e910 100644 --- a/src/main/native-chat/agent-session-wire/structured-agent-session-host-lifetime.ts +++ b/src/main/native-chat/agent-session-wire/structured-agent-session-host-lifetime.ts @@ -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 } diff --git a/src/main/native-chat/agent-session-wire/structured-agent-session-host-types.ts b/src/main/native-chat/agent-session-wire/structured-agent-session-host-types.ts index 2ff77d4436d..574ced3cc38 100644 --- a/src/main/native-chat/agent-session-wire/structured-agent-session-host-types.ts +++ b/src/main/native-chat/agent-session-wire/structured-agent-session-host-types.ts @@ -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. */ diff --git a/src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.ts b/src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.ts index 09a6248c0b7..29bf29a00f1 100644 --- a/src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.ts +++ b/src/main/native-chat/agent-session-wire/structured-agent-session-status-feed.ts @@ -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 diff --git a/src/main/native-chat/agent-session-wire/structured-agent-session-unexpected-exit.ts b/src/main/native-chat/agent-session-wire/structured-agent-session-unexpected-exit.ts index 06740bfab25..5363b8588e7 100644 --- a/src/main/native-chat/agent-session-wire/structured-agent-session-unexpected-exit.ts +++ b/src/main/native-chat/agent-session-wire/structured-agent-session-unexpected-exit.ts @@ -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