Merge lane-go: keep the lane's reviewed work
Combines lane-go's typed omni search, launch-time model overrides, TUI artifacts view, run-state websocket push, and the "reflect the change where it belongs" committer rule with the Templates gallery, chat/omni-search and other reviewed work already on main. The 12 files both sides touched keep both intents composed rather than dropping either side: the omni search keeps the typed search contract (CLI `pipelines search` and the TUI popup with type badges and marked snippets) alongside the run-list quick filter; cli.md and ui-ux-review.md document both the search rework and the artifacts view; orchestration.md, harnesses.md and operations.md keep the model-override and reflect-where-it-belongs guidance; and the protocol/CLI/server/TUI code keeps the new search, run-event, override and artifacts paths alongside the existing run, title and help surfaces. Checks before committing: - go build ./... -- pass - go vet ./... -- pass - go test -count=1 ./internal/... ./cmd/... -- all pass Doc check before committing: nothing needs updating. The lane's own docs and references (docs/cli.md, docs/ui-ux-review.md, and the orchestration, harnesses and operations skill references) already carry the new features. format.md and the packaged templates already describe the line-oriented result format and the human decision stage from the earlier lane-go merge. The root README already describes the omni search popup. Model overrides, the search command, run events and the artifacts view are runtime/CLI/TUI surfaces that cli.md documents; no template, README or topic-doc edit is required by this merge.
This commit is contained in:
@@ -55,11 +55,15 @@ func HandlerWithOptions(ctx context.Context, options Options, stores ...*pipelin
|
||||
build := buildinfo.Current()
|
||||
started := time.Now()
|
||||
hub := newChatHub()
|
||||
events := newRunEventHub()
|
||||
mux := http.NewServeMux()
|
||||
var runs *runner
|
||||
var runErr error
|
||||
if len(stores) > 0 {
|
||||
runs, runErr = newRunner(ctx, stores[0])
|
||||
if runErr == nil {
|
||||
runs.events = events
|
||||
}
|
||||
if runErr == nil && options.ArtifactsRoot != "" {
|
||||
runs.artifactsRoot = options.ArtifactsRoot
|
||||
}
|
||||
@@ -131,6 +135,9 @@ func HandlerWithOptions(ctx context.Context, options Options, stores ...*pipelin
|
||||
// clientID is this connection's identity for chat session claims: a
|
||||
// second client is refused a session another connection holds.
|
||||
clientID := chatClientToken()
|
||||
// Drop every run subscription this connection holds when the read loop
|
||||
// returns, so no subscriber, goroutine or timer outlives the connection.
|
||||
defer events.unsubscribeClient(clientID)
|
||||
if len(stores) > 0 {
|
||||
items, err := stores[0].List(ctx)
|
||||
if err != nil {
|
||||
@@ -150,6 +157,9 @@ func HandlerWithOptions(ctx context.Context, options Options, stores ...*pipelin
|
||||
if handleChat(connCtx, request, options.Chat, hub, owned, clientID, write) {
|
||||
continue
|
||||
}
|
||||
if handleRunEvents(request, events, runs, clientID, write) {
|
||||
continue
|
||||
}
|
||||
response := protocol.Message{Type: protocol.Pong, ID: request.ID}
|
||||
if request.Type == protocol.List || request.Type == protocol.Submit {
|
||||
response.NotificationEndpoints = notificationEndpoints()
|
||||
|
||||
Reference in New Issue
Block a user