Repository navigation
Add cognitive-tier TypeScript modules: echo-agent-loop, memory schema/consolidator, GlobalWorkspaceBroadcaster, Dove9 kernel/logger - #1
Merged
Conversation
…adcaster, memory schema/consolidator, dove9 kernel/logger, and 40 passing tests Agent-Logs-Url: https://github.com/o9nn/mawui/sessions/ea5582e2-80a5-4c88-afe2-9f8e5fe96e45 Co-authored-by: drzo <15202748+drzo@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Optimize echo agent loop for memory-write contention
Add cognitive-tier TypeScript modules: echo-agent-loop, memory schema/consolidator, GlobalWorkspaceBroadcaster, Dove9 kernel/logger
May 5, 2026
drzo
marked this pull request as ready for review
May 5, 2026 11:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seeds the cognitive AI layer described in the echo-master report: a six-memory architecture with Matula prime eternal names, a GlobalWorkspace broadcast channel, and a re-entrancy-safe agent loop and memory consolidator.
Core modules
echo-agent-loop.ts(Matula 137) —EchoAgentLoopdrives the cognitive cycle with atickInProgressre-entrancy guard (drops, never queues overrun ticks), anoverrunCountmetric, and ashouldYield()cooperative early-return signal injected into each tick callbacktelemetry/GlobalWorkspaceBroadcaster.ts(Matula 103) — synchronous pub/sub hub emittingsync_event|broadcast_pulse|workspace_clear; listener errors are caught and warned so one bad subscriber cannot kill the pipelinememory/schema.ts— Phase 0 schema: six subsystems (Episodic 2, Semantic 3, Procedural 5, Participatory 7, Declarative 11, Working 13) each assigned a Matula prime as its eternal name;AtomSpacebacking store;decodeLinksreconstructs structural links via prime-product factorizationmemory/MemoryConsolidator.ts— Phase 1 consolidation: subscribes toGlobalWorkspaceBroadcaster, gates subsystem writes bystreamSaliencesthreshold, applies the same re-entrancy drop pattern as the agent loopdove9/kernel.ts(Matula 107/109) —Dove9Kernelmanages idle→running→suspended→stopped lifecycle with aMailFlagsignal for waking suspended agentsdove9/utils/logger.ts(Matula 113) — structured logger with replaceableLogSink(test-friendly) and per-instance + global level filteringWiring example
The re-entrancy drop contract is intentionally symmetric: slow ticks drop in
EchoAgentLoop, slow consolidation drops inMemoryConsolidator, so neither can block the other's next cycle.Project infrastructure
package.json+tsconfig.json+jest.config.jsbootstrapping the TS/Jest project alongside the existing C librarydove9/__tests__/kernel.test.ts,dove9/__tests__/utils/logger.test.ts, and__tests__/cognitive-tier-integration.test.tsOriginal prompt