You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Evolve the generated chat scaffolding so the base chat module exposes a stable chat_ask facade while optional modules can add run coordination and SQL-backed Effect chat persistence without forcing users to replace an earlier chat-server choice.
The core direction is to keep the simple client-facing ask contract stable, then layer richer runtime behavior underneath it. Each layer should add the minimal surface area needed for future expansion.
Design direction
chat_ask is the base facade: message history in, ChatStreamPart stream out.
ChatRuntime.ask is the server-side service boundary refined by optional modules.
Effect Chat should remain the underlying session/history abstraction; do not rebuild chat history persistence unless a future app-specific metadata model requires it.
chat-server remains the simple starting point.
chat-managed-runtime should refine chat-server with ephemeral run coordination, not persistent chat storage.
Managed runtime concerns are runId, event streams, interruption, short replay, and active run coordination where needed.
chat-react-client should keep using chat_ask and remain unaware of run IDs, interruption, or persistence.
chat-manager-react-client can opt into run-aware behavior later.
db-sqlite should be a reusable database foundation, independent of chat.
chat-persistence should hook Effect Chat.Persistence to SQL via Effect Persistence, with no chat metadata/list/get/delete model for now.
Should managed chat_start accept only message history initially, or include a generic owner key for active-run guarding?
How long should completed in-memory run streams be retained for reconnect/replay?
Can the current Catalog contribution model replace/refine a generated service layer cleanly, or do we need a new contribution type?
When a future caller needs persisted history, should it pass a stable persistence key through a separate method/RPC rather than expanding base chat_ask?
What to build
Evolve the generated chat scaffolding so the base chat module exposes a stable
chat_askfacade while optional modules can add run coordination and SQL-backed Effect chat persistence without forcing users to replace an earlierchat-serverchoice.The core direction is to keep the simple client-facing ask contract stable, then layer richer runtime behavior underneath it. Each layer should add the minimal surface area needed for future expansion.
Design direction
chat_askis the base facade: message history in,ChatStreamPartstream out.ChatRuntime.askis the server-side service boundary refined by optional modules.Chatshould remain the underlying session/history abstraction; do not rebuild chat history persistence unless a future app-specific metadata model requires it.chat-serverremains the simple starting point.chat-managed-runtimeshould refinechat-serverwith ephemeral run coordination, not persistent chat storage.runId, event streams, interruption, short replay, and active run coordination where needed.chat-react-clientshould keep usingchat_askand remain unaware of run IDs, interruption, or persistence.chat-manager-react-clientcan opt into run-aware behavior later.db-sqliteshould be a reusable database foundation, independent of chat.chat-persistenceshould hook EffectChat.Persistenceto SQL via Effect Persistence, with no chat metadata/list/get/delete model for now.Helpful context
.reference/effect-ai-chat-example.reference/effect-ai-chat-example/packages/domain/src/api/chat-rpc.ts.reference/effect-ai-chat-example/packages/server/src/api/chat/chat-run-manager.ts.reference/effect-ai-chat-example/packages/server/src/lib/workflow-run-coordinator.ts.reference/effect-ai-chat-example/packages/server/src/lib/ai-models.ts.reference/effect/packages/effect/src/unstable/ai/Chat.ts.reference/effect/packages/effect/src/unstable/persistence/Persistence.tspackages/catalog/src/registry/content/chat.tspackages/catalog/src/registry/content/ai.tspackages/catalog/src/registry/content/client-chat.tspackages/catalog/src/registry/modules/server.tspackages/catalog/src/registry/modules/client.tsChild issues
ChatStreamPartand rename chat facade tochat_askChatRuntime.askservice boundarychat-managed-runtimebehindchat_askdb-sqlitefoundation moduleDependency map
Deferred until a concrete product need exists
Open questions
chat_startaccept only message history initially, or include a generic owner key for active-run guarding?chat_ask?