Add local JSON daemon and route TUI/CLI through it.

A per-DataDir background process owns ticket JSON, history, and sync so
multiple TUI instances stay consistent; MCP token APIs are ready for phase 2.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-01 16:32:13 +01:00
co-authored by Cursor
parent 98fcb57298
commit 2dbf0918de
23 changed files with 2107 additions and 93 deletions
+11 -1
View File
@@ -25,6 +25,8 @@ type KeyMap struct {
TimeEntries key.Binding // m — manage time entries
Report key.Binding // r — time report
Sync key.Binding // Y — pull YouTrack issues
MCPToken key.Binding // g — create MCP token for project
MCPTokenRevoke key.Binding // G — revoke MCP token
Undo key.Binding
Redo key.Binding
Quit key.Binding
@@ -121,6 +123,14 @@ func DefaultKeyMap() KeyMap {
key.WithKeys("Y"),
key.WithHelp("Y", "YouTrack pull/push"),
),
MCPToken: key.NewBinding(
key.WithKeys("g"),
key.WithHelp("g", "MCP token"),
),
MCPTokenRevoke: key.NewBinding(
key.WithKeys("G"),
key.WithHelp("G", "revoke MCP token"),
),
Undo: key.NewBinding(
key.WithKeys("u", "ctrl+z"),
key.WithHelp("u", "undo"),
@@ -154,7 +164,7 @@ func DefaultKeyMap() KeyMap {
// ShortHelp implements help.KeyMap.
func (k KeyMap) ShortHelp() []key.Binding {
return []key.Binding{k.Up, k.New, k.Search, k.Project, k.MoveTicket, k.Board, k.Status, k.Edit, k.Timer, k.TimeManual, k.TimeEntries, k.Report, k.Sync, k.Delete, k.DeleteForce, k.Undo, k.Redo, k.Quit}
return []key.Binding{k.Up, k.New, k.Search, k.Project, k.MoveTicket, k.Board, k.Status, k.Edit, k.Timer, k.TimeManual, k.TimeEntries, k.Report, k.Sync, k.MCPToken, k.MCPTokenRevoke, k.Delete, k.DeleteForce, k.Undo, k.Redo, k.Quit}
}
// FullHelp implements help.KeyMap.