8000 feat(agentcore): add observation bus and session kernel by Fodesu · Pull Request #91 · felinics/twilight · GitHub
[go: up one dir, main page]

Skip to content

feat(agentcore): add observation bus and session kernel - #91

Merged
Fodesu merged 1 commit into
feat/agent-runtime-core-17-loop-conformancefrom
feat/agent-runtime-core-18-observe-kernel
Oct 3, 2026
Merged

Fodesu merged 1 commit into
feat/agent-runtime-core-17-loop-conformancefrom
feat/agent-runtime-core-18-observe-kernel

Conversation

@Fodesu
@Fodesu Fodesu commented Oct 3, 2026 •
Copy link
Copy Markdown
Member

Summary

Adds the observation bus and session kernel used to coordinate committed Run activity with non-authoritative progress and session-level ownership decisions.

Design

observe.Bus is a bounded, per-session observation channel. Subscribers receive committed events and provisional progress without turning the observation stream into a second source of truth. The bus assigns ordering within its own observation lifecycle, handles slow consumers through its configured buffering behavior, and exposes the distinction between replayable committed notifications and lossy in-flight frames.

The session kernel coordinates the owner-facing lifecycle around those boundaries. Its protocol combines session identity, owner epoch, quiescence, and coordinator operations without making the kernel a replacement for the ledger or Run projections. The coordinator can observe active work, request or await quiescence, and hand control back only after the relevant session state is stable. Quiescence is modeled as an explicit condition rather than inferred from an empty local queue, which matters when effects are executing in another process or when settlement notices are delayed.

The kernel’s state transitions keep ownership and observation separate: a session may have durable committed facts while still producing provisional progress, and a process may stop observing without deleting or rewriting those facts. Coordinator methods therefore operate around the Session/Run stores and leave event interpretation to the owning projections and Loop.

Testing

Tests cover bus publication and subscription behavior, ordering and bounded delivery, coordinator lifecycle, kernel protocol interactions, and quiescence transitions, including repeated or invalid state changes.

@Fodesu
Fodesu added this pull request to stack #105 October 3, 2026 12:27
@Fodesu Fodesu changed the title feat/agent runtime core 18 observe kernel feat(agentcore): add observation bus and session kernel Oct 3, 2026
@Fodesu
Fodesu force-pushed the feat/agent-runtime-core-18-observe-kernel branch from 6f056d5 to 1a04044 Compare October 3, 2026 14:43
@Fodesu
Fodesu marked this pull request as ready for review October 3, 2026 14:49
@Fodesu
Fodesu removed this pull request from stack #105 October 3, 2026 16:13
@Fodesu
Fodesu added this pull request to stack #107 October 3, 2026 16:16
@Fodesu
Fodesu removed this pull request from stack #107 October 3, 2026 16:34
@Fodesu
Fodesu added this pull request to stack #108 October 3, 2026 16:37
@Fodesu
Fodesu removed this pull request from stack #108 October 3, 2026 16:51
@Fodesu
Fodesu added this pull request to stack #110 October 3, 2026 16:55
@Fodesu
Fodesu force-pushed the feat/agent-runtime-core-18-observe-kernel branch from 1a04044 to d689599 Compare October 3, 2026 17:04
@Fodesu
Fodesu force-pushed the feat/agent-runtime-core-18-observe-kernel branch from d689599 to 02ac2ff Compare October 3, 2026 17:11
@Fodesu
Fodesu merged commit d5ce602 into main Oct 3, 2026
4 checks passed
@Fodesu
Fodesu deleted the feat/agent-runtime-core-18-observe-kernel branch October 5, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0