Refactor/decouple main session#71
Merged
Merged
Conversation
- Delete MainStorage interface; SessionStorage now carries listSessions. - Remove TopologyNode from session package (lives in core). - Drop getAllSessionL2s / putNode / getChildren / removeNode / getGlobal / putGlobal. - InMemoryStorageAdapter now implements SessionStorage only. - Update CreateMainSessionOptions / LoadMainSessionOptions to use SessionStorage. - Stub createMainSession.integrate() child collection; file is deleted in Task 3. - Skip MainSession integrate() / synthesis-from-integrate tests; will be removed in Task 3.
…add createSession
* docs: add shared memory design spec * docs: clarify shared memory release plan — bundle into unpublished release * docs: add shared memory implementation plan * feat(core): define SharedMemoryStore interface and SharedMemoryEntry type * feat(core): add InMemorySharedMemoryStore with writeLock serialization * feat(core): add renderSharedMemoryIndex * feat(core): expose sharedMemory config and four SDK methods on StelloAgent * style(core): match requireStorage Chinese error pattern and add semicolons in shared memory SDK * feat(core): add stello_memory_recall builtin tool * feat(core): add stello_memory_remember builtin tool * feat(core): add stello_memory_forget builtin tool * feat(session): add sharedMemoryIndex slot in context assembly * feat(core): inject sharedMemoryIndex on every session.send via adapter * refactor(core): drop legacy MemoryEngine and FileSystemMemoryEngine 删除 MemoryEngine 接口、FileSystemMemoryEngine 实现及其测试目录。 从 StelloAgentConfig、StelloEngineOptions、DefaultEngineFactoryOptions、 StelloEngine 接口、index.ts 公开导出中移除所有 memory 字段和相关类型引用。 保留 TurnRecord / AssembledContext(仍被 EngineLifecycleAdapter 和 BootstrapResult 使用)。 * feat(core): export SharedMemoryStore types, InMemorySharedMemoryStore, and three tool factories * test(core): add end-to-end test for shared memory index injection * docs(core): refresh agent-creation skill for shared memory and document resolver caveat * feat(core): re-export TurnRecord and AssembledContext for downstream lifecycle implementers
* feat(session): add optional compression cache persistence to SessionStorage * refactor(session): address review — add clear method, Chinese JSDoc, type-level tests * feat(session): add hydrate/flush helpers for compression cache persistence * refactor(session): address review — fire-and-forget flush + warn on cache errors * feat(session): hydrate compression cache from storage at session startup * refactor(session): document hydrate race edge case; improve hydration test stub * feat(session): flush compression cache to storage after compress * refactor(session): extract compression flush helper; skip redundant cache-hit writes * test(session): end-to-end hydrate/flush cycle for compression cache * refactor(session): address review — move e2e test, strengthen hydrate assertion - Move 'flushed snapshot from one session is hydrated by the next' out of 'compress persistence — flush after success' into a new sibling describe block 'end-to-end: flush ↔ hydrate cycle', with its own warn-spy guard. The test exercises the full hydrate+flush round-trip across two session instances and is the only test touching hydrateCompressionCache from this side; co-locating it with flush-only tests was misleading. - Strengthen the bonus assertion from a 'sessionB.send resolves' smoke check to a meaningful claim about hydrate consumption: compressFnB is now a vi.fn() spy and we assert at most one call. The stricter 'compressFnB NOT called' assertion is not achievable in this end-to-end setup because cache-hit keys on compressedCount === compressCount, and the recentBudget computation uses ESTIMATED_SUMMARY_TOKENS (500) when compressionCache is null (Session A's first send) vs. the actual hydrated summary length (Session B after hydrate) — yielding different compressedCount values and thus a forced cache miss on Session B's first send. This is an inherent property of the current cache key, not a wiring bug. Inline comment explains the trade-off. * test(session): drop non-discriminating compress call assertion from e2e * refactor(session): drop unused clearCompressionCache optional method * test(session): replace any with SessionStorage typings to satisfy lint 测试中 16 处 `any` 改为 `SessionStorage` / `CompressionCacheSnapshot`,并删除未使用的 sessionB 变量。无运行时行为变化。
* feat(core): add renderTopologyMarkdown with you-are-here marker * feat(session): add topologyContext to SessionSendOptions and assembleSessionContext * fix(session): also inject topologyContext in tool-result replay path * feat(core): add topologyContextProvider to session adapter * feat(core): topologyContextDecorator and default topology provider in StelloAgent * feat(core): add label option to DefaultFnOptions for compress/consolidate
stepFun/DeepSeek 等推理模型在 tool call 场景的多轮对话中, 要求历史 assistant 消息必须包含原始的 reasoning_content, 否则 API 返回 400。 - Message/LLMResult/LLMChunk 增加 reasoningContent 字段 - OpenAI-compatible adapter 提取和回传 reasoning_content - Session 层持久化 reasoningContent 到 assistant 记录 - 新增 3 个 adapter 测试覆盖 round-trip Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…trip feat(session): 支持推理模型 reasoning_content 多轮对话回传
feat(session): attach turn metadata
…ontent-parts feat: support multimodal content parts
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.
What
How
Closes #