fix(flow): 发布 backthink 会话的 graph_update——后台思考页链路导图不再是'等待事件'
FlowPublisher allow 谓词只允许 web/web:*,sess-backthink 被排除→backthink 的 输入→思考→输出图从不发布,后台思考页'查看链路导图'恒为'等待 graph_update 事件'。 - backthink.go: 导出 DefaultSessionID="sess-backthink" - wire.go: 谓词追加 sessionID==backthink.DefaultSessionID(web + backthink 都发;sess-xxx 隔离仍过滤) go build/vet/test 全绿; 已重建部署. 下次 backthink(5min心跳)运行时即发布该会话图.
This commit is contained in:
1 parent
9f35b2663e
commit
64efb569c3
2 files changed
+11
-1
No files matched your search
+6
-1
@@ -323,7 +323,12 @@ func (a *app) wireRuntime() error {
|
||||
flowPub := loop.NewFlowPublisher(
|
||||
func(subject string, payload any) { _ = a.bus.Publish(context.Background(), subject, payload) },
|
||||
func(sessionID string) bool {
|
||||
return sessionID == history.MainSessionID || strings.HasPrefix(sessionID, history.MainSessionID+":")
|
||||
// Publish the web/main flow graph (web chat + IM owner-private mirror) AND the
|
||||
// autonomous-backthink session, so the backthink page's flow link graph renders
|
||||
// too (design/20 §2). Other isolated channel sessions (sess-xxx) stay filtered.
|
||||
return sessionID == history.MainSessionID ||
|
||||
strings.HasPrefix(sessionID, history.MainSessionID+":") ||
|
||||
sessionID == backthink.DefaultSessionID
|
||||
},
|
||||
)
|
||||
checkpoint, perr := persist.New(context.Background(), a.db, a.log)
|
||||
|
||||
@@ -64,6 +64,11 @@ const (
|
||||
defaultSessionID = "sess-backthink"
|
||||
)
|
||||
|
||||
// DefaultSessionID is the exported loop.Run session key for an autonomous think. It is
|
||||
// exposed so the flow-viz publisher (cmd/cyrene) can also publish the backthink flow
|
||||
// graph, which the backthink page and the web-chat flow page both render.
|
||||
const DefaultSessionID = "sess-backthink"
|
||||
|
||||
// Sentinel errors returned by this package. Use errors.Is to test for them; they
|
||||
// are returned directly or wrapped with %w so the underlying cause stays intact.
|
||||
var (
|
||||
|
||||
Reference in new issue
Block a user