Documentation
¶
Overview ¶
Package web provides a lightweight HTTP server for the TaskYou kanban board.
Package web provides a lightweight HTTP API server for TaskYou. It exposes the same operations as the CLI over HTTP/JSON, allowing external frontends (like ty-web) to build on top.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoardColumn ¶
type BoardColumn struct {
Status string `json:"status"`
Label string `json:"label"`
Count int `json:"count"`
Tasks []BoardEntry `json:"tasks"`
}
BoardColumn is a single kanban column.
type BoardEntry ¶
type BoardEntry struct {
ID int64 `json:"id"`
Title string `json:"title"`
Project string `json:"project"`
Type string `json:"type"`
Pinned bool `json:"pinned"`
AgeHint string `json:"age_hint"`
PR *prStatusJSON `json:"pr,omitempty"`
}
BoardEntry is a single task card in the board.
type BoardSnapshot ¶
type BoardSnapshot struct {
Columns []BoardColumn `json:"columns"`
}
BoardSnapshot is the top-level board state returned by the API.
func BuildBoardSnapshot ¶
func BuildBoardSnapshot(tasks []*db.Task, limit int) BoardSnapshot
BuildBoardSnapshot groups tasks into kanban columns.
type CommandRunner ¶
type CommandRunner interface {
Run(name string, args ...string) error
Output(name string, args ...string) ([]byte, error)
}
CommandRunner abstracts command execution for testability.
type Config ¶
type Config struct {
Addr string // e.g. ":8080"
DB *db.DB
CmdRunner CommandRunner
Sessions SessionManager // optional; enables /api/executors and session bootstrap
}
Config holds web server configuration.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the HTTP API server.
type SessionManager ¶ added in v0.3.8
type SessionManager interface {
EnsureTaskWindow(ctx context.Context, task *db.Task, sessionID, handoffContext string) (string, bool, error)
AvailableExecutors() []string
AllExecutors() []string
}
SessionManager is the subset of executor functionality the API needs to bootstrap interactive sessions and report executor availability. Implemented by *executor.Executor; abstracted for testability.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package ui serves the embedded TaskYou web frontend — the same React app the desktop shell renders, so browser and desktop share one codebase.
|
Package ui serves the embedded TaskYou web frontend — the same React app the desktop shell renders, so browser and desktop share one codebase. |