- Memory unification follow-up (aegis-oss#78):
consolidateEpisodicToSemantic(kernel/memory/consolidation.ts) redesigned to write throughwriteDreamFact()(newkernel/memory/dream-write.ts) into the wiki'sdreamsscope, instead of writing raw fragments straight into the memory-worker fragment store — this was the deferred piece of the #457 wiki unification the original decision doc flagged as needing design work. Consolidation is now purely additive (extract 0-3 genuine facts per cycle, write each as its own dream page); the old ADD/UPDATE/DELETE-by-fragment-id model doesn't map cleanly onto wiki pages, so update/delete semantics are dropped in favor of the dreams lifecycle (promote on corroboration, archive if stale) already used by PRISM's cross-domain synthesis. - Removed
publishInsightsFromMemory()fromkernel/scheduled/consolidation.ts— this CRIX insight-publishing step calledpublishInsight()/validateInsight()against a D1 table literally namedmemory, which is never created by any migration in this repo or in aegis-daemon. Every invocation was silently failing (caught and logged as a warning) on every consolidation cycle.insights.ts's public API (publishInsight,validateInsight,promoteInsight,listInsights, etc.) is left intact as OSS surface for downstream consumers — only the internal, broken call site was removed.
- OTDD contract test suites for all five bounded contexts — AgendaItem (48 tests), CCTask (53 tests), Goal (65 tests), ExecutorRouter I1/I2 violation paths (4 tests), and MemoryEntry/CRIX pipeline (33 tests). Tests are derived directly from
.contract.tsschema, state machine, invariant, and authority declarations with no mocks.
executor-router.ts— addedisDefault?: truetoExecutorRouteinterface to matchExecutorRouteShapeSchemain the contract; removes TS2353 on theworkers_airoute.workers-ai-chat.ts— narrowedAi.run()overload cast via explicit function-signature cast to resolve TS2769/TS2352; removes theas Record<string, unknown>workaround that leaked the intersection mismatch.kernel/memory/agenda.ts—resolveAgendaItemnow addsAND status = 'active'to its UPDATE and throws when 0 rows are affected, enforcing the contract's terminal-state invariant fordoneanddismissed.
- Vite-built embedded web console served through the Worker
ASSETSbinding, including text chat, conversation history, health summary, and a voice panel using@cloudflare/voice/react. (aegis-oss#40) AegisVoiceAdapterstandalone Worker export and Agents SDK/agents/aegis-voice-adapter/operatorrouting for Cloudflare-native voice calls. (aegis-oss#40)- Built
public/SPA assets in the package so a fresh checkout can deploy a working console without a private Stackbilt UI dependency. (aegis-oss#40)
npm run deployandnpm run devnow build the embedded UI before invoking Wrangler, andwrangler.toml.exampleincludesASSETS,CHAT_SESSION,AegisVoiceAdapter,DB, andAIbindings.- The browser console uses Workers AI for its base chat path and treats Claude/Groq keys as optional executor upgrades.
/agents/*voice routes now enforce the sameAEGIS_TOKENvia bearer header, cookie, or query token before reaching the Agents SDK router.- HTTP message routes skip Groq title generation when
GROQ_API_KEYis unset.
cli/aegis.mjsand theaegispackage binary, including quick-start connection handling and executor override support for terminal demos. (aegis-oss#55)/chat/ws,ChatSession, andChatSessionAuthprimitives for websocket-backed chat sessions, plus schema/configuration docs and tests. (aegis-oss#55)- Standalone chat shell UI support and a disambiguation firewall for safer routing and demo-path trust hardening.
- Migrated the remaining in-repo LLM inference paths through
@stackbilt/llm-providers: Claude executor, dynamic tools, Groq helpers, Workers AI helper fallbacks, composite execution, and the last raw Groq logprobs path. (aegis-oss#24) - Hardened digest delivery, grounding dispatch, and grounding-gap persistence so failed or missing evidence is recorded more consistently.
- Restored the release workflow's npm publish auth fallback while preserving trusted publishing support. (aegis-oss#51)
auth.ts— the bearer-token login form now renders for any HTML navigation (GET request withAccept: text/html) instead of a hardcoded'/chat' | '/overworld' | '/console'path list. Path-agnostic, so downstream variant pages (e.g. the daemon's/litemobile surface) get the fresh-device login form for free with no core-side route coupling. Non-HTML (fetch/XHR) requests still get a JSON 401. (aegis-oss#50)
kernel/scheduled/curiosity.ts— new'conversation_gap'source type (7th inCuriosityCandidate['source']union) surfaces consolidation pipeline gaps alongside knowledge gaps; MindSpring fanout (up to 3 parallel queries with 1.5s timeout, threshold 0.5) identifies topics with ≥1 conversation match but ≤2 MW entries;thinTopicSeeds: string[]collector preserves raw MW topic strings before wrapping in question format
- All executor LLM calls now routed through
@stackbilt/llm-providersLLMProviderFactory— eliminates hand-rolled inference inexecuteGroq,executeWorkersAi, andexecuteGptOss(Phase D.1–D.5) executeGptOsstwo-phase tool loop migrated to factory:LLMMessage[]message format, cost fromresult.usage.cost,topP/frequencyPenaltyforwarded via newLLMRequestfieldskernel/executorsnow exportsEXECUTOR_FNS— uniform(intent, env) → {text, cost}dispatch map for groq, workers_ai, gpt_oss, claude; powers route-driven dispatch indispatch.tsdispatch.tsswitch collapsed: groq/workers_ai/gpt_oss/shadow-exploration cases replaced byEXECUTOR_FNSlookup; explicit branches kept only for claude/claude_opus failover, composite, direct, claude_code, tarotscript- New:
kernel/executor-router.ts—EXECUTOR_ROUTEScatalog (provider, model fn, fallback chain) for all 7 LLM executors;getExecutorRoute()helper - New:
kernel/provider-factory.ts—buildLLMProviderFactory(env)wraps@stackbilt/llm-providerswith EdgeEnv bindings
@stackbilt/aegis-core/kernel/provider-factory—buildLLMProviderFactory(env)now a named subpath import@stackbilt/aegis-core/kernel/executor-router—EXECUTOR_ROUTES,getExecutorRoute,ExecutorRoute,LLMExecutornow importable by consumers
@stackbilt/llm-providersbumped to^1.6.4(published):gpt-oss-120bcost rates fixed:$0.35/$0.75 per MTok(was$0.0008/MTokplaceholder)topPandfrequencyPenaltyadded toLLMRequest; forwarded astop_p/frequency_penaltyby the Cloudflare provider
kernel/patterns— convergence pattern contracts (P1PositionalDispatch, P7TieredExecution); exportsPOSITIONAL_DISPATCH_PATTERN_ID,TIERED_EXECUTION_PATTERN_ID, and their*_CONTRACT_VERSIONconstants; consumer repos import the interface for structural-compat tests
Executorunion extended with'cerebras_mid' | 'cerebras_reasoning'— unblocks daemon shadow collapse;EXECUTOR_ATTACHMENTSinkernel/memory/blocksmaps both toCORE_BLOCKS
kernel/grounding/verify—verifyAgendaClaim,verifyTaskClaim,verifyWikiPageClaim(aegis-oss#34 PR 3)kernel/grounding/fanout—extractEntities,groundIntent,summarizeGrounding,formatGroundingBlock(entity grounding fanout without BizOps leg)kernel/grounding/fabrication-detector— mutation-claim v1 + referential-claim v2 post-pass;pattern_idverification skipped in core (catalog is consumer-specific)kernel/grounding/semantic-sanhedrin— Workers AI wiki-contradiction gate (aegis#573)kernel/grounding-layer— orchestrator:augmentWithInsights,augmentWithEntityGrounding,augmentWithMemoryRecall,applyFabricationCheck,applyGapSignal,applyGroundingProofwikiBinding?: FetcherandwikiToken?: stringadded toEdgeEnv(required by grounding-layer)grounded?,sources?,unknowns?,searched?,unverified_claims?added toDispatchResult
- Decision-entity fanout (BizOps
verifyDecisionClaim) is omitted — daemon-specific; consumers compose at call site - Circuit-breaker wrapping absent from this layer; consumers wanting auto-disable-after-N-failures compose at call site using
createResilience()fromkernel/resilience pattern_idverification skipped inverifyReferentialClaims; the convergence-patterns catalog lives in the daemon and is not generic- No tests ported in this release
- Removed
court_cardfromEpisodicEntryinterface andepisodic_memoryschema — it is TarotScript/Stackbilt-specific, not generic agent framework content (scope creep from 0.5.0)
episodic_memoryschema: if you applied 0.5.0'scourt_card TEXTcolumn, drop it:ALTER TABLE episodic_memory DROP COLUMN court_card(SQLite 3.35+) or recreate the table
kernel/memory-service—MemoryServiceclass andmemoryServiceFor()factory ported from daemon (aegis-oss#34 PR 2)recordGapSignal/clearGapSignaladded tokernel/memory/proceduraland exported fromkernel/memoryindexgap_signal_count/gap_last_seencolumns added toprocedural_memoryschemaexecutor_configcolumn added toepisodic_memoryschema (parity with daemon)EpisodicEntryextended withcomplexity_tier,executor_configoptional fieldsProceduralEntryextended withgap_signal_count,gap_last_seenoptional fields
wiki/client— EmDash CMS client ported from daemon;WikiClientEnv.wikiBaseUrlreplaces hardcoded Stackbilt URL (configurable by consuming apps)wiki/types—WikiScope,WikiType,WikiConfidence,WikiStatusenums + all page/write/result interfaces- Exported at
@stackbilt/aegis-core/wiki/clientand@stackbilt/aegis-core/wiki/types
- ODD contracts for 4 core entities:
GoalContract,AgendaItemContract,CCTaskContract,MemoryEntryContract - Exported at
@stackbilt/aegis-core/contracts/{goal,agenda-item,cc-task,memory-entry} - Contracts use camelCase (ODD convention); existing snake_case D1 interfaces untouched
@stackbilt/contractsandzodadded as dependencies
schema-enumsis now a public export (@stackbilt/aegis-core/schema-enums)- Generic
ScheduledTaskPlugin<TEnv>— consuming apps with extendedEdgeEnvsuperset no longer need a cast wrapper;scheduledTasksacceptsScheduledTaskPlugin<any>[] - Upstreamed generic enums from daemon:
JOB_STATUSES,TERMINAL_JOB_STATUSES,SPRINT_STAGES,RISK_LEVELS,ALERT_SEVERITIES
Initial public release.