ui

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 25 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ui 是 conduct 的可视化界面服务端:一个只绑 127.0.0.1 的本地 HTTP 服务,把 CLI 动词 镜像成人看的视图(工作流列表 / 编辑器 / 运行列表 / 运行详情)。关键不变量:UI 无独占能力—— 每个 /api/* 端点的能力面都不超出其 CLI 等价物(见 docs/specs/ui.md〈API 设计〉)。

启动运行不在进程内跑 orchestrator,而是 self-exec 自呼 `conduct workflow run`(见 launch.go), 使 pid 判活 / interrupted 语义与终端启动逐字节一致,且关掉 UI 不连累在跑的 run。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server 持有一次 conduct ui 会话的依赖。now 可注入以便测试;exePath 供 self-exec 发射器自呼; stderrDir 是会话私有临时目录,存子进程启动失败的 stderr 兜底(读后即弃,路径绝不进响应)。

func NewServer

func NewServer(st *store.Store, version string) (*Server, error)

NewServer 构造服务端:解析自身可执行文件路径(发射器要),建会话私有 stderr 临时目录, 并从内嵌资源切出 assets 子树。

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(port int, open bool) error

ListenAndServe 启动并驻留服务,直到进程被 Ctrl-C 终止。 启动前主动探测 store 可读性、绑定端口,任一失败返回 error(命令层据此 stderr 退 1,不做启动假成功)。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL