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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
来源:dsh-compass 的实现经验 + 上游 master 代码对照。
一个观察
轨迹板块(ui-trajectory)是 dsh 投影哲学的完整体现:数据来自会话投影系统(
session.getSnapshot().views+ 壳的loadOlder()),插件只注册五类渲染定义和一个 snapshot builder,自己不持有任何数据。注入上下文文档(non-user 的
user/message,runtime 折成context节点)没有对等的投影出口。今天每个想要这块数据的插件都在自己过滤 durable log:compass 用插件自有的/dir/injected-docs路由做服务端过滤 + 客户端签名门控,实测在 18 万事件的会话上把每次激活约 120 MB 的历史页 JSON 降到 KB 级——能做,但这是每个插件各带一份投影代码的重复劳动。提议
为什么值得收进壳
现成参考
dsh-compass/src/directory-routes.ts(/dir/injected-docs,有界、只读、失败即关闭);dsh-compass/src/client/read-context.ts+docs-stream.ts(仅在文档集合真正变化时重投影);contextProvenance/contextForm)就是投影口径的现成基础。如果方向认可,可以先从最小的出口做起:把 compaction boundary + injected-docs 过滤读做成 runtime 客户端的一等 API,视图注册制作为第二步。
All reactions