on main help sign in
Merge remote-tracking branch 'origin/main' into crush-thinking
commit596128acdb6d78fe4d8e416467a86d4cc1beb114 authorKujtim Hoxha <kujtimii.h@gmail.com> dateWed 16 Jul 2025, 23:58 (1 year ago) parent270f0d22a32346
56 files changed+882−638
README.md+22 cmd/logs.go+89−79 cmd/root.go−20 go.mod+5−5 go.sum+10−10 internal/config/config.go+39−6 internal/llm/agent/agent.go+2−2 internal/llm/agent/mcp-tools.go+68−47 internal/llm/tools/bash.go+2−2 internal/tui/components/chat/messages/renderer.go+30−2 internal/tui/components/completions/completions.go+14−5 internal/tui/components/dialogs/permissions/permissions.go+29−12 internal/tui/page/chat/chat.go+13−9 internal/tui/tui.go+10 vendor/github.com/aymanbagabas/go-udiff/myers/diff.go−246 vendor/github.com/charmbracelet/bubbletea/v2/tea.go−2 vendor/github.com/charmbracelet/lipgloss/v2/canvas.go+45−14 vendor/github.com/charmbracelet/ultraviolet/README.md+2 vendor/github.com/charmbracelet/ultraviolet/input.go+28 vendor/github.com/charmbracelet/ultraviolet/terminal.go+48−41 vendor/github.com/charmbracelet/ultraviolet/terminal_reader.go+9−5 vendor/github.com/charmbracelet/ultraviolet/winch_unix.go+3−24 vendor/golang.org/x/sync/errgroup/errgroup.go+31−87 vendor/golang.org/x/sys/unix/zerrors_linux.go+20−5 vendor/golang.org/x/sys/unix/zerrors_linux_386.go+1 vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go+1 vendor/golang.org/x/sys/unix/zerrors_linux_arm.go+1 vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go+1 vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go+1 vendor/golang.org/x/sys/unix/zerrors_linux_mips.go+1 vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go+1 vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go+1 vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go+1 vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go+1 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go+1 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go+1 vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go+1 vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go+1 vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go+1 vendor/golang.org/x/sys/unix/ztypes_linux.go+101−7 vendor/golang.org/x/sys/unix/ztypes_linux_386.go+16 vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go+16 vendor/golang.org/x/sys/unix/ztypes_linux_arm.go+16 vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go+16 vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go+16 vendor/golang.org/x/sys/unix/ztypes_linux_mips.go+16 vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go+16 vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go+16 vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go+16 vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go+16 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go+16 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go+16 vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go+16 vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go+16 vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go+16 vendor/modules.txt+7−8
README.md+22
@@ -78,6 +78,28 @@ Crush can use LSPs for additional context to help inform its decisions, just lik
7878}
7979```
8080
81+### MCPs
82+
83+Crush can also use MCPs for additional context. Add LSPs to the config like so:
84+
85+```json
86+{
87+ "mcp": {
88+ "context7": {
89+ "url": "https://mcp.context7.com/mcp",
90+ "type": "http"
91+ },
92+ "github": {
93+ "type": "http",
94+ "url": "https://api.githubcopilot.com/mcp/",
95+ "headers": {
96+ "Authorization": "$(echo Bearer $GH_MCP_TOKEN)"
97+ }
98+ }
99+ }
100+}
101+```
102+
81103### OpenAI-Compatible APIs
82104
83105Crush supports all OpenAI-compatible APIs. Here's an example configuration for Deepseek, which uses an OpenAI-compatible API. Don't forget to set `DEEPSEEK_API_KEY` in your environment.
cmd/logs.go+89−79
@@ -1,14 +1,13 @@
11package cmd
22
33import (
4− "bufio"
4+ "context"
55 "encoding/json"
66 "fmt"
77 "io"
88 "os"
99 "path/filepath"
1010 "slices"
11− "strings"
1211 "time"
1312
1413 "github.com/charmbracelet/crush/internal/config"
@@ -17,6 +16,8 @@ import (
1716 "github.com/spf13/cobra"
1817)
1918
19+const defaultTailLines = 1000
20+
2021var logsCmd = &cobra.Command{
2122 Use: "logs",
2223 Short: "View crush logs",
@@ -38,7 +39,6 @@ var logsCmd = &cobra.Command{
3839 }
3940
4041 log.SetLevel(log.DebugLevel)
41− // Configure log to output to stdout instead of stderr
4242 log.SetOutput(os.Stdout)
4343
4444 cfg, err := config.Load(cwd, false)
@@ -53,104 +53,114 @@ var logsCmd = &cobra.Command{
5353 }
5454
5555 if follow {
56− // Follow mode - tail the file continuously
57− t, err := tail.TailFile(logsFile, tail.Config{Follow: true, ReOpen: true, Logger: tail.DiscardingLogger})
58− if err != nil {
59− return fmt.Errorf("failed to tail log file: %v", err)
60− }
61−
62− // Print the text of each received line
63− for line := range t.Lines {
64− printLogLine(line.Text)
65− }
66− } else if tailLines > 0 {
67− // Tail mode - show last N lines
68− lines, err := readLastNLines(logsFile, tailLines)
69− if err != nil {
70− return fmt.Errorf("failed to read last %d lines: %v", tailLines, err)
71− }
72− for _, line := range lines {
73− printLogLine(line)
74− }
75− } else {
76− // Oneshot mode - read the entire file once
77− file, err := os.Open(logsFile)
78− if err != nil {
79− return fmt.Errorf("failed to open log file: %v", err)
80− }
81− defer file.Close()
82−
83− reader := bufio.NewReader(file)
84− for {
85− line, err := reader.ReadString('\n')
86− if err != nil {
87− if err == io.EOF && line != "" {
88− // Handle last line without newline
89− printLogLine(line)
90− }
91− break
92− }
93− // Remove trailing newline
94− line = strings.TrimSuffix(line, "\n")
95− printLogLine(line)
96− }
56+ return followLogs(cmd.Context(), logsFile, tailLines)
9757 }
9858
99− return nil
59+ return showLogs(logsFile, tailLines)
10060 },
10161}
10262
10363func init() {
10464 logsCmd.Flags().BoolP("follow", "f", false, "Follow log output")
105− logsCmd.Flags().IntP("tail", "t", 0, "Show only the last N lines")
65+ logsCmd.Flags().IntP("tail", "t", defaultTailLines, "Show only the last N lines default: 1000 for performance")
10666 rootCmd.AddCommand(logsCmd)
10767}
10868
109−// readLastNLines reads the last N lines from a file using a simple circular buffer approach
110−func readLastNLines(filename string, n int) ([]string, error) {
111− file, err := os.Open(filename)
69+func followLogs(ctx context.Context, logsFile string, tailLines int) error {
70+ t, err := tail.TailFile(logsFile, tail.Config{
71+ Follow: false,
72+ ReOpen: false,
73+ Logger: tail.DiscardingLogger,
74+ })
11275 if err != nil {
113− return nil, err
76+ return fmt.Errorf("failed to tail log file: %v", err)
11477 }
115− defer file.Close()
11678
117− // Use a circular buffer to keep only the last N lines
118− lines := make([]string, n)
119− count := 0
120− index := 0
79+ var lines []string
80+ lineCount := 0
81+ for line := range t.Lines {
82+ if line.Err != nil {
83+ continue
84+ }
85+ lines = append(lines, line.Text)
86+ lineCount++
87+ if lineCount >= tailLines {
88+ if len(lines) > tailLines {
89+ lines = lines[len(lines)-tailLines:]
90+ }
91+ }
92+ }
93+ t.Stop()
94+
95+ for _, line := range lines {
96+ printLogLine(line)
97+ }
98+
99+ if len(lines) == tailLines {
100+ fmt.Fprintf(os.Stderr, "\nShowing last %d lines. Full logs available at: %s\n", tailLines, logsFile)
101+ fmt.Fprintf(os.Stderr, "Following new log entries...\n\n")
102+ }
103+
104+ t, err = tail.TailFile(logsFile, tail.Config{
105+ Follow: true,
106+ ReOpen: true,
107+ Logger: tail.DiscardingLogger,
108+ Location: &tail.SeekInfo{Offset: 0, Whence: io.SeekEnd},
109+ })
110+ if err != nil {
111+ return fmt.Errorf("failed to tail log file: %v", err)
112+ }
113+ defer t.Stop()
121114
122− reader := bufio.NewReader(file)
123115 for {
124− line, err := reader.ReadString('\n')
125− if err != nil {
126− if err == io.EOF && line != "" {
127− // Handle last line without newline
128− line = strings.TrimSuffix(line, "\n")
129− lines[index] = line
130− count++
131− index = (index + 1) % n
116+ select {
117+ case line := <-t.Lines:
118+ if line.Err != nil {
119+ continue
120+ }
121+ printLogLine(line.Text)
122+ case <-ctx.Done():
123+ return nil
124+ }
125+ }
126+}
127+
128+func showLogs(logsFile string, tailLines int) error {
129+ t, err := tail.TailFile(logsFile, tail.Config{
130+ Follow: false,
131+ ReOpen: false,
132+ Logger: tail.DiscardingLogger,
133+ MaxLineSize: 0,
134+ })
135+ if err != nil {
136+ return fmt.Errorf("failed to tail log file: %v", err)
137+ }
138+ defer t.Stop()
139+
140+ var lines []string
141+ lineCount := 0
142+ for line := range t.Lines {
143+ if line.Err != nil {
144+ continue
145+ }
146+ lines = append(lines, line.Text)
147+ lineCount++
148+ if lineCount >= tailLines {
149+ if len(lines) > tailLines {
150+ lines = lines[len(lines)-tailLines:]
132151 }
133− break
134152 }
135− // Remove trailing newline
136− line = strings.TrimSuffix(line, "\n")
137− lines[index] = line
138− count++
139− index = (index + 1) % n
140153 }
141154
142− // Extract the last N lines in correct order
143− if count <= n {
144− // We have fewer lines than requested, return them all
145− return lines[:count], nil
155+ for _, line := range lines {
156+ printLogLine(line)
146157 }
147158
148− // We have more lines than requested, extract from circular buffer
149− result := make([]string, n)
150− for i := range n {
151− result[i] = lines[(index+i)%n]
159+ if len(lines) == tailLines {
160+ fmt.Fprintf(os.Stderr, "\nShowing last %d lines. Full logs available at: %s\n", tailLines, logsFile)
152161 }
153− return result, nil
162+
163+ return nil
154164}
155165
156166func printLogLine(lineText string) {
cmd/root.go−20
@@ -6,14 +6,11 @@ import (
66 "io"
77 "log/slog"
88 "os"
9− "time"
109
1110 tea "github.com/charmbracelet/bubbletea/v2"
1211 "github.com/charmbracelet/crush/internal/app"
1312 "github.com/charmbracelet/crush/internal/config"
1413 "github.com/charmbracelet/crush/internal/db"
15− "github.com/charmbracelet/crush/internal/llm/agent"
16− "github.com/charmbracelet/crush/internal/log"
1714 "github.com/charmbracelet/crush/internal/tui"
1815 "github.com/charmbracelet/crush/internal/version"
1916 "github.com/charmbracelet/fang"
@@ -92,9 +89,6 @@ to assist developers in writing, debugging, and understanding code directly from
9289 }
9390 defer app.Shutdown()
9491
95− // Initialize MCP tools early for both modes
96− initMCPTools(ctx, app, cfg)
97−
9892 prompt, err = maybePrependStdin(prompt)
9993 if err != nil {
10094 slog.Error(fmt.Sprintf("Failed to read from stdin: %v", err))
@@ -126,20 +120,6 @@ to assist developers in writing, debugging, and understanding code directly from
126120 },
127121}
128122
129−func initMCPTools(ctx context.Context, app *app.App, cfg *config.Config) {
130− go func() {
131− defer log.RecoverPanic("MCP-goroutine", nil)
132−
133− // Create a context with timeout for the initial MCP tools fetch
134− ctxWithTimeout, cancel := context.WithTimeout(ctx, 30*time.Second)
135− defer cancel()
136−
137− // Set this up once with proper error handling
138− agent.GetMcpTools(ctxWithTimeout, app.Permissions, cfg)
139− slog.Info("MCP message handling goroutine exiting")
140− }()
141−}
142−
143123func Execute() {
144124 if err := fang.Execute(
145125 context.Background(),
go.mod+5−5
@@ -2,9 +2,9 @@ module github.com/charmbracelet/crush
22
33go 1.24.3
44
5−replace github.com/charmbracelet/bubbletea/v2 => github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250710185017-3c0ffd25e595
5+replace github.com/charmbracelet/bubbletea/v2 => github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250716142813-5d1379f56ba2
66
7−replace github.com/charmbracelet/lipgloss/v2 => github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250710185058-03664cb9cecb
7+replace github.com/charmbracelet/lipgloss/v2 => github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250716143013-48f34cb75679
88
99require (
1010 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0
@@ -75,7 +75,7 @@ require (
7575 github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
7676 github.com/aymerick/douceur v0.2.0 // indirect
7777 github.com/charmbracelet/colorprofile v0.3.1 // indirect
78− github.com/charmbracelet/ultraviolet v0.0.0-20250708152637-0fe0235c8db9 // indirect
78+ github.com/charmbracelet/ultraviolet v0.0.0-20250716141307-2fae2b322afb // indirect
7979 github.com/charmbracelet/x/cellbuf v0.0.14-0.20250516160309-24eee56f89fa // indirect
8080 github.com/charmbracelet/x/exp/slice v0.0.0-20250611152503-f53cdd7e01ef
8181 github.com/charmbracelet/x/term v0.2.1
@@ -133,8 +133,8 @@ require (
133133 golang.org/x/crypto v0.37.0 // indirect
134134 golang.org/x/image v0.26.0 // indirect
135135 golang.org/x/net v0.39.0 // indirect
136− golang.org/x/sync v0.15.0 // indirect
137− golang.org/x/sys v0.33.0 // indirect
136+ golang.org/x/sync v0.16.0 // indirect
137+ golang.org/x/sys v0.34.0 // indirect
138138 golang.org/x/term v0.31.0 // indirect
139139 golang.org/x/text v0.24.0 // indirect
140140 google.golang.org/genai v1.3.0
go.sum+10−10
@@ -70,20 +70,20 @@ github.com/charlievieth/fastwalk v1.0.11 h1:5sLT/q9+d9xMdpKExawLppqvXFZCVKf6JHnr
7070github.com/charlievieth/fastwalk v1.0.11/go.mod h1:yGy1zbxog41ZVMcKA/i8ojXLFsuayX5VvwhQVoj9PBI=
7171github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250710161907-a4c42b579198 h1:CkMS9Ah9ac1Ego5JDC5NJyZyAAqu23Z+O0yDwsa3IxM=
7272github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250710161907-a4c42b579198/go.mod h1:6HamsBKWqEC/FVHuQMHgQL+knPyvHH55HwJDHl/adMw=
73−github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250710185017-3c0ffd25e595 h1:wLMjzOqrwoM7Em9UR9sGbn4375G8WuxcwFB3kjZiqHo=
74−github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250710185017-3c0ffd25e595/go.mod h1:+Tl7rePElw6OKt382t04zXwtPFoPXxAaJzNrYmtsLds=
73+github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250716142813-5d1379f56ba2 h1:Gj/vSk7h96TxUU/GSuwbYkr9H0ze+ElAQjcl25wB0+U=
74+github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250716142813-5d1379f56ba2/go.mod h1:m240IQxo1/eDQ7klblSzOCAUyc3LddHcV3Rc/YEGAgw=
7575github.com/charmbracelet/colorprofile v0.3.1 h1:k8dTHMd7fgw4bnFd7jXTLZrSU/CQrKnL3m+AxCzDz40=
7676github.com/charmbracelet/colorprofile v0.3.1/go.mod h1:/GkGusxNs8VB/RSOh3fu0TJmQ4ICMMPApIIVn0KszZ0=
7777github.com/charmbracelet/fang v0.3.1-0.20250711140230-d5ebb8c1d674 h1:+Cz+VfxD5DO+JT1LlswXWhre0HYLj6l2HW8HVGfMuC0=
7878github.com/charmbracelet/fang v0.3.1-0.20250711140230-d5ebb8c1d674/go.mod h1:9gCUAHmVx5BwSafeyNr3GI0GgvlB1WYjL21SkPp1jyU=
7979github.com/charmbracelet/glamour/v2 v2.0.0-20250516160903-6f1e2c8f9ebe h1:i6ce4CcAlPpTj2ER69m1DBeLZ3RRcHnKExuwhKa3GfY=
8080github.com/charmbracelet/glamour/v2 v2.0.0-20250516160903-6f1e2c8f9ebe/go.mod h1:p3Q+aN4eQKeM5jhrmXPMgPrlKbmc59rWSnMsSA3udhk=
81−github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250710185058-03664cb9cecb h1:lswj7CYZVYbLn2OhYJsXOMRQQGdRIfyuSnh5FdVSMr0=
82−github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250710185058-03664cb9cecb/go.mod h1:wEc/TRrTAIDJYjVCg3+y8WeKaN+F88gpYfGbUuP6W3A=
81+github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250716143013-48f34cb75679 h1:z0og40Sck650PjX51SmiTP8Div2OSugiZJBPZyJInOg=
82+github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250716143013-48f34cb75679/go.mod h1:BXY7j7rZgAprFwzNcO698++5KTd6GKI6lU83Pr4o0r0=
8383github.com/charmbracelet/log/v2 v2.0.0-20250226163916-c379e29ff706 h1:WkwO6Ks3mSIGnGuSdKl9qDSyfbYK50z2wc2gGMggegE=
8484github.com/charmbracelet/log/v2 v2.0.0-20250226163916-c379e29ff706/go.mod h1:mjJGp00cxcfvD5xdCa+bso251Jt4owrQvuimJtVmEmM=
85−github.com/charmbracelet/ultraviolet v0.0.0-20250708152637-0fe0235c8db9 h1:+LLFCLxtb/sHegwY3zYdFAbaOgI/I9pv/pxdUlI1Q9s=
86−github.com/charmbracelet/ultraviolet v0.0.0-20250708152637-0fe0235c8db9/go.mod h1:/O+B00+dYG6lqRAWIaNxSvywnDrIH6dmLYQAsH0LRTg=
85+github.com/charmbracelet/ultraviolet v0.0.0-20250716141307-2fae2b322afb h1:fMyaSpuEyPP+uuTu98Wx2S/7OY52uhjF+kYfM5w7x+s=
86+github.com/charmbracelet/ultraviolet v0.0.0-20250716141307-2fae2b322afb/go.mod h1:XrrgNFfXLrFAyd9DUmrqVc3yQFVv8Uk+okj4PsNNzpc=
8787github.com/charmbracelet/x/ansi v0.9.3 h1:BXt5DHS/MKF+LjuK4huWrC6NCvHtexww7dMayh6GXd0=
8888github.com/charmbracelet/x/ansi v0.9.3/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE=
8989github.com/charmbracelet/x/cellbuf v0.0.14-0.20250516160309-24eee56f89fa h1:lphz0Z3rsiOtMYiz8axkT24i9yFiueDhJbzyNUADmME=
@@ -309,8 +309,8 @@ golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E=
309309golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
310310golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
311311golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
312−golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
313−golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
312+golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
313+golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
314314golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
315315golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
316316golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -325,8 +325,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
325325golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
326326golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
327327golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
328−golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
329−golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
328+golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
329+golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
330330golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
331331golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
332332golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
internal/config/config.go+39−6
@@ -6,8 +6,10 @@ import (
66 "slices"
77 "strings"
88
9+ "github.com/charmbracelet/crush/internal/env"
910 "github.com/charmbracelet/crush/internal/fur/provider"
1011 "github.com/tidwall/sjson"
12+ "golang.org/x/exp/slog"
1113)
1214
1315const (
@@ -90,12 +92,12 @@ const (
9092)
9193
9294type MCPConfig struct {
93− Command string `json:"command,omitempty" `
94− Env []string `json:"env,omitempty"`
95− Args []string `json:"args,omitempty"`
96− Type MCPType `json:"type"`
97− URL string `json:"url,omitempty"`
98− Disabled bool `json:"disabled,omitempty"`
95+ Command string `json:"command,omitempty" `
96+ Env map[string]string `json:"env,omitempty"`
97+ Args []string `json:"args,omitempty"`
98+ Type MCPType `json:"type"`
99+ URL string `json:"url,omitempty"`
100+ Disabled bool `json:"disabled,omitempty"`
99101
100102 // TODO: maybe make it possible to get the value from the env
101103 Headers map[string]string `json:"headers,omitempty"`
@@ -165,6 +167,37 @@ func (l LSPs) Sorted() []LSP {
165167 return sorted
166168}
167169
170+func (m MCPConfig) ResolvedEnv() []string {
171+ resolver := NewShellVariableResolver(env.New())
172+ for e, v := range m.Env {
173+ var err error
174+ m.Env[e], err = resolver.ResolveValue(v)
175+ if err != nil {
176+ slog.Error("error resolving environment variable", "error", err, "variable", e, "value", v)
177+ continue
178+ }
179+ }
180+
181+ env := make([]string, 0, len(m.Env))
182+ for k, v := range m.Env {
183+ env = append(env, fmt.Sprintf("%s=%s", k, v))
184+ }
185+ return env
186+}
187+
188+func (m MCPConfig) ResolvedHeaders() map[string]string {
189+ resolver := NewShellVariableResolver(env.New())
190+ for e, v := range m.Headers {
191+ var err error
192+ m.Headers[e], err = resolver.ResolveValue(v)
193+ if err != nil {
194+ slog.Error("error resolving header variable", "error", err, "variable", e, "value", v)
195+ continue
196+ }
197+ }
198+ return m.Headers
199+}
200+
168201type Agent struct {
169202 ID string `json:"id,omitempty"`
170203 Name string `json:"name,omitempty"`
internal/llm/agent/agent.go+2−2
@@ -94,7 +94,7 @@ func NewAgent(
9494) (Service, error) {
9595 ctx := context.Background()
9696 cfg := config.Get()
97− otherTools := GetMcpTools(ctx, permissions, cfg)
97+ otherTools := GetMCPTools(ctx, permissions, cfg)
9898 if len(lspClients) > 0 {
9999 otherTools = append(otherTools, tools.NewDiagnosticsTool(lspClients))
100100 }
@@ -859,7 +859,7 @@ func (a *agent) UpdateModel() error {
859859
860860 // Get current provider configuration
861861 currentProviderCfg := cfg.GetProviderForModel(a.agentCfg.Model)
862− if currentProviderCfg.ID == "" {
862+ if currentProviderCfg == nil || currentProviderCfg.ID == "" {
863863 return fmt.Errorf("provider for agent %s not found in config", a.agentCfg.Name)
864864 }
865865
internal/llm/agent/mcp-tools.go+68−47
@@ -5,6 +5,7 @@ import (
55 "encoding/json"
66 "fmt"
77 "log/slog"
8+ "sync"
89
910 "github.com/charmbracelet/crush/internal/config"
1011 "github.com/charmbracelet/crush/internal/llm/tools"
@@ -36,7 +37,7 @@ type MCPClient interface {
3637}
3738
3839func (b *mcpTool) Name() string {
39− return fmt.Sprintf("%s_%s", b.mcpName, b.tool.Name)
40+ return fmt.Sprintf("mcp_%s_%s", b.mcpName, b.tool.Name)
4041}
4142
4243func (b *mcpTool) Info() tools.ToolInfo {
@@ -45,7 +46,7 @@ func (b *mcpTool) Info() tools.ToolInfo {
4546 required = make([]string, 0)
4647 }
4748 return tools.ToolInfo{
48− Name: fmt.Sprintf("%s_%s", b.mcpName, b.tool.Name),
49+ Name: fmt.Sprintf("mcp_%s_%s", b.mcpName, b.tool.Name),
4950 Description: b.tool.Description,
5051 Parameters: b.tool.InputSchema.Properties,
5152 Required: required,
@@ -107,14 +108,14 @@ func (b *mcpTool) Run(ctx context.Context, params tools.ToolCall) (tools.ToolRes
107108 },
108109 )
109110 if !p {
110− return tools.NewTextErrorResponse("permission denied"), nil
111+ return tools.ToolResponse{}, permission.ErrorPermissionDenied
111112 }
112113
113114 switch b.mcpConfig.Type {
114115 case config.MCPStdio:
115116 c, err := client.NewStdioMCPClient(
116117 b.mcpConfig.Command,
117− b.mcpConfig.Env,
118+ b.mcpConfig.ResolvedEnv(),
118119 b.mcpConfig.Args...,
119120 )
120121 if err != nil {
@@ -124,7 +125,7 @@ func (b *mcpTool) Run(ctx context.Context, params tools.ToolCall) (tools.ToolRes
124125 case config.MCPHttp:
125126 c, err := client.NewStreamableHttpClient(
126127 b.mcpConfig.URL,
127− transport.WithHTTPHeaders(b.mcpConfig.Headers),
128+ transport.WithHTTPHeaders(b.mcpConfig.ResolvedHeaders()),
128129 )
129130 if err != nil {
130131 return tools.NewTextErrorResponse(err.Error()), nil
@@ -133,7 +134,7 @@ func (b *mcpTool) Run(ctx context.Context, params tools.ToolCall) (tools.ToolRes
133134 case config.MCPSse:
134135 c, err := client.NewSSEMCPClient(
135136 b.mcpConfig.URL,
136− client.WithHeaders(b.mcpConfig.Headers),
137+ client.WithHeaders(b.mcpConfig.ResolvedHeaders()),
137138 )
138139 if err != nil {
139140 return tools.NewTextErrorResponse(err.Error()), nil
@@ -154,8 +155,6 @@ func NewMcpTool(name string, tool mcp.Tool, permissions permission.Service, mcpC
154155 }
155156}
156157
157−var mcpTools []tools.BaseTool
158−
159158func getTools(ctx context.Context, name string, m config.MCPConfig, permissions permission.Service, c MCPClient, workingDir string) []tools.BaseTool {
160159 var stdioTools []tools.BaseTool
161160 initRequest := mcp.InitializeRequest{}
@@ -183,50 +182,72 @@ func getTools(ctx context.Context, name string, m config.MCPConfig, permissions
183182 return stdioTools
184183}
185184
186−func GetMcpTools(ctx context.Context, permissions permission.Service, cfg *config.Config) []tools.BaseTool {
187− if len(mcpTools) > 0 {
188− return mcpTools
189− }
185+var (
186+ mcpToolsOnce sync.Once
187+ mcpTools []tools.BaseTool
188+)
189+
190+func GetMCPTools(ctx context.Context, permissions permission.Service, cfg *config.Config) []tools.BaseTool {
191+ mcpToolsOnce.Do(func() {
192+ mcpTools = doGetMCPTools(ctx, permissions, cfg)
193+ })
194+ return mcpTools
195+}
196+
197+func doGetMCPTools(ctx context.Context, permissions permission.Service, cfg *config.Config) []tools.BaseTool {
198+ var mu sync.Mutex
199+ var wg sync.WaitGroup
200+ var result []tools.BaseTool
190201 for name, m := range cfg.MCP {
191202 if m.Disabled {
192203 slog.Debug("skipping disabled mcp", "name", name)
193204 continue
194205 }
195− switch m.Type {
196− case config.MCPStdio:
197− c, err := client.NewStdioMCPClient(
198− m.Command,
199− m.Env,
200− m.Args...,
201− )
202− if err != nil {
203− slog.Error("error creating mcp client", "error", err)
204− continue
206+ wg.Add(1)
207+ go func(name string, m config.MCPConfig) {
208+ defer wg.Done()
209+ switch m.Type {
210+ case config.MCPStdio:
211+ c, err := client.NewStdioMCPClient(
212+ m.Command,
213+ m.ResolvedEnv(),
214+ m.Args...,
215+ )
216+ if err != nil {
217+ slog.Error("error creating mcp client", "error", err)
218+ return
219+ }
220+
221+ mu.Lock()
222+ result = append(result, getTools(ctx, name, m, permissions, c, cfg.WorkingDir())...)
223+ mu.Unlock()
224+ case config.MCPHttp:
225+ c, err := client.NewStreamableHttpClient(
226+ m.URL,
227+ transport.WithHTTPHeaders(m.ResolvedHeaders()),
228+ )
229+ if err != nil {
230+ slog.Error("error creating mcp client", "error", err)
231+ return
232+ }
233+ mu.Lock()
234+ result = append(result, getTools(ctx, name, m, permissions, c, cfg.WorkingDir())...)
235+ mu.Unlock()
236+ case config.MCPSse:
237+ c, err := client.NewSSEMCPClient(
238+ m.URL,
239+ client.WithHeaders(m.ResolvedHeaders()),
240+ )
241+ if err != nil {
242+ slog.Error("error creating mcp client", "error", err)
243+ return
244+ }
245+ mu.Lock()
246+ result = append(result, getTools(ctx, name, m, permissions, c, cfg.WorkingDir())...)
247+ mu.Unlock()
205248 }
206−
207− mcpTools = append(mcpTools, getTools(ctx, name, m, permissions, c, cfg.WorkingDir())...)
208− case config.MCPHttp:
209− c, err := client.NewStreamableHttpClient(
210− m.URL,
211− transport.WithHTTPHeaders(m.Headers),
212− )
213− if err != nil {
214− slog.Error("error creating mcp client", "error", err)
215− continue
216− }
217− mcpTools = append(mcpTools, getTools(ctx, name, m, permissions, c, cfg.WorkingDir())...)
218− case config.MCPSse:
219− c, err := client.NewSSEMCPClient(
220− m.URL,
221− client.WithHeaders(m.Headers),
222− )
223− if err != nil {
224− slog.Error("error creating mcp client", "error", err)
225− continue
226− }
227− mcpTools = append(mcpTools, getTools(ctx, name, m, permissions, c, cfg.WorkingDir())...)
228− }
249+ }(name, m)
229250 }
230−
231− return mcpTools
251+ wg.Wait()
252+ return result
232253}
internal/llm/tools/bash.go+2−2
@@ -188,7 +188,7 @@ When the user asks you to create a new git commit, follow these steps carefully:
188188
1891894. Create the commit with a message ending with:
190190💘 Generated with Crush
191−Co-Authored-By: Crush <noreply@crush.charm.land>
191+Co-Authored-By: Crush <crush@charm.land>
192192
193193- In order to ensure good formatting, ALWAYS pass the commit message via a HEREDOC, a la this example:
194194<example>
@@ -196,7 +196,7 @@ git commit -m "$(cat <<'EOF'
196196 Commit message here.
197197
198198 💘 Generated with Crush
199− Co-Authored-By: 💘 Crush <noreply@crush.charm.land>
199+ Co-Authored-By: 💘 Crush <crush@charm.land>
200200 EOF
201201 )"
202202</example>
internal/tui/components/chat/messages/renderer.go+30−2
@@ -655,6 +655,7 @@ func joinHeaderBody(header, body string) string {
655655
656656func renderPlainContent(v *toolCallCmp, content string) string {
657657 t := styles.CurrentTheme()
658+ content = strings.ReplaceAll(content, "\r\n", "\n") // Normalize line endings
658659 content = strings.TrimSpace(content)
659660 lines := strings.Split(content, "\n")
660661
@@ -664,6 +665,7 @@ func renderPlainContent(v *toolCallCmp, content string) string {
664665 if i >= responseContextHeight {
665666 break
666667 }
668+ ln = escapeContent(ln)
667669 ln = " " + ln // left padding
668670 if len(ln) > width {
669671 ln = v.fit(ln, width)
@@ -680,6 +682,7 @@ func renderPlainContent(v *toolCallCmp, content string) string {
680682 Width(width).
681683 Render(fmt.Sprintf("… (%d lines)", len(lines)-responseContextHeight)))
682684 }
685+
683686 return strings.Join(out, "\n")
684687}
685688
@@ -694,10 +697,17 @@ func pad(v any, width int) string {
694697
695698func renderCodeContent(v *toolCallCmp, path, content string, offset int) string {
696699 t := styles.CurrentTheme()
700+ content = strings.ReplaceAll(content, "\r\n", "\n") // Normalize line endings
701+ content = strings.ReplaceAll(content, "\t", " ") // Replace tabs with spaces
697702 truncated := truncateHeight(content, responseContextHeight)
698703
699− highlighted, _ := highlight.SyntaxHighlight(truncated, path, t.BgBase)
700− lines := strings.Split(highlighted, "\n")
704+ lines := strings.Split(truncated, "\n")
705+ for i, ln := range lines {
706+ lines[i] = escapeContent(ln)
707+ }
708+
709+ highlighted, _ := highlight.SyntaxHighlight(strings.Join(lines, "\n"), path, t.BgBase)
710+ lines = strings.Split(highlighted, "\n")
701711
702712 if len(strings.Split(content, "\n")) > responseContextHeight {
703713 lines = append(lines, t.S().Muted.
@@ -721,6 +731,7 @@ func renderCodeContent(v *toolCallCmp, path, content string, offset int) string
721731 PaddingLeft(1).
722732 Render(v.fit(ln, w-1)))
723733 }
734+
724735 return lipgloss.JoinVertical(lipgloss.Left, lines...)
725736}
726737
@@ -766,3 +777,20 @@ func prettifyToolName(name string) string {
766777 return name
767778 }
768779}
780+
781+// escapeContent replaces control characters with their Unicode Control Picture
782+// representations to ensure they are displayed correctly in the UI.
783+func escapeContent(content string) string {
784+ var sb strings.Builder
785+ for _, r := range content {
786+ switch {
787+ case r >= 0 && r <= 0x1f: // Control characters 0x00-0x1F
788+ sb.WriteRune('\u2400' + r)
789+ case r == ansi.DEL:
790+ sb.WriteRune('\u2421')
791+ default:
792+ sb.WriteRune(r)
793+ }
794+ }
795+ return sb.String()
796+}
internal/tui/components/completions/completions.go+14−5
@@ -40,6 +40,8 @@ type Completions interface {
4040 Query() string // Returns the current filter query
4141 KeyMap() KeyMap
4242 Position() (int, int) // Returns the X and Y position of the completions popup
43+ Width() int
44+ Height() int
4345}
4446
4547type completionsCmp struct {
@@ -54,6 +56,8 @@ type completionsCmp struct {
5456 query string // The current filter query
5557}
5658
59+const maxCompletionsWidth = 80 // Maximum width for the completions popup
60+
5761func New() Completions {
5862 completionsKeyMap := DefaultKeyMap()
5963 keyMap := list.DefaultKeyMap()
@@ -92,7 +96,7 @@ func (c *completionsCmp) Init() tea.Cmd {
9296func (c *completionsCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
9397 switch msg := msg.(type) {
9498 case tea.WindowSizeMsg:
95− c.width = min(msg.Width-c.x, 80)
99+ c.width = min(msg.Width-c.x, maxCompletionsWidth)
96100 c.height = min(msg.Height-c.y, 15)
97101 return c, nil
98102 case tea.KeyPressMsg:
@@ -118,10 +122,7 @@ func (c *completionsCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
118122 Value: selectedItem,
119123 })
120124 case key.Matches(msg, c.keyMap.Cancel):
121− if c.open {
122− c.open = false
123− return c, util.CmdHandler(CompletionsClosedMsg{})
124− }
125+ return c, util.CmdHandler(CloseCompletionsMsg{})
125126 }
126127 case CloseCompletionsMsg:
127128 c.open = false
@@ -197,3 +198,11 @@ func (c *completionsCmp) KeyMap() KeyMap {
197198func (c *completionsCmp) Position() (int, int) {
198199 return c.x, c.y - c.height
199200}
201+
202+func (c *completionsCmp) Width() int {
203+ return c.width
204+}
205+
206+func (c *completionsCmp) Height() int {
207+ return c.height
208+}
internal/tui/components/dialogs/permissions/permissions.go+29−12
@@ -323,18 +323,14 @@ func (p *permissionDialogCmp) generateBashContent() string {
323323 content := pr.Command
324324 t := styles.CurrentTheme()
325325 content = strings.TrimSpace(content)
326− content = "\n" + content + "\n"
327326 lines := strings.Split(content, "\n")
328327
329328 width := p.width - 4
330329 var out []string
331330 for _, ln := range lines {
332− ln = " " + ln // left padding
333− if len(ln) > width {
334− ln = ansi.Truncate(ln, width, "…")
335− }
336331 out = append(out, t.S().Muted.
337332 Width(width).
333+ Padding(0, 3).
338334 Foreground(t.FgBase).
339335 Background(t.BgSubtle).
340336 Render(ln))
@@ -344,6 +340,7 @@ func (p *permissionDialogCmp) generateBashContent() string {
344340 renderedContent := strings.Join(out, "\n")
345341 finalContent := baseStyle.
346342 Width(p.contentViewPort.Width()).
343+ Padding(1, 0).
347344 Render(renderedContent)
348345
349346 return finalContent
@@ -413,13 +410,26 @@ func (p *permissionDialogCmp) generateDefaultContent() string {
413410
414411 content := p.permission.Description
415412
416− // Use the cache for markdown rendering
417− renderedContent := p.GetOrSetMarkdown(p.permission.ID, func() (string, error) {
418− r := styles.GetMarkdownRenderer(p.width - 4)
419− s, err := r.Render(content)
420− return s, err
421− })
413+ content = strings.TrimSpace(content)
414+ content = "\n" + content + "\n"
415+ lines := strings.Split(content, "\n")
416+
417+ width := p.width - 4
418+ var out []string
419+ for _, ln := range lines {
420+ ln = " " + ln // left padding
421+ if len(ln) > width {
422+ ln = ansi.Truncate(ln, width, "…")
423+ }
424+ out = append(out, t.S().Muted.
425+ Width(width).
426+ Foreground(t.FgBase).
427+ Background(t.BgSubtle).
428+ Render(ln))
429+ }
422430
431+ // Use the cache for markdown rendering
432+ renderedContent := strings.Join(out, "\n")
423433 finalContent := baseStyle.
424434 Width(p.contentViewPort.Width()).
425435 Render(renderedContent)
@@ -459,7 +469,11 @@ func (p *permissionDialogCmp) render() string {
459469 contentFinal := p.getOrGenerateContent()
460470
461471 // Always set viewport content (the caching is handled in getOrGenerateContent)
462− contentHeight := min(p.height-9, lipgloss.Height(contentFinal))
472+ const minContentHeight = 9
473+ contentHeight := min(
474+ max(minContentHeight, p.height-minContentHeight),
475+ lipgloss.Height(contentFinal),
476+ )
463477 p.contentViewPort.SetHeight(contentHeight)
464478 p.contentViewPort.SetContent(contentFinal)
465479
@@ -529,6 +543,9 @@ func (p *permissionDialogCmp) SetSize() tea.Cmd {
529543 // Default to diff split mode when dialog is wide enough.
530544 p.defaultDiffSplitMode = p.width >= 140
531545
546+ // Set a maximum width for the dialog
547+ p.width = min(p.width, 180)
548+
532549 // Mark content as dirty if size changed
533550 if oldWidth != p.width || oldHeight != p.height {
534551 p.contentDirty = true
internal/tui/page/chat/chat.go+13−9
@@ -275,7 +275,7 @@ func (p *chatPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
275275 return p, p.cancel()
276276 }
277277 case key.Matches(msg, p.keyMap.Details):
278− p.showDetails()
278+ p.toggleDetails()
279279 return p, nil
280280 }
281281
@@ -382,7 +382,7 @@ func (p *chatPage) View() string {
382382 Width(p.detailsWidth).
383383 Border(lipgloss.RoundedBorder()).
384384 BorderForeground(t.BorderFocus)
385− version := t.S().Subtle.Width(p.detailsWidth - 2).AlignHorizontal(lipgloss.Right).Render(version.Version)
385+ version := t.S().Base.Foreground(t.Border).Width(p.detailsWidth - 4).AlignHorizontal(lipgloss.Right).Render(version.Version)
386386 details := style.Render(
387387 lipgloss.JoinVertical(
388388 lipgloss.Left,
@@ -446,12 +446,9 @@ func (p *chatPage) setCompactMode(compact bool) {
446446 }
447447 p.compact = compact
448448 if compact {
449− p.compact = true
450449 p.sidebar.SetCompactMode(true)
451450 } else {
452− p.compact = false
453− p.showingDetails = false
454− p.sidebar.SetCompactMode(false)
451+ p.setShowDetails(false)
455452 }
456453}
457454
@@ -558,12 +555,19 @@ func (p *chatPage) cancel() tea.Cmd {
558555 return cancelTimerCmd()
559556}
560557
561−func (p *chatPage) showDetails() {
558+func (p *chatPage) setShowDetails(show bool) {
559+ p.showingDetails = show
560+ p.header.SetDetailsOpen(p.showingDetails)
561+ if !p.compact {
562+ p.sidebar.SetCompactMode(false)
563+ }
564+}
565+
566+func (p *chatPage) toggleDetails() {
562567 if p.session.ID == "" || !p.compact {
563568 return
564569 }
565− p.showingDetails = !p.showingDetails
566− p.header.SetDetailsOpen(p.showingDetails)
570+ p.setShowDetails(!p.showingDetails)
567571}
568572
569573func (p *chatPage) sendMessage(text string, attachments []message.Attachment) tea.Cmd {
internal/tui/tui.go+10
@@ -116,6 +116,16 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
116116 case completions.OpenCompletionsMsg, completions.FilterCompletionsMsg, completions.CloseCompletionsMsg:
117117 u, completionCmd := a.completions.Update(msg)
118118 a.completions = u.(completions.Completions)
119+ switch msg := msg.(type) {
120+ case completions.OpenCompletionsMsg:
121+ x, _ := a.completions.Position()
122+ if a.completions.Width()+x >= a.wWidth {
123+ // Adjust X position to fit in the window.
124+ msg.X = a.wWidth - a.completions.Width() - 1
125+ u, completionCmd = a.completions.Update(msg)
126+ a.completions = u.(completions.Completions)
127+ }
128+ }
119129 return a, completionCmd
120130
121131 // Dialog messages
vendor/github.com/aymanbagabas/go-udiff/myers/diff.godeleted−246
@@ -1,246 +0,0 @@
1−// Copyright 2019 The Go Authors. All rights reserved.
2−// Use of this source code is governed by a BSD-style
3−// license that can be found in the LICENSE file.
4−
5−// Package myers implements the Myers diff algorithm.
6−package myers
7−
8−import (
9− "strings"
10−
11− diff "github.com/aymanbagabas/go-udiff"
12−)
13−
14−// Sources:
15−// https://blog.jcoglan.com/2017/02/17/the-myers-diff-algorithm-part-3/
16−// https://www.codeproject.com/Articles/42279/%2FArticles%2F42279%2FInvestigating-Myers-diff-algorithm-Part-1-of-2
17−
18−// ComputeEdits returns the diffs of two strings using a simple
19−// line-based implementation, like [diff.Strings].
20−//
21−// Deprecated: this implementation is moribund. However, when diffs
22−// appear in marker test expectations, they are the particular diffs
23−// produced by this implementation. The marker test framework
24−// asserts diff(orig, got)==wantDiff, but ideally it would compute
25−// got==apply(orig, wantDiff) so that the notation of the diff
26−// is immaterial.
27−func ComputeEdits(before, after string) []diff.Edit {
28− beforeLines := splitLines(before)
29− ops := operations(beforeLines, splitLines(after))
30−
31− // Build a table mapping line number to offset.
32− lineOffsets := make([]int, 0, len(beforeLines)+1)
33− total := 0
34− for i := range beforeLines {
35− lineOffsets = append(lineOffsets, total)
36− total += len(beforeLines[i])
37− }
38− lineOffsets = append(lineOffsets, total) // EOF
39−
40− edits := make([]diff.Edit, 0, len(ops))
41− for _, op := range ops {
42− start, end := lineOffsets[op.I1], lineOffsets[op.I2]
43− switch op.Kind {
44− case opDelete:
45− // Delete: before[I1:I2] is deleted.
46− edits = append(edits, diff.Edit{Start: start, End: end})
47− case opInsert:
48− // Insert: after[J1:J2] is inserted at before[I1:I1].
49− if content := strings.Join(op.Content, ""); content != "" {
50− edits = append(edits, diff.Edit{Start: start, End: end, New: content})
51− }
52− }
53− }
54− return edits
55−}
56−
57−// opKind is used to denote the type of operation a line represents.
58−type opKind int
59−
60−const (
61− opDelete opKind = iota // line deleted from input (-)
62− opInsert // line inserted into output (+)
63− opEqual // line present in input and output
64−)
65−
66−func (kind opKind) String() string {
67− switch kind {
68− case opDelete:
69− return "delete"
70− case opInsert:
71− return "insert"
72− case opEqual:
73− return "equal"
74− default:
75− panic("unknown opKind")
76− }
77−}
78−
79−type operation struct {
80− Kind opKind
81− Content []string // content from b
82− I1, I2 int // indices of the line in a
83− J1 int // indices of the line in b, J2 implied by len(Content)
84−}
85−
86−// operations returns the list of operations to convert a into b, consolidating
87−// operations for multiple lines and not including equal lines.
88−func operations(a, b []string) []*operation {
89− if len(a) == 0 && len(b) == 0 {
90− return nil
91− }
92−
93− trace, offset := shortestEditSequence(a, b)
94− snakes := backtrack(trace, len(a), len(b), offset)
95−
96− M, N := len(a), len(b)
97−
98− var i int
99− solution := make([]*operation, len(a)+len(b))
100−
101− add := func(op *operation, i2, j2 int) {
102− if op == nil {
103− return
104− }
105− op.I2 = i2
106− if op.Kind == opInsert {
107− op.Content = b[op.J1:j2]
108− }
109− solution[i] = op
110− i++
111− }
112− x, y := 0, 0
113− for _, snake := range snakes {
114− if len(snake) < 2 {
115− continue
116− }
117− var op *operation
118− // delete (horizontal)
119− for snake[0]-snake[1] > x-y {
120− if op == nil {
121− op = &operation{
122− Kind: opDelete,
123− I1: x,
124− J1: y,
125− }
126− }
127− x++
128− if x == M {
129− break
130− }
131− }
132− add(op, x, y)
133− op = nil
134− // insert (vertical)
135− for snake[0]-snake[1] < x-y {
136− if op == nil {
137− op = &operation{
138− Kind: opInsert,
139− I1: x,
140− J1: y,
141− }
142− }
143− y++
144− }
145− add(op, x, y)
146− op = nil
147− // equal (diagonal)
148− for x < snake[0] {
149− x++
150− y++
151− }
152− if x >= M && y >= N {
153− break
154− }
155− }
156− return solution[:i]
157−}
158−
159−// backtrack uses the trace for the edit sequence computation and returns the
160−// "snakes" that make up the solution. A "snake" is a single deletion or
161−// insertion followed by zero or diagonals.
162−func backtrack(trace [][]int, x, y, offset int) [][]int {
163− snakes := make([][]int, len(trace))
164− d := len(trace) - 1
165− for ; x > 0 && y > 0 && d > 0; d-- {
166− V := trace[d]
167− if len(V) == 0 {
168− continue
169− }
170− snakes[d] = []int{x, y}
171−
172− k := x - y
173−
174− var kPrev int
175− if k == -d || (k != d && V[k-1+offset] < V[k+1+offset]) {
176− kPrev = k + 1
177− } else {
178− kPrev = k - 1
179− }
180−
181− x = V[kPrev+offset]
182− y = x - kPrev
183− }
184− if x < 0 || y < 0 {
185− return snakes
186− }
187− snakes[d] = []int{x, y}
188− return snakes
189−}
190−
191−// shortestEditSequence returns the shortest edit sequence that converts a into b.
192−func shortestEditSequence(a, b []string) ([][]int, int) {
193− M, N := len(a), len(b)
194− V := make([]int, 2*(N+M)+1)
195− offset := N + M
196− trace := make([][]int, N+M+1)
197−
198− // Iterate through the maximum possible length of the SES (N+M).
199− for d := 0; d <= N+M; d++ {
200− copyV := make([]int, len(V))
201− // k lines are represented by the equation y = x - k. We move in
202− // increments of 2 because end points for even d are on even k lines.
203− for k := -d; k <= d; k += 2 {
204− // At each point, we either go down or to the right. We go down if
205− // k == -d, and we go to the right if k == d. We also prioritize
206− // the maximum x value, because we prefer deletions to insertions.
207− var x int
208− if k == -d || (k != d && V[k-1+offset] < V[k+1+offset]) {
209− x = V[k+1+offset] // down
210− } else {
211− x = V[k-1+offset] + 1 // right
212− }
213−
214− y := x - k
215−
216− // Diagonal moves while we have equal contents.
217− for x < M && y < N && a[x] == b[y] {
218− x++
219− y++
220− }
221−
222− V[k+offset] = x
223−
224− // Return if we've exceeded the maximum values.
225− if x == M && y == N {
226− // Makes sure to save the state of the array before returning.
227− copy(copyV, V)
228− trace[d] = copyV
229− return trace, offset
230− }
231− }
232−
233− // Save the state of the array.
234− copy(copyV, V)
235− trace[d] = copyV
236− }
237− return nil, 0
238−}
239−
240−func splitLines(text string) []string {
241− lines := strings.SplitAfter(text, "\n")
242− if lines[len(lines)-1] == "" {
243− lines = lines[:len(lines)-1]
244− }
245− return lines
246−}
vendor/github.com/charmbracelet/bubbletea/v2/tea.go−2
@@ -320,12 +320,10 @@ type Program struct {
320320
321321 // where to read inputs from, this will usually be os.Stdin.
322322 input io.Reader
323− mu sync.Mutex
324323 // ttyInput is null if input is not a TTY.
325324 ttyInput term.File
326325 previousTtyInputState *term.State
327326 inputReader *uv.TerminalReader
328− traceInput bool // true if input should be traced
329327 readLoopDone chan struct{}
330328 mouseMode bool // indicates whether we should enable mouse on Windows
331329
vendor/github.com/charmbracelet/lipgloss/v2/canvas.go+45−14
@@ -1,6 +1,7 @@
11package lipgloss
22
33import (
4+ "fmt"
45 "image"
56 "sort"
67
@@ -94,17 +95,14 @@ type Layer struct {
9495 zIndex int
9596 children []*Layer
9697 id string
97− content string
98+ content uv.Drawable
9899}
99100
100101// NewLayer creates a new Layer with the given content. It calculates the size
101102// based on the widest line and the number of lines in the content.
102−func NewLayer(content string) (l *Layer) {
103+func NewLayer(content any) (l *Layer) {
103104 l = new(Layer)
104− l.content = content
105− height := Height(content)
106− width := Width(content)
107− l.rect = image.Rect(0, 0, width, height)
105+ l.SetContent(content)
108106 return l
109107}
110108
@@ -216,23 +214,56 @@ func (l *Layer) AddLayers(layers ...*Layer) *Layer {
216214}
217215
218216// SetContent sets the content of the Layer.
219−func (l *Layer) SetContent(content string) *Layer {
220− l.content = content
217+func (l *Layer) SetContent(content any) *Layer {
218+ var drawable uv.Drawable
219+ var rect image.Rectangle
220+ switch c := content.(type) {
221+ case uv.Drawable:
222+ drawable = c
223+ switch c := c.(type) {
224+ case interface{ Bounds() image.Rectangle }:
225+ rect.Max.X = c.Bounds().Dx()
226+ rect.Max.Y = c.Bounds().Dy()
227+ case interface {
228+ Width() int
229+ Height() int
230+ }:
231+ rect.Max.X = c.Width()
232+ rect.Max.Y = c.Height()
233+ }
234+ case fmt.Stringer:
235+ s := c.String()
236+ drawable = uv.NewStyledString(s)
237+ rect = image.Rect(0, 0, Width(s), Height(s))
238+ case string:
239+ drawable = uv.NewStyledString(c)
240+ rect = image.Rect(0, 0, Width(c), Height(c))
241+ default:
242+ s := fmt.Sprint(content)
243+ drawable = uv.NewStyledString(s)
244+ rect = image.Rect(0, 0, Width(s), Height(s))
245+ }
246+ l.content = drawable
247+ l.rect = rect
221248 return l
222249}
223250
224251// Content returns the content of the Layer.
225−func (l *Layer) Content() string {
252+func (l *Layer) Content() any {
226253 return l.content
227254}
228255
229256// Draw draws the Layer onto the given screen buffer.
230−func (l *Layer) Draw(scr uv.Screen, _ image.Rectangle) {
231− ss := uv.NewStyledString(l.content)
232− ss.Draw(scr, l.Bounds())
257+func (l *Layer) Draw(scr uv.Screen, area image.Rectangle) {
258+ if l.content == nil {
259+ return
260+ }
261+ l.content.Draw(scr, area.Intersect(l.Bounds()))
233262 for _, child := range l.children {
234− ss := uv.NewStyledString(child.content)
235− ss.Draw(scr, child.Bounds())
263+ if child.content == nil {
264+ continue
265+ }
266+ child.content.Draw(scr, area.Intersect(child.Bounds()))
236267 }
237268}
238269
vendor/github.com/charmbracelet/ultraviolet/README.md+2
@@ -1,5 +1,7 @@
11# Ultraviolet
22
3+<img width="400" alt="Charm Ultraviolet" src="https://github.com/user-attachments/assets/3484e4b0-3741-4e8c-bebf-9ea51f5bb49c" />
4+
35<p>
46 <a href="https://github.com/charmbracelet/ultraviolet/releases"><img src="https://img.shields.io/github/release/charmbracelet/ultraviolet.svg" alt="Latest Release"></a>
57 <a href="https://pkg.go.dev/github.com/charmbracelet/ultraviolet?tab=doc"><img src="https://godoc.org/github.com/charmbracelet/ultraviolet?status.svg" alt="GoDoc"></a>
vendor/github.com/charmbracelet/ultraviolet/input.go+28
@@ -3,6 +3,7 @@ package uv
33import (
44 "context"
55
6+ "github.com/charmbracelet/x/term"
67 "golang.org/x/sync/errgroup"
78)
89
@@ -59,3 +60,30 @@ func (im *InputManager) ReceiveEvents(ctx context.Context, events chan<- Event)
5960 // Wait for all receivers to finish
6061 return errg.Wait()
6162}
63+
64+// InitialSizeReceiver query the initial size of the terminal window and sends
65+// it to the given event channel.
66+type InitialSizeReceiver struct {
67+ File term.File
68+}
69+
70+// ReceiveEvents queries the initial size of the terminal window and sends it
71+// to the given event channel. It stops when event is sent, the context is done
72+// or an error occurs.
73+func (r *InitialSizeReceiver) ReceiveEvents(ctx context.Context, events chan<- Event) error {
74+ if r.File == nil {
75+ return nil // No file set, nothing to do.
76+ }
77+
78+ w, h, err := term.GetSize(r.File.Fd())
79+ if err != nil {
80+ return err
81+ }
82+
83+ select {
84+ case <-ctx.Done():
85+ return ctx.Err()
86+ case events <- WindowSizeEvent{Width: w, Height: h}:
87+ return nil
88+ }
89+}
vendor/github.com/charmbracelet/ultraviolet/terminal.go+48−41
@@ -20,6 +20,8 @@ import (
2020 "github.com/muesli/cancelreader"
2121)
2222
23+const isWindows = "windows"
24+
2325var (
2426 // ErrNotTerminal is returned when one of the I/O streams is not a terminal.
2527 ErrNotTerminal = fmt.Errorf("not a terminal")
@@ -42,8 +44,7 @@ type Terminal struct {
4244 inTtyState *term.State
4345 outTty term.File
4446 outTtyState *term.State
45− winchTty term.File // The terminal to receive window size changes from.
46− started bool // Indicates if the terminal has been started.
47+ started bool // Indicates if the terminal has been started.
4748
4849 // Terminal type, screen and buffer.
4950 termtype string // The $TERM type.
@@ -123,7 +124,7 @@ func NewTerminal(in io.Reader, out io.Writer, env []string) *Terminal {
123124 // Handle debugging I/O.
124125 debug, ok := os.LookupEnv("UV_DEBUG")
125126 if ok && len(debug) > 0 {
126− f, err := os.OpenFile(debug, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0o666)
127+ f, err := os.OpenFile(debug, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0o600)
127128 if err != nil {
128129 panic("failed to open debug file: " + err.Error())
129130 }
@@ -346,7 +347,7 @@ func (t *Terminal) EnableMode(modes ...ansi.Mode) {
346347 for _, m := range modes {
347348 t.modes[m] = ansi.ModeSet
348349 }
349− t.scr.WriteString(ansi.SetMode(modes...)) //nolint:errcheck
350+ t.scr.WriteString(ansi.SetMode(modes...)) //nolint:errcheck,gosec
350351}
351352
352353// DisableMode disables the given modes on the terminal. This is typically
@@ -362,7 +363,7 @@ func (t *Terminal) DisableMode(modes ...ansi.Mode) {
362363 for _, m := range modes {
363364 t.modes[m] = ansi.ModeReset
364365 }
365− t.scr.WriteString(ansi.ResetMode(modes...)) //nolint:errcheck
366+ t.scr.WriteString(ansi.ResetMode(modes...)) //nolint:errcheck,gosec
366367}
367368
368369// RequestMode requests the current state of the given modes from the terminal.
@@ -372,7 +373,7 @@ func (t *Terminal) DisableMode(modes ...ansi.Mode) {
372373// Note that this won't take any effect until the next [Terminal.Display] or
373374// [Terminal.Flush] call.
374375func (t *Terminal) RequestMode(mode ansi.Mode) {
375− t.scr.WriteString(ansi.RequestMode(mode)) //nolint:errcheck
376+ t.scr.WriteString(ansi.RequestMode(mode)) //nolint:errcheck,gosec
376377}
377378
378379// MouseMode represents the mouse mode for the terminal. It is used to enable
@@ -399,7 +400,7 @@ func (t *Terminal) SetForegroundColor(c color.Color) {
399400 t.setFg = c
400401 col, ok := colorful.MakeColor(c)
401402 if ok {
402− t.scr.WriteString(ansi.SetForegroundColor(col.Hex())) //nolint:errcheck
403+ t.scr.WriteString(ansi.SetForegroundColor(col.Hex())) //nolint:errcheck,gosec
403404 }
404405}
405406
@@ -408,7 +409,7 @@ func (t *Terminal) SetForegroundColor(c color.Color) {
408409// Note that this won't take any effect until the next [Terminal.Display] or
409410// [Terminal.Flush] call.
410411func (t *Terminal) RequestForegroundColor() {
411− t.scr.WriteString(ansi.RequestForegroundColor) //nolint:errcheck
412+ t.scr.WriteString(ansi.RequestForegroundColor) //nolint:errcheck,gosec
412413}
413414
414415// ResetForegroundColor resets the terminal foreground color to the
@@ -418,7 +419,7 @@ func (t *Terminal) RequestForegroundColor() {
418419// [Terminal.Flush] call.
419420func (t *Terminal) ResetForegroundColor() {
420421 t.setFg = nil
421− t.scr.WriteString(ansi.ResetForegroundColor) //nolint:errcheck
422+ t.scr.WriteString(ansi.ResetForegroundColor) //nolint:errcheck,gosec
422423}
423424
424425// SetBackgroundColor sets the terminal default background color.
@@ -429,7 +430,7 @@ func (t *Terminal) SetBackgroundColor(c color.Color) {
429430 t.setBg = c
430431 col, ok := colorful.MakeColor(c)
431432 if ok {
432− t.scr.WriteString(ansi.SetBackgroundColor(col.Hex())) //nolint:errcheck
433+ t.scr.WriteString(ansi.SetBackgroundColor(col.Hex())) //nolint:errcheck,gosec
433434 }
434435}
435436
@@ -438,7 +439,7 @@ func (t *Terminal) SetBackgroundColor(c color.Color) {
438439// Note that this won't take any effect until the next [Terminal.Display] or
439440// [Terminal.Flush] call.
440441func (t *Terminal) RequestBackgroundColor() {
441− t.scr.WriteString(ansi.RequestBackgroundColor) //nolint:errcheck
442+ t.scr.WriteString(ansi.RequestBackgroundColor) //nolint:errcheck,gosec
442443}
443444
444445// ResetBackgroundColor resets the terminal background color to the
@@ -448,7 +449,7 @@ func (t *Terminal) RequestBackgroundColor() {
448449// [Terminal.Flush] call.
449450func (t *Terminal) ResetBackgroundColor() {
450451 t.setBg = nil
451− t.scr.WriteString(ansi.ResetBackgroundColor) //nolint:errcheck
452+ t.scr.WriteString(ansi.ResetBackgroundColor) //nolint:errcheck,gosec
452453}
453454
454455// SetCursorColor sets the terminal cursor color.
@@ -459,7 +460,7 @@ func (t *Terminal) SetCursorColor(c color.Color) {
459460 t.setCc = c
460461 col, ok := colorful.MakeColor(c)
461462 if ok {
462− t.scr.WriteString(ansi.SetCursorColor(col.Hex())) //nolint:errcheck
463+ t.scr.WriteString(ansi.SetCursorColor(col.Hex())) //nolint:errcheck,gosec
463464 }
464465}
465466
@@ -468,7 +469,7 @@ func (t *Terminal) SetCursorColor(c color.Color) {
468469// Note that this won't take any effect until the next [Terminal.Display] or
469470// [Terminal.Flush] call.
470471func (t *Terminal) RequestCursorColor() {
471− t.scr.WriteString(ansi.RequestCursorColor) //nolint:errcheck
472+ t.scr.WriteString(ansi.RequestCursorColor) //nolint:errcheck,gosec
472473}
473474
474475// ResetCursorColor resets the terminal cursor color to the
@@ -478,7 +479,7 @@ func (t *Terminal) RequestCursorColor() {
478479// [Terminal.Flush] call.
479480func (t *Terminal) ResetCursorColor() {
480481 t.setCc = nil
481− t.scr.WriteString(ansi.ResetCursorColor) //nolint:errcheck
482+ t.scr.WriteString(ansi.ResetCursorColor) //nolint:errcheck,gosec
482483}
483484
484485// SetCursorShape sets the terminal cursor shape and blinking style.
@@ -488,7 +489,7 @@ func (t *Terminal) ResetCursorColor() {
488489func (t *Terminal) SetCursorShape(shape CursorShape, blink bool) {
489490 style := shape.Encode(blink)
490491 t.curStyle = style
491− t.scr.WriteString(ansi.SetCursorStyle(style)) //nolint:errcheck
492+ t.scr.WriteString(ansi.SetCursorStyle(style)) //nolint:errcheck,gosec
492493}
493494
494495// EnableMouse enables mouse support on the terminal.
@@ -520,7 +521,7 @@ func (t *Terminal) EnableMouse(modes ...MouseMode) {
520521 mode = ButtonMouseMode | DragMouseMode | AllMouseMode
521522 }
522523 t.mouseMode = mode
523− if runtime.GOOS != "windows" {
524+ if runtime.GOOS != isWindows {
524525 modes := []ansi.Mode{}
525526 if t.mouseMode&AllMouseMode != 0 {
526527 modes = append(modes, ansi.AnyEventMouseMode)
@@ -532,7 +533,7 @@ func (t *Terminal) EnableMouse(modes ...MouseMode) {
532533 modes = append(modes, ansi.SgrExtMouseMode)
533534 t.EnableMode(modes...)
534535 }
535− t.enableWindowsMouse() //nolint:errcheck
536+ t.enableWindowsMouse() //nolint:errcheck,gosec
536537}
537538
538539// DisableMouse disables mouse support on the terminal. This will disable mouse
@@ -542,7 +543,7 @@ func (t *Terminal) EnableMouse(modes ...MouseMode) {
542543// [Terminal.Display] or [Terminal.Flush] call.
543544func (t *Terminal) DisableMouse() {
544545 t.mouseMode = 0
545− if runtime.GOOS != "windows" {
546+ if runtime.GOOS != isWindows {
546547 var modes []ansi.Mode
547548 if t.modes.Get(ansi.AnyEventMouseMode).IsSet() {
548549 modes = append(modes, ansi.AnyEventMouseMode)
@@ -558,7 +559,7 @@ func (t *Terminal) DisableMouse() {
558559 }
559560 t.DisableMode(modes...)
560561 }
561− t.disableWindowsMouse() //nolint:errcheck
562+ t.disableWindowsMouse() //nolint:errcheck,gosec
562563}
563564
564565// EnableBracketedPaste enables bracketed paste mode on the terminal. This is
@@ -608,9 +609,9 @@ func (t *Terminal) enterAltScreen(cursor bool) {
608609 t.scr.EnterAltScreen()
609610 if cursor && !altscreen {
610611 if t.scr.CursorHidden() {
611− t.scr.WriteString(ansi.HideCursor) //nolint:errcheck
612+ t.scr.WriteString(ansi.HideCursor) //nolint:errcheck,gosec
612613 } else {
613− t.scr.WriteString(ansi.ShowCursor) //nolint:errcheck
614+ t.scr.WriteString(ansi.ShowCursor) //nolint:errcheck,gosec
614615 }
615616 }
616617 t.scr.SetRelativeCursor(false)
@@ -639,9 +640,9 @@ func (t *Terminal) exitAltScreen(cursor bool) {
639640 t.scr.ExitAltScreen()
640641 if cursor && altscreen {
641642 if t.scr.CursorHidden() {
642− t.scr.WriteString(ansi.HideCursor) //nolint:errcheck
643+ t.scr.WriteString(ansi.HideCursor) //nolint:errcheck,gosec
643644 } else {
644− t.scr.WriteString(ansi.ShowCursor) //nolint:errcheck
645+ t.scr.WriteString(ansi.ShowCursor) //nolint:errcheck,gosec
645646 }
646647 }
647648 t.scr.SetRelativeCursor(true)
@@ -725,11 +726,6 @@ func (t *Terminal) Start() error {
725726 return ErrNotTerminal
726727 }
727728
728− t.winchTty = t.inTty
729− if t.winchTty == nil {
730− t.winchTty = t.outTty
731− }
732−
733729 // Get the initial terminal size.
734730 var err error
735731 t.size.Width, t.size.Height, err = t.GetSize()
@@ -749,11 +745,11 @@ func (t *Terminal) Start() error {
749745 t.configureRenderer()
750746
751747 if t.modes.Get(ansi.AltScreenSaveCursorMode).IsSet() {
752− t.enterAltScreen(false) //nolint:errcheck
748+ t.enterAltScreen(false)
753749 }
754750 if t.cursorHidden == t.modes.Get(ansi.TextCursorEnableMode).IsReset() {
755751 // We always hide the cursor when we start.
756− t.hideCursor() //nolint:errcheck
752+ t.hideCursor()
757753 }
758754 // Restore terminal modes.
759755 for m, s := range t.modes {
@@ -763,7 +759,7 @@ func (t *Terminal) Start() error {
763759 continue
764760 default:
765761 if s.IsSet() {
766− t.scr.WriteString(ansi.SetMode(m)) //nolint:errcheck
762+ t.scr.WriteString(ansi.SetMode(m)) //nolint:errcheck,gosec
767763 }
768764 }
769765 }
@@ -779,21 +775,32 @@ func (t *Terminal) Start() error {
779775 if c.colorp != nil && *c.colorp != nil {
780776 col, ok := colorful.MakeColor(*c.colorp)
781777 if ok {
782− t.scr.WriteString(c.setter(col.Hex())) //nolint:errcheck
778+ t.scr.WriteString(c.setter(col.Hex())) //nolint:errcheck,gosec
783779 }
784780 }
785781 }
786782 if t.curStyle > 1 {
787− t.scr.WriteString(ansi.SetCursorStyle(t.curStyle)) //nolint:errcheck
783+ t.scr.WriteString(ansi.SetCursorStyle(t.curStyle)) //nolint:errcheck,gosec
788784 }
789785
790786 if err := t.rd.Start(); err != nil {
791787 return fmt.Errorf("error starting terminal: %w", err)
792788 }
793789
794− recvs := []InputReceiver{t.rd}
795− if runtime.GOOS != "windows" {
796− t.wrdr = &WinChReceiver{t.winchTty}
790+ var winchTty term.File
791+ if runtime.GOOS == isWindows {
792+ // On Windows, we need to use the console output buffer to get the
793+ // window size.
794+ winchTty = t.outTty
795+ } else {
796+ winchTty = t.inTty
797+ if winchTty == nil {
798+ winchTty = t.outTty
799+ }
800+ }
801+ recvs := []InputReceiver{t.rd, &InitialSizeReceiver{winchTty}}
802+ if runtime.GOOS != isWindows {
803+ t.wrdr = &WinChReceiver{winchTty}
797804 if err := t.wrdr.Start(); err != nil {
798805 return fmt.Errorf("error starting window size receiver: %w", err)
799806 }
@@ -818,13 +825,13 @@ func (t *Terminal) Start() error {
818825func (t *Terminal) Restore() error {
819826 if t.inTtyState != nil {
820827 if err := term.Restore(t.inTty.Fd(), t.inTtyState); err != nil {
821− return err
828+ return fmt.Errorf("error restoring input terminal state: %w", err)
822829 }
823830 t.inTtyState = nil
824831 }
825832 if t.outTtyState != nil {
826833 if err := term.Restore(t.outTty.Fd(), t.outTtyState); err != nil {
827− return err
834+ return fmt.Errorf("error restoring output terminal state: %w", err)
828835 }
829836 t.outTtyState = nil
830837 }
@@ -835,10 +842,10 @@ func (t *Terminal) Restore() error {
835842 t.scr.MoveTo(0, t.buf.Height()-1)
836843 }
837844 if altscreen {
838− t.exitAltScreen(false) //nolint:errcheck
845+ t.exitAltScreen(false)
839846 }
840847 if cursorHidden {
841− t.showCursor() //nolint:errcheck
848+ t.showCursor()
842849 // Override the cursor hidden state so that we can auto hide it again
843850 // when the terminal resumes using [Terminal.Start].
844851 t.cursorHidden = false
vendor/github.com/charmbracelet/ultraviolet/terminal_reader.go+9−5
@@ -259,17 +259,22 @@ func (d *TerminalReader) run() {
259259 // - "\x1b^" (alt+^ key press)
260260 esc := n > 0 && n <= 2 && readBuf[0] == ansi.ESC
261261 if esc {
262− d.esc.Store(true)
263− d.timeout.Reset(d.EscTimeout)
262+ d.resetEsc()
264263 }
265264
266265 d.notify <- readBuf[:n]
267266 }
268267}
269268
269+func (d *TerminalReader) resetEsc() {
270+ // Reset the escape sequence state and timer.
271+ d.esc.Store(true)
272+ d.timeout.Reset(d.EscTimeout)
273+}
274+
270275func (d *TerminalReader) sendEvents(events chan<- Event) {
271276 // Lookup table first
272− if d.lookup && d.timedout.Load() && len(d.buf) > 0 && d.buf[0] == ansi.ESC {
277+ if d.lookup && d.timedout.Load() && len(d.buf) > 2 && d.buf[0] == ansi.ESC {
273278 if k, ok := d.table[string(d.buf)]; ok {
274279 events <- KeyPressEvent(k)
275280 d.buf = d.buf[:0]
@@ -309,8 +314,7 @@ LOOP:
309314 if slices.Contains([]byte{
310315 ansi.ESC, ansi.CSI, ansi.OSC, ansi.DCS, ansi.APC, ansi.SOS, ansi.PM,
311316 }, d.buf[0]) {
312− d.esc.Store(true)
313− d.timeout.Reset(d.EscTimeout)
317+ d.resetEsc()
314318 }
315319 }
316320 // If this is the entire buffer, we can break and assume this
vendor/github.com/charmbracelet/ultraviolet/winch_unix.go+3−24
@@ -18,6 +18,8 @@ func (l *WinChReceiver) receiveEvents(ctx context.Context, f term.File, evch cha
1818 sig := make(chan os.Signal, 1)
1919 signal.Notify(sig, syscall.SIGWINCH)
2020
21+ defer signal.Stop(sig)
22+
2123 sendWinSize := func(w, h int) {
2224 select {
2325 case <-ctx.Done():
@@ -32,31 +34,8 @@ func (l *WinChReceiver) receiveEvents(ctx context.Context, f term.File, evch cha
3234 }
3335 }
3436
35− defer signal.Stop(sig)
36−
37− // Send the initial window size.
38− winsize, err := termios.GetWinsize(int(f.Fd()))
39− if err != nil {
40− return err
41− }
42−
43− var wg sync.WaitGroup
44− wg.Add(1)
45− go func() {
46− defer wg.Done()
47− sendWinSize(int(winsize.Col), int(winsize.Row))
48− }()
49−
50− wg.Add(1)
51− go func() {
52− defer wg.Done()
53− sendPixelSize(int(winsize.Xpixel), int(winsize.Ypixel))
54− }()
55−
56− // Wait for all goroutines to finish before continuing.
57− wg.Wait()
58−
5937 // Listen for window size changes.
38+ var wg sync.WaitGroup
6039 for {
6140 select {
6241 case <-ctx.Done():
vendor/golang.org/x/sync/errgroup/errgroup.go+31−87
@@ -12,8 +12,6 @@ package errgroup
1212import (
1313 "context"
1414 "fmt"
15− "runtime"
16− "runtime/debug"
1715 "sync"
1816)
1917
@@ -33,10 +31,6 @@ type Group struct {
3331
3432 errOnce sync.Once
3533 err error
36−
37− mu sync.Mutex
38− panicValue any // = PanicError | PanicValue; non-nil if some Group.Go goroutine panicked.
39− abnormal bool // some Group.Go goroutine terminated abnormally (panic or goexit).
4034}
4135
4236func (g *Group) done() {
@@ -56,22 +50,13 @@ func WithContext(ctx context.Context) (*Group, context.Context) {
5650 return &Group{cancel: cancel}, ctx
5751}
5852
59−// Wait blocks until all function calls from the Go method have returned
60−// normally, then returns the first non-nil error (if any) from them.
61−//
62−// If any of the calls panics, Wait panics with a [PanicValue];
63−// and if any of them calls [runtime.Goexit], Wait calls runtime.Goexit.
53+// Wait blocks until all function calls from the Go method have returned, then
54+// returns the first non-nil error (if any) from them.
6455func (g *Group) Wait() error {
6556 g.wg.Wait()
6657 if g.cancel != nil {
6758 g.cancel(g.err)
6859 }
69− if g.panicValue != nil {
70− panic(g.panicValue)
71− }
72− if g.abnormal {
73− runtime.Goexit()
74− }
7560 return g.err
7661}
7762
@@ -81,53 +66,31 @@ func (g *Group) Wait() error {
8166// It blocks until the new goroutine can be added without the number of
8267// goroutines in the group exceeding the configured limit.
8368//
84−// The first goroutine in the group that returns a non-nil error, panics, or
85−// invokes [runtime.Goexit] will cancel the associated Context, if any.
69+// The first goroutine in the group that returns a non-nil error will
70+// cancel the associated Context, if any. The error will be returned
71+// by Wait.
8672func (g *Group) Go(f func() error) {
8773 if g.sem != nil {
8874 g.sem <- token{}
8975 }
9076
91− g.add(f)
92−}
93−
94−func (g *Group) add(f func() error) {
9577 g.wg.Add(1)
9678 go func() {
9779 defer g.done()
98− normalReturn := false
99− defer func() {
100− if normalReturn {
101− return
102− }
103− v := recover()
104− g.mu.Lock()
105− defer g.mu.Unlock()
106− if !g.abnormal {
107− if g.cancel != nil {
108− g.cancel(g.err)
109− }
110− g.abnormal = true
111− }
112− if v != nil && g.panicValue == nil {
113− switch v := v.(type) {
114− case error:
115− g.panicValue = PanicError{
116− Recovered: v,
117− Stack: debug.Stack(),
118− }
119− default:
120− g.panicValue = PanicValue{
121− Recovered: v,
122− Stack: debug.Stack(),
123− }
124− }
125− }
126− }()
12780
128− err := f()
129− normalReturn = true
130− if err != nil {
81+ // It is tempting to propagate panics from f()
82+ // up to the goroutine that calls Wait, but
83+ // it creates more problems than it solves:
84+ // - it delays panics arbitrarily,
85+ // making bugs harder to detect;
86+ // - it turns f's panic stack into a mere value,
87+ // hiding it from crash-monitoring tools;
88+ // - it risks deadlocks that hide the panic entirely,
89+ // if f's panic leaves the program in a state
90+ // that prevents the Wait call from being reached.
91+ // See #53757, #74275, #74304, #74306.
92+
93+ if err := f(); err != nil {
13194 g.errOnce.Do(func() {
13295 g.err = err
13396 if g.cancel != nil {
@@ -152,7 +115,19 @@ func (g *Group) TryGo(f func() error) bool {
152115 }
153116 }
154117
155− g.add(f)
118+ g.wg.Add(1)
119+ go func() {
120+ defer g.done()
121+
122+ if err := f(); err != nil {
123+ g.errOnce.Do(func() {
124+ g.err = err
125+ if g.cancel != nil {
126+ g.cancel(g.err)
127+ }
128+ })
129+ }
130+ }()
156131 return true
157132}
158133
@@ -174,34 +149,3 @@ func (g *Group) SetLimit(n int) {
174149 }
175150 g.sem = make(chan token, n)
176151}
177−
178−// PanicError wraps an error recovered from an unhandled panic
179−// when calling a function passed to Go or TryGo.
180−type PanicError struct {
181− Recovered error
182− Stack []byte // result of call to [debug.Stack]
183−}
184−
185−func (p PanicError) Error() string {
186− if len(p.Stack) > 0 {
187− return fmt.Sprintf("recovered from errgroup.Group: %v\n%s", p.Recovered, p.Stack)
188− }
189− return fmt.Sprintf("recovered from errgroup.Group: %v", p.Recovered)
190−}
191−
192−func (p PanicError) Unwrap() error { return p.Recovered }
193−
194−// PanicValue wraps a value that does not implement the error interface,
195−// recovered from an unhandled panic when calling a function passed to Go or
196−// TryGo.
197−type PanicValue struct {
198− Recovered any
199− Stack []byte // result of call to [debug.Stack]
200−}
201−
202−func (p PanicValue) String() string {
203− if len(p.Stack) > 0 {
204− return fmt.Sprintf("recovered from errgroup.Group: %v\n%s", p.Recovered, p.Stack)
205− }
206− return fmt.Sprintf("recovered from errgroup.Group: %v", p.Recovered)
207−}
vendor/golang.org/x/sys/unix/zerrors_linux.go+20−5
@@ -319,6 +319,7 @@ const (
319319 AUDIT_INTEGRITY_POLICY_RULE = 0x70f
320320 AUDIT_INTEGRITY_RULE = 0x70d
321321 AUDIT_INTEGRITY_STATUS = 0x70a
322+ AUDIT_INTEGRITY_USERSPACE = 0x710
322323 AUDIT_IPC = 0x517
323324 AUDIT_IPC_SET_PERM = 0x51f
324325 AUDIT_IPE_ACCESS = 0x58c
@@ -843,9 +844,9 @@ const (
843844 DM_UUID_FLAG = 0x4000
844845 DM_UUID_LEN = 0x81
845846 DM_VERSION = 0xc138fd00
846− DM_VERSION_EXTRA = "-ioctl (2023-03-01)"
847+ DM_VERSION_EXTRA = "-ioctl (2025-01-17)"
847848 DM_VERSION_MAJOR = 0x4
848− DM_VERSION_MINOR = 0x30
849+ DM_VERSION_MINOR = 0x31
849850 DM_VERSION_PATCHLEVEL = 0x0
850851 DT_BLK = 0x6
851852 DT_CHR = 0x2
@@ -941,6 +942,8 @@ const (
941942 ETHER_FLOW = 0x12
942943 ETHTOOL_BUSINFO_LEN = 0x20
943944 ETHTOOL_EROMVERS_LEN = 0x20
945+ ETHTOOL_FAMILY_NAME = "ethtool"
946+ ETHTOOL_FAMILY_VERSION = 0x1
944947 ETHTOOL_FEC_AUTO = 0x2
945948 ETHTOOL_FEC_BASER = 0x10
946949 ETHTOOL_FEC_LLRS = 0x20
@@ -1203,6 +1206,9 @@ const (
12031206 FAN_DENY = 0x2
12041207 FAN_ENABLE_AUDIT = 0x40
12051208 FAN_EPIDFD = -0x2
1209+ FAN_ERRNO_BITS = 0x8
1210+ FAN_ERRNO_MASK = 0xff
1211+ FAN_ERRNO_SHIFT = 0x18
12061212 FAN_EVENT_INFO_TYPE_DFID = 0x3
12071213 FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
12081214 FAN_EVENT_INFO_TYPE_ERROR = 0x5
@@ -1210,6 +1216,7 @@ const (
12101216 FAN_EVENT_INFO_TYPE_NEW_DFID_NAME = 0xc
12111217 FAN_EVENT_INFO_TYPE_OLD_DFID_NAME = 0xa
12121218 FAN_EVENT_INFO_TYPE_PIDFD = 0x4
1219+ FAN_EVENT_INFO_TYPE_RANGE = 0x6
12131220 FAN_EVENT_METADATA_LEN = 0x18
12141221 FAN_EVENT_ON_CHILD = 0x8000000
12151222 FAN_FS_ERROR = 0x8000
@@ -1240,6 +1247,7 @@ const (
12401247 FAN_OPEN_EXEC = 0x1000
12411248 FAN_OPEN_EXEC_PERM = 0x40000
12421249 FAN_OPEN_PERM = 0x10000
1250+ FAN_PRE_ACCESS = 0x100000
12431251 FAN_Q_OVERFLOW = 0x4000
12441252 FAN_RENAME = 0x10000000
12451253 FAN_REPORT_DFID_NAME = 0xc00
@@ -2787,7 +2795,7 @@ const (
27872795 RTAX_UNSPEC = 0x0
27882796 RTAX_WINDOW = 0x3
27892797 RTA_ALIGNTO = 0x4
2790− RTA_MAX = 0x1e
2798+ RTA_MAX = 0x1f
27912799 RTCF_DIRECTSRC = 0x4000000
27922800 RTCF_DOREDIRECT = 0x1000000
27932801 RTCF_LOG = 0x2000000
@@ -2864,10 +2872,12 @@ const (
28642872 RTM_DELACTION = 0x31
28652873 RTM_DELADDR = 0x15
28662874 RTM_DELADDRLABEL = 0x49
2875+ RTM_DELANYCAST = 0x3d
28672876 RTM_DELCHAIN = 0x65
28682877 RTM_DELLINK = 0x11
28692878 RTM_DELLINKPROP = 0x6d
28702879 RTM_DELMDB = 0x55
2880+ RTM_DELMULTICAST = 0x39
28712881 RTM_DELNEIGH = 0x1d
28722882 RTM_DELNETCONF = 0x51
28732883 RTM_DELNEXTHOP = 0x69
@@ -2917,11 +2927,13 @@ const (
29172927 RTM_NEWACTION = 0x30
29182928 RTM_NEWADDR = 0x14
29192929 RTM_NEWADDRLABEL = 0x48
2930+ RTM_NEWANYCAST = 0x3c
29202931 RTM_NEWCACHEREPORT = 0x60
29212932 RTM_NEWCHAIN = 0x64
29222933 RTM_NEWLINK = 0x10
29232934 RTM_NEWLINKPROP = 0x6c
29242935 RTM_NEWMDB = 0x54
2936+ RTM_NEWMULTICAST = 0x38
29252937 RTM_NEWNDUSEROPT = 0x44
29262938 RTM_NEWNEIGH = 0x1c
29272939 RTM_NEWNEIGHTBL = 0x40
@@ -2987,11 +2999,12 @@ const (
29872999 RUSAGE_THREAD = 0x1
29883000 RWF_APPEND = 0x10
29893001 RWF_ATOMIC = 0x40
3002+ RWF_DONTCACHE = 0x80
29903003 RWF_DSYNC = 0x2
29913004 RWF_HIPRI = 0x1
29923005 RWF_NOAPPEND = 0x20
29933006 RWF_NOWAIT = 0x8
2994− RWF_SUPPORTED = 0x7f
3007+ RWF_SUPPORTED = 0xff
29953008 RWF_SYNC = 0x4
29963009 RWF_WRITE_LIFE_NOT_SET = 0x0
29973010 SCHED_BATCH = 0x3
@@ -3271,6 +3284,7 @@ const (
32713284 STATX_BTIME = 0x800
32723285 STATX_CTIME = 0x80
32733286 STATX_DIOALIGN = 0x2000
3287+ STATX_DIO_READ_ALIGN = 0x20000
32743288 STATX_GID = 0x10
32753289 STATX_INO = 0x100
32763290 STATX_MNT_ID = 0x1000
@@ -3322,7 +3336,7 @@ const (
33223336 TASKSTATS_GENL_NAME = "TASKSTATS"
33233337 TASKSTATS_GENL_VERSION = 0x1
33243338 TASKSTATS_TYPE_MAX = 0x6
3325− TASKSTATS_VERSION = 0xe
3339+ TASKSTATS_VERSION = 0xf
33263340 TCIFLUSH = 0x0
33273341 TCIOFF = 0x2
33283342 TCIOFLUSH = 0x2
@@ -3503,6 +3517,7 @@ const (
35033517 TP_STATUS_WRONG_FORMAT = 0x4
35043518 TRACEFS_MAGIC = 0x74726163
35053519 TS_COMM_LEN = 0x20
3520+ UBI_IOCECNFO = 0xc01c6f06
35063521 UDF_SUPER_MAGIC = 0x15013346
35073522 UDP_CORK = 0x1
35083523 UDP_ENCAP = 0x64
vendor/golang.org/x/sys/unix/zerrors_linux_386.go+1
@@ -372,6 +372,7 @@ const (
372372 SO_RCVBUFFORCE = 0x21
373373 SO_RCVLOWAT = 0x12
374374 SO_RCVMARK = 0x4b
375+ SO_RCVPRIORITY = 0x52
375376 SO_RCVTIMEO = 0x14
376377 SO_RCVTIMEO_NEW = 0x42
377378 SO_RCVTIMEO_OLD = 0x14
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go+1
@@ -373,6 +373,7 @@ const (
373373 SO_RCVBUFFORCE = 0x21
374374 SO_RCVLOWAT = 0x12
375375 SO_RCVMARK = 0x4b
376+ SO_RCVPRIORITY = 0x52
376377 SO_RCVTIMEO = 0x14
377378 SO_RCVTIMEO_NEW = 0x42
378379 SO_RCVTIMEO_OLD = 0x14
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go+1
@@ -378,6 +378,7 @@ const (
378378 SO_RCVBUFFORCE = 0x21
379379 SO_RCVLOWAT = 0x12
380380 SO_RCVMARK = 0x4b
381+ SO_RCVPRIORITY = 0x52
381382 SO_RCVTIMEO = 0x14
382383 SO_RCVTIMEO_NEW = 0x42
383384 SO_RCVTIMEO_OLD = 0x14
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go+1
@@ -371,6 +371,7 @@ const (
371371 SO_RCVBUFFORCE = 0x21
372372 SO_RCVLOWAT = 0x12
373373 SO_RCVMARK = 0x4b
374+ SO_RCVPRIORITY = 0x52
374375 SO_RCVTIMEO = 0x14
375376 SO_RCVTIMEO_NEW = 0x42
376377 SO_RCVTIMEO_OLD = 0x14
vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go+1
@@ -365,6 +365,7 @@ const (
365365 SO_RCVBUFFORCE = 0x21
366366 SO_RCVLOWAT = 0x12
367367 SO_RCVMARK = 0x4b
368+ SO_RCVPRIORITY = 0x52
368369 SO_RCVTIMEO = 0x14
369370 SO_RCVTIMEO_NEW = 0x42
370371 SO_RCVTIMEO_OLD = 0x14
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go+1
@@ -371,6 +371,7 @@ const (
371371 SO_RCVBUFFORCE = 0x21
372372 SO_RCVLOWAT = 0x1004
373373 SO_RCVMARK = 0x4b
374+ SO_RCVPRIORITY = 0x52
374375 SO_RCVTIMEO = 0x1006
375376 SO_RCVTIMEO_NEW = 0x42
376377 SO_RCVTIMEO_OLD = 0x1006
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go+1
@@ -371,6 +371,7 @@ const (
371371 SO_RCVBUFFORCE = 0x21
372372 SO_RCVLOWAT = 0x1004
373373 SO_RCVMARK = 0x4b
374+ SO_RCVPRIORITY = 0x52
374375 SO_RCVTIMEO = 0x1006
375376 SO_RCVTIMEO_NEW = 0x42
376377 SO_RCVTIMEO_OLD = 0x1006
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go+1
@@ -371,6 +371,7 @@ const (
371371 SO_RCVBUFFORCE = 0x21
372372 SO_RCVLOWAT = 0x1004
373373 SO_RCVMARK = 0x4b
374+ SO_RCVPRIORITY = 0x52
374375 SO_RCVTIMEO = 0x1006
375376 SO_RCVTIMEO_NEW = 0x42
376377 SO_RCVTIMEO_OLD = 0x1006
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go+1
@@ -371,6 +371,7 @@ const (
371371 SO_RCVBUFFORCE = 0x21
372372 SO_RCVLOWAT = 0x1004
373373 SO_RCVMARK = 0x4b
374+ SO_RCVPRIORITY = 0x52
374375 SO_RCVTIMEO = 0x1006
375376 SO_RCVTIMEO_NEW = 0x42
376377 SO_RCVTIMEO_OLD = 0x1006
vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go+1
@@ -426,6 +426,7 @@ const (
426426 SO_RCVBUFFORCE = 0x21
427427 SO_RCVLOWAT = 0x10
428428 SO_RCVMARK = 0x4b
429+ SO_RCVPRIORITY = 0x52
429430 SO_RCVTIMEO = 0x12
430431 SO_RCVTIMEO_NEW = 0x42
431432 SO_RCVTIMEO_OLD = 0x12
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go+1
@@ -430,6 +430,7 @@ const (
430430 SO_RCVBUFFORCE = 0x21
431431 SO_RCVLOWAT = 0x10
432432 SO_RCVMARK = 0x4b
433+ SO_RCVPRIORITY = 0x52
433434 SO_RCVTIMEO = 0x12
434435 SO_RCVTIMEO_NEW = 0x42
435436 SO_RCVTIMEO_OLD = 0x12
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go+1
@@ -430,6 +430,7 @@ const (
430430 SO_RCVBUFFORCE = 0x21
431431 SO_RCVLOWAT = 0x10
432432 SO_RCVMARK = 0x4b
433+ SO_RCVPRIORITY = 0x52
433434 SO_RCVTIMEO = 0x12
434435 SO_RCVTIMEO_NEW = 0x42
435436 SO_RCVTIMEO_OLD = 0x12
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go+1
@@ -362,6 +362,7 @@ const (
362362 SO_RCVBUFFORCE = 0x21
363363 SO_RCVLOWAT = 0x12
364364 SO_RCVMARK = 0x4b
365+ SO_RCVPRIORITY = 0x52
365366 SO_RCVTIMEO = 0x14
366367 SO_RCVTIMEO_NEW = 0x42
367368 SO_RCVTIMEO_OLD = 0x14
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go+1
@@ -434,6 +434,7 @@ const (
434434 SO_RCVBUFFORCE = 0x21
435435 SO_RCVLOWAT = 0x12
436436 SO_RCVMARK = 0x4b
437+ SO_RCVPRIORITY = 0x52
437438 SO_RCVTIMEO = 0x14
438439 SO_RCVTIMEO_NEW = 0x42
439440 SO_RCVTIMEO_OLD = 0x14
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go+1
@@ -473,6 +473,7 @@ const (
473473 SO_RCVBUFFORCE = 0x100b
474474 SO_RCVLOWAT = 0x800
475475 SO_RCVMARK = 0x54
476+ SO_RCVPRIORITY = 0x5b
476477 SO_RCVTIMEO = 0x2000
477478 SO_RCVTIMEO_NEW = 0x44
478479 SO_RCVTIMEO_OLD = 0x2000
vendor/golang.org/x/sys/unix/ztypes_linux.go+101−7
@@ -114,7 +114,7 @@ type Statx_t struct {
114114 Atomic_write_unit_min uint32
115115 Atomic_write_unit_max uint32
116116 Atomic_write_segments_max uint32
117− _ [1]uint32
117+ Dio_read_offset_align uint32
118118 _ [9]uint64
119119}
120120
@@ -2226,8 +2226,11 @@ const (
22262226 NFT_PAYLOAD_LL_HEADER = 0x0
22272227 NFT_PAYLOAD_NETWORK_HEADER = 0x1
22282228 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
2229+ NFT_PAYLOAD_INNER_HEADER = 0x3
2230+ NFT_PAYLOAD_TUN_HEADER = 0x4
22292231 NFT_PAYLOAD_CSUM_NONE = 0x0
22302232 NFT_PAYLOAD_CSUM_INET = 0x1
2233+ NFT_PAYLOAD_CSUM_SCTP = 0x2
22312234 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
22322235 NFTA_PAYLOAD_UNSPEC = 0x0
22332236 NFTA_PAYLOAD_DREG = 0x1
@@ -3802,7 +3805,16 @@ const (
38023805 ETHTOOL_MSG_PSE_GET = 0x24
38033806 ETHTOOL_MSG_PSE_SET = 0x25
38043807 ETHTOOL_MSG_RSS_GET = 0x26
3805− ETHTOOL_MSG_USER_MAX = 0x2d
3808+ ETHTOOL_MSG_PLCA_GET_CFG = 0x27
3809+ ETHTOOL_MSG_PLCA_SET_CFG = 0x28
3810+ ETHTOOL_MSG_PLCA_GET_STATUS = 0x29
3811+ ETHTOOL_MSG_MM_GET = 0x2a
3812+ ETHTOOL_MSG_MM_SET = 0x2b
3813+ ETHTOOL_MSG_MODULE_FW_FLASH_ACT = 0x2c
3814+ ETHTOOL_MSG_PHY_GET = 0x2d
3815+ ETHTOOL_MSG_TSCONFIG_GET = 0x2e
3816+ ETHTOOL_MSG_TSCONFIG_SET = 0x2f
3817+ ETHTOOL_MSG_USER_MAX = 0x2f
38063818 ETHTOOL_MSG_KERNEL_NONE = 0x0
38073819 ETHTOOL_MSG_STRSET_GET_REPLY = 0x1
38083820 ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2
@@ -3842,7 +3854,17 @@ const (
38423854 ETHTOOL_MSG_MODULE_NTF = 0x24
38433855 ETHTOOL_MSG_PSE_GET_REPLY = 0x25
38443856 ETHTOOL_MSG_RSS_GET_REPLY = 0x26
3845− ETHTOOL_MSG_KERNEL_MAX = 0x2e
3857+ ETHTOOL_MSG_PLCA_GET_CFG_REPLY = 0x27
3858+ ETHTOOL_MSG_PLCA_GET_STATUS_REPLY = 0x28
3859+ ETHTOOL_MSG_PLCA_NTF = 0x29
3860+ ETHTOOL_MSG_MM_GET_REPLY = 0x2a
3861+ ETHTOOL_MSG_MM_NTF = 0x2b
3862+ ETHTOOL_MSG_MODULE_FW_FLASH_NTF = 0x2c
3863+ ETHTOOL_MSG_PHY_GET_REPLY = 0x2d
3864+ ETHTOOL_MSG_PHY_NTF = 0x2e
3865+ ETHTOOL_MSG_TSCONFIG_GET_REPLY = 0x2f
3866+ ETHTOOL_MSG_TSCONFIG_SET_REPLY = 0x30
3867+ ETHTOOL_MSG_KERNEL_MAX = 0x30
38463868 ETHTOOL_FLAG_COMPACT_BITSETS = 0x1
38473869 ETHTOOL_FLAG_OMIT_REPLY = 0x2
38483870 ETHTOOL_FLAG_STATS = 0x4
@@ -3949,7 +3971,12 @@ const (
39493971 ETHTOOL_A_RINGS_TCP_DATA_SPLIT = 0xb
39503972 ETHTOOL_A_RINGS_CQE_SIZE = 0xc
39513973 ETHTOOL_A_RINGS_TX_PUSH = 0xd
3952− ETHTOOL_A_RINGS_MAX = 0x10
3974+ ETHTOOL_A_RINGS_RX_PUSH = 0xe
3975+ ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN = 0xf
3976+ ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN_MAX = 0x10
3977+ ETHTOOL_A_RINGS_HDS_THRESH = 0x11
3978+ ETHTOOL_A_RINGS_HDS_THRESH_MAX = 0x12
3979+ ETHTOOL_A_RINGS_MAX = 0x12
39533980 ETHTOOL_A_CHANNELS_UNSPEC = 0x0
39543981 ETHTOOL_A_CHANNELS_HEADER = 0x1
39553982 ETHTOOL_A_CHANNELS_RX_MAX = 0x2
@@ -4015,7 +4042,9 @@ const (
40154042 ETHTOOL_A_TSINFO_TX_TYPES = 0x3
40164043 ETHTOOL_A_TSINFO_RX_FILTERS = 0x4
40174044 ETHTOOL_A_TSINFO_PHC_INDEX = 0x5
4018− ETHTOOL_A_TSINFO_MAX = 0x6
4045+ ETHTOOL_A_TSINFO_STATS = 0x6
4046+ ETHTOOL_A_TSINFO_HWTSTAMP_PROVIDER = 0x7
4047+ ETHTOOL_A_TSINFO_MAX = 0x7
40194048 ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0
40204049 ETHTOOL_A_CABLE_TEST_HEADER = 0x1
40214050 ETHTOOL_A_CABLE_TEST_MAX = 0x1
@@ -4613,6 +4642,7 @@ const (
46134642 NL80211_ATTR_AKM_SUITES = 0x4c
46144643 NL80211_ATTR_AP_ISOLATE = 0x60
46154644 NL80211_ATTR_AP_SETTINGS_FLAGS = 0x135
4645+ NL80211_ATTR_ASSOC_SPP_AMSDU = 0x14a
46164646 NL80211_ATTR_AUTH_DATA = 0x9c
46174647 NL80211_ATTR_AUTH_TYPE = 0x35
46184648 NL80211_ATTR_BANDS = 0xef
@@ -4623,6 +4653,7 @@ const (
46234653 NL80211_ATTR_BSS_BASIC_RATES = 0x24
46244654 NL80211_ATTR_BSS = 0x2f
46254655 NL80211_ATTR_BSS_CTS_PROT = 0x1c
4656+ NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA = 0x147
46264657 NL80211_ATTR_BSS_HT_OPMODE = 0x6d
46274658 NL80211_ATTR_BSSID = 0xf5
46284659 NL80211_ATTR_BSS_SELECT = 0xe3
@@ -4682,6 +4713,7 @@ const (
46824713 NL80211_ATTR_DTIM_PERIOD = 0xd
46834714 NL80211_ATTR_DURATION = 0x57
46844715 NL80211_ATTR_EHT_CAPABILITY = 0x136
4716+ NL80211_ATTR_EMA_RNR_ELEMS = 0x145
46854717 NL80211_ATTR_EML_CAPABILITY = 0x13d
46864718 NL80211_ATTR_EXT_CAPA = 0xa9
46874719 NL80211_ATTR_EXT_CAPA_MASK = 0xaa
@@ -4717,6 +4749,7 @@ const (
47174749 NL80211_ATTR_HIDDEN_SSID = 0x7e
47184750 NL80211_ATTR_HT_CAPABILITY = 0x1f
47194751 NL80211_ATTR_HT_CAPABILITY_MASK = 0x94
4752+ NL80211_ATTR_HW_TIMESTAMP_ENABLED = 0x144
47204753 NL80211_ATTR_IE_ASSOC_RESP = 0x80
47214754 NL80211_ATTR_IE = 0x2a
47224755 NL80211_ATTR_IE_PROBE_RESP = 0x7f
@@ -4747,9 +4780,10 @@ const (
47474780 NL80211_ATTR_MAC_HINT = 0xc8
47484781 NL80211_ATTR_MAC_MASK = 0xd7
47494782 NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca
4750− NL80211_ATTR_MAX = 0x14d
4783+ NL80211_ATTR_MAX = 0x150
47514784 NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4
47524785 NL80211_ATTR_MAX_CSA_COUNTERS = 0xce
4786+ NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS = 0x143
47534787 NL80211_ATTR_MAX_MATCH_SETS = 0x85
47544788 NL80211_ATTR_MAX_NUM_AKM_SUITES = 0x13c
47554789 NL80211_ATTR_MAX_NUM_PMKIDS = 0x56
@@ -4774,9 +4808,12 @@ const (
47744808 NL80211_ATTR_MGMT_SUBTYPE = 0x29
47754809 NL80211_ATTR_MLD_ADDR = 0x13a
47764810 NL80211_ATTR_MLD_CAPA_AND_OPS = 0x13e
4811+ NL80211_ATTR_MLO_LINK_DISABLED = 0x146
47774812 NL80211_ATTR_MLO_LINK_ID = 0x139
47784813 NL80211_ATTR_MLO_LINKS = 0x138
47794814 NL80211_ATTR_MLO_SUPPORT = 0x13b
4815+ NL80211_ATTR_MLO_TTLM_DLINK = 0x148
4816+ NL80211_ATTR_MLO_TTLM_ULINK = 0x149
47804817 NL80211_ATTR_MNTR_FLAGS = 0x17
47814818 NL80211_ATTR_MPATH_INFO = 0x1b
47824819 NL80211_ATTR_MPATH_NEXT_HOP = 0x1a
@@ -4809,12 +4846,14 @@ const (
48094846 NL80211_ATTR_PORT_AUTHORIZED = 0x103
48104847 NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN = 0x5
48114848 NL80211_ATTR_POWER_RULE_MAX_EIRP = 0x6
4849+ NL80211_ATTR_POWER_RULE_PSD = 0x8
48124850 NL80211_ATTR_PREV_BSSID = 0x4f
48134851 NL80211_ATTR_PRIVACY = 0x46
48144852 NL80211_ATTR_PROBE_RESP = 0x91
48154853 NL80211_ATTR_PROBE_RESP_OFFLOAD = 0x90
48164854 NL80211_ATTR_PROTOCOL_FEATURES = 0xad
48174855 NL80211_ATTR_PS_STATE = 0x5d
4856+ NL80211_ATTR_PUNCT_BITMAP = 0x142
48184857 NL80211_ATTR_QOS_MAP = 0xc7
48194858 NL80211_ATTR_RADAR_BACKGROUND = 0x134
48204859 NL80211_ATTR_RADAR_EVENT = 0xa8
@@ -4943,7 +4982,9 @@ const (
49434982 NL80211_ATTR_WIPHY_FREQ = 0x26
49444983 NL80211_ATTR_WIPHY_FREQ_HINT = 0xc9
49454984 NL80211_ATTR_WIPHY_FREQ_OFFSET = 0x122
4985+ NL80211_ATTR_WIPHY_INTERFACE_COMBINATIONS = 0x14c
49464986 NL80211_ATTR_WIPHY_NAME = 0x2
4987+ NL80211_ATTR_WIPHY_RADIOS = 0x14b
49474988 NL80211_ATTR_WIPHY_RETRY_LONG = 0x3e
49484989 NL80211_ATTR_WIPHY_RETRY_SHORT = 0x3d
49494990 NL80211_ATTR_WIPHY_RTS_THRESHOLD = 0x40
@@ -4978,6 +5019,8 @@ const (
49785019 NL80211_BAND_ATTR_IFTYPE_DATA = 0x9
49795020 NL80211_BAND_ATTR_MAX = 0xd
49805021 NL80211_BAND_ATTR_RATES = 0x2
5022+ NL80211_BAND_ATTR_S1G_CAPA = 0xd
5023+ NL80211_BAND_ATTR_S1G_MCS_NSS_SET = 0xc
49815024 NL80211_BAND_ATTR_VHT_CAPA = 0x8
49825025 NL80211_BAND_ATTR_VHT_MCS_SET = 0x7
49835026 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC = 0x8
@@ -5001,6 +5044,10 @@ const (
50015044 NL80211_BSS_BEACON_INTERVAL = 0x4
50025045 NL80211_BSS_BEACON_TSF = 0xd
50035046 NL80211_BSS_BSSID = 0x1
5047+ NL80211_BSS_CANNOT_USE_6GHZ_PWR_MISMATCH = 0x2
5048+ NL80211_BSS_CANNOT_USE_NSTR_NONPRIMARY = 0x1
5049+ NL80211_BSS_CANNOT_USE_REASONS = 0x18
5050+ NL80211_BSS_CANNOT_USE_UHB_PWR_MISMATCH = 0x2
50045051 NL80211_BSS_CAPABILITY = 0x5
50055052 NL80211_BSS_CHAIN_SIGNAL = 0x13
50065053 NL80211_BSS_CHAN_WIDTH_10 = 0x1
@@ -5032,6 +5079,9 @@ const (
50325079 NL80211_BSS_STATUS = 0x9
50335080 NL80211_BSS_STATUS_IBSS_JOINED = 0x2
50345081 NL80211_BSS_TSF = 0x3
5082+ NL80211_BSS_USE_FOR = 0x17
5083+ NL80211_BSS_USE_FOR_MLD_LINK = 0x2
5084+ NL80211_BSS_USE_FOR_NORMAL = 0x1
50355085 NL80211_CHAN_HT20 = 0x1
50365086 NL80211_CHAN_HT40MINUS = 0x2
50375087 NL80211_CHAN_HT40PLUS = 0x3
@@ -5117,7 +5167,8 @@ const (
51175167 NL80211_CMD_LEAVE_IBSS = 0x2c
51185168 NL80211_CMD_LEAVE_MESH = 0x45
51195169 NL80211_CMD_LEAVE_OCB = 0x6d
5120− NL80211_CMD_MAX = 0x9b
5170+ NL80211_CMD_LINKS_REMOVED = 0x9a
5171+ NL80211_CMD_MAX = 0x9d
51215172 NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29
51225173 NL80211_CMD_MODIFY_LINK_STA = 0x97
51235174 NL80211_CMD_NAN_MATCH = 0x78
@@ -5161,6 +5212,7 @@ const (
51615212 NL80211_CMD_SET_COALESCE = 0x65
51625213 NL80211_CMD_SET_CQM = 0x3f
51635214 NL80211_CMD_SET_FILS_AAD = 0x92
5215+ NL80211_CMD_SET_HW_TIMESTAMP = 0x99
51645216 NL80211_CMD_SET_INTERFACE = 0x6
51655217 NL80211_CMD_SET_KEY = 0xa
51665218 NL80211_CMD_SET_MAC_ACL = 0x5d
@@ -5180,6 +5232,7 @@ const (
51805232 NL80211_CMD_SET_SAR_SPECS = 0x8c
51815233 NL80211_CMD_SET_STATION = 0x12
51825234 NL80211_CMD_SET_TID_CONFIG = 0x89
5235+ NL80211_CMD_SET_TID_TO_LINK_MAPPING = 0x9b
51835236 NL80211_CMD_SET_TX_BITRATE_MASK = 0x39
51845237 NL80211_CMD_SET_WDS_PEER = 0x42
51855238 NL80211_CMD_SET_WIPHY = 0x2
@@ -5247,6 +5300,7 @@ const (
52475300 NL80211_EXT_FEATURE_AIRTIME_FAIRNESS = 0x21
52485301 NL80211_EXT_FEATURE_AP_PMKSA_CACHING = 0x22
52495302 NL80211_EXT_FEATURE_AQL = 0x28
5303+ NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA = 0x40
52505304 NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT = 0x2e
52515305 NL80211_EXT_FEATURE_BEACON_PROTECTION = 0x29
52525306 NL80211_EXT_FEATURE_BEACON_RATE_HE = 0x36
@@ -5262,6 +5316,7 @@ const (
52625316 NL80211_EXT_FEATURE_CQM_RSSI_LIST = 0xd
52635317 NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = 0x1b
52645318 NL80211_EXT_FEATURE_DEL_IBSS_STA = 0x2c
5319+ NL80211_EXT_FEATURE_DFS_CONCURRENT = 0x43
52655320 NL80211_EXT_FEATURE_DFS_OFFLOAD = 0x19
52665321 NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER = 0x20
52675322 NL80211_EXT_FEATURE_EXT_KEY_ID = 0x24
@@ -5281,9 +5336,12 @@ const (
52815336 NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 0x14
52825337 NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE = 0x13
52835338 NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION = 0x31
5339+ NL80211_EXT_FEATURE_OWE_OFFLOAD_AP = 0x42
5340+ NL80211_EXT_FEATURE_OWE_OFFLOAD = 0x41
52845341 NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE = 0x3d
52855342 NL80211_EXT_FEATURE_PROTECTED_TWT = 0x2b
52865343 NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE = 0x39
5344+ NL80211_EXT_FEATURE_PUNCT = 0x3e
52875345 NL80211_EXT_FEATURE_RADAR_BACKGROUND = 0x3c
52885346 NL80211_EXT_FEATURE_RRM = 0x1
52895347 NL80211_EXT_FEATURE_SAE_OFFLOAD_AP = 0x33
@@ -5295,8 +5353,10 @@ const (
52955353 NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD = 0x23
52965354 NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI = 0xc
52975355 NL80211_EXT_FEATURE_SECURE_LTF = 0x37
5356+ NL80211_EXT_FEATURE_SECURE_NAN = 0x3f
52985357 NL80211_EXT_FEATURE_SECURE_RTT = 0x38
52995358 NL80211_EXT_FEATURE_SET_SCAN_DWELL = 0x5
5359+ NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT = 0x44
53005360 NL80211_EXT_FEATURE_STA_TX_PWR = 0x25
53015361 NL80211_EXT_FEATURE_TXQS = 0x1c
53025362 NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP = 0x35
@@ -5343,7 +5403,10 @@ const (
53435403 NL80211_FREQUENCY_ATTR_2MHZ = 0x16
53445404 NL80211_FREQUENCY_ATTR_4MHZ = 0x17
53455405 NL80211_FREQUENCY_ATTR_8MHZ = 0x18
5406+ NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP = 0x21
5407+ NL80211_FREQUENCY_ATTR_CAN_MONITOR = 0x20
53465408 NL80211_FREQUENCY_ATTR_DFS_CAC_TIME = 0xd
5409+ NL80211_FREQUENCY_ATTR_DFS_CONCURRENT = 0x1d
53475410 NL80211_FREQUENCY_ATTR_DFS_STATE = 0x7
53485411 NL80211_FREQUENCY_ATTR_DFS_TIME = 0x8
53495412 NL80211_FREQUENCY_ATTR_DISABLED = 0x2
@@ -5357,6 +5420,8 @@ const (
53575420 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc
53585421 NL80211_FREQUENCY_ATTR_NO_20MHZ = 0x10
53595422 NL80211_FREQUENCY_ATTR_NO_320MHZ = 0x1a
5423+ NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT = 0x1f
5424+ NL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT = 0x1e
53605425 NL80211_FREQUENCY_ATTR_NO_80MHZ = 0xb
53615426 NL80211_FREQUENCY_ATTR_NO_EHT = 0x1b
53625427 NL80211_FREQUENCY_ATTR_NO_HE = 0x13
@@ -5364,8 +5429,11 @@ const (
53645429 NL80211_FREQUENCY_ATTR_NO_HT40_PLUS = 0xa
53655430 NL80211_FREQUENCY_ATTR_NO_IBSS = 0x3
53665431 NL80211_FREQUENCY_ATTR_NO_IR = 0x3
5432+ NL80211_FREQUENCY_ATTR_NO_UHB_AFC_CLIENT = 0x1f
5433+ NL80211_FREQUENCY_ATTR_NO_UHB_VLP_CLIENT = 0x1e
53675434 NL80211_FREQUENCY_ATTR_OFFSET = 0x14
53685435 NL80211_FREQUENCY_ATTR_PASSIVE_SCAN = 0x3
5436+ NL80211_FREQUENCY_ATTR_PSD = 0x1c
53695437 NL80211_FREQUENCY_ATTR_RADAR = 0x5
53705438 NL80211_FREQUENCY_ATTR_WMM = 0x12
53715439 NL80211_FTM_RESP_ATTR_CIVICLOC = 0x3
@@ -5430,6 +5498,7 @@ const (
54305498 NL80211_IFTYPE_STATION = 0x2
54315499 NL80211_IFTYPE_UNSPECIFIED = 0x0
54325500 NL80211_IFTYPE_WDS = 0x5
5501+ NL80211_KCK_EXT_LEN_32 = 0x20
54335502 NL80211_KCK_EXT_LEN = 0x18
54345503 NL80211_KCK_LEN = 0x10
54355504 NL80211_KEK_EXT_LEN = 0x20
@@ -5458,6 +5527,7 @@ const (
54585527 NL80211_MAX_SUPP_HT_RATES = 0x4d
54595528 NL80211_MAX_SUPP_RATES = 0x20
54605529 NL80211_MAX_SUPP_REG_RULES = 0x80
5530+ NL80211_MAX_SUPP_SELECTORS = 0x80
54615531 NL80211_MBSSID_CONFIG_ATTR_EMA = 0x5
54625532 NL80211_MBSSID_CONFIG_ATTR_INDEX = 0x3
54635533 NL80211_MBSSID_CONFIG_ATTR_MAX = 0x5
@@ -5703,11 +5773,16 @@ const (
57035773 NL80211_RADAR_PRE_CAC_EXPIRED = 0x4
57045774 NL80211_RATE_INFO_10_MHZ_WIDTH = 0xb
57055775 NL80211_RATE_INFO_160_MHZ_WIDTH = 0xa
5776+ NL80211_RATE_INFO_16_MHZ_WIDTH = 0x1d
5777+ NL80211_RATE_INFO_1_MHZ_WIDTH = 0x19
5778+ NL80211_RATE_INFO_2_MHZ_WIDTH = 0x1a
57065779 NL80211_RATE_INFO_320_MHZ_WIDTH = 0x12
57075780 NL80211_RATE_INFO_40_MHZ_WIDTH = 0x3
5781+ NL80211_RATE_INFO_4_MHZ_WIDTH = 0x1b
57085782 NL80211_RATE_INFO_5_MHZ_WIDTH = 0xc
57095783 NL80211_RATE_INFO_80_MHZ_WIDTH = 0x8
57105784 NL80211_RATE_INFO_80P80_MHZ_WIDTH = 0x9
5785+ NL80211_RATE_INFO_8_MHZ_WIDTH = 0x1c
57115786 NL80211_RATE_INFO_BITRATE32 = 0x5
57125787 NL80211_RATE_INFO_BITRATE = 0x1
57135788 NL80211_RATE_INFO_EHT_GI_0_8 = 0x0
@@ -5753,6 +5828,8 @@ const (
57535828 NL80211_RATE_INFO_HE_RU_ALLOC = 0x11
57545829 NL80211_RATE_INFO_MAX = 0x1d
57555830 NL80211_RATE_INFO_MCS = 0x2
5831+ NL80211_RATE_INFO_S1G_MCS = 0x17
5832+ NL80211_RATE_INFO_S1G_NSS = 0x18
57565833 NL80211_RATE_INFO_SHORT_GI = 0x4
57575834 NL80211_RATE_INFO_VHT_MCS = 0x6
57585835 NL80211_RATE_INFO_VHT_NSS = 0x7
@@ -5770,14 +5847,19 @@ const (
57705847 NL80211_REKEY_DATA_KEK = 0x1
57715848 NL80211_REKEY_DATA_REPLAY_CTR = 0x3
57725849 NL80211_REPLAY_CTR_LEN = 0x8
5850+ NL80211_RRF_ALLOW_6GHZ_VLP_AP = 0x1000000
57735851 NL80211_RRF_AUTO_BW = 0x800
57745852 NL80211_RRF_DFS = 0x10
5853+ NL80211_RRF_DFS_CONCURRENT = 0x200000
57755854 NL80211_RRF_GO_CONCURRENT = 0x1000
57765855 NL80211_RRF_IR_CONCURRENT = 0x1000
57775856 NL80211_RRF_NO_160MHZ = 0x10000
57785857 NL80211_RRF_NO_320MHZ = 0x40000
5858+ NL80211_RRF_NO_6GHZ_AFC_CLIENT = 0x800000
5859+ NL80211_RRF_NO_6GHZ_VLP_CLIENT = 0x400000
57795860 NL80211_RRF_NO_80MHZ = 0x8000
57805861 NL80211_RRF_NO_CCK = 0x2
5862+ NL80211_RRF_NO_EHT = 0x80000
57815863 NL80211_RRF_NO_HE = 0x20000
57825864 NL80211_RRF_NO_HT40 = 0x6000
57835865 NL80211_RRF_NO_HT40MINUS = 0x2000
@@ -5788,7 +5870,10 @@ const (
57885870 NL80211_RRF_NO_IR = 0x80
57895871 NL80211_RRF_NO_OFDM = 0x1
57905872 NL80211_RRF_NO_OUTDOOR = 0x8
5873+ NL80211_RRF_NO_UHB_AFC_CLIENT = 0x800000
5874+ NL80211_RRF_NO_UHB_VLP_CLIENT = 0x400000
57915875 NL80211_RRF_PASSIVE_SCAN = 0x80
5876+ NL80211_RRF_PSD = 0x100000
57925877 NL80211_RRF_PTMP_ONLY = 0x40
57935878 NL80211_RRF_PTP_ONLY = 0x20
57945879 NL80211_RXMGMT_FLAG_ANSWERED = 0x1
@@ -5849,6 +5934,7 @@ const (
58495934 NL80211_STA_FLAG_MAX_OLD_API = 0x6
58505935 NL80211_STA_FLAG_MFP = 0x4
58515936 NL80211_STA_FLAG_SHORT_PREAMBLE = 0x2
5937+ NL80211_STA_FLAG_SPP_AMSDU = 0x8
58525938 NL80211_STA_FLAG_TDLS_PEER = 0x6
58535939 NL80211_STA_FLAG_WME = 0x3
58545940 NL80211_STA_INFO_ACK_SIGNAL_AVG = 0x23
@@ -6007,6 +6093,13 @@ const (
60076093 NL80211_VHT_CAPABILITY_LEN = 0xc
60086094 NL80211_VHT_NSS_MAX = 0x8
60096095 NL80211_WIPHY_NAME_MAXLEN = 0x40
6096+ NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE = 0x2
6097+ NL80211_WIPHY_RADIO_ATTR_INDEX = 0x1
6098+ NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION = 0x3
6099+ NL80211_WIPHY_RADIO_ATTR_MAX = 0x4
6100+ NL80211_WIPHY_RADIO_FREQ_ATTR_END = 0x2
6101+ NL80211_WIPHY_RADIO_FREQ_ATTR_MAX = 0x2
6102+ NL80211_WIPHY_RADIO_FREQ_ATTR_START = 0x1
60106103 NL80211_WMMR_AIFSN = 0x3
60116104 NL80211_WMMR_CW_MAX = 0x2
60126105 NL80211_WMMR_CW_MIN = 0x1
@@ -6038,6 +6131,7 @@ const (
60386131 NL80211_WOWLAN_TRIG_PKT_PATTERN = 0x4
60396132 NL80211_WOWLAN_TRIG_RFKILL_RELEASE = 0x9
60406133 NL80211_WOWLAN_TRIG_TCP_CONNECTION = 0xe
6134+ NL80211_WOWLAN_TRIG_UNPROTECTED_DEAUTH_DISASSOC = 0x14
60416135 NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211 = 0xa
60426136 NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN = 0xb
60436137 NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023 = 0xc
vendor/golang.org/x/sys/unix/ztypes_linux_386.go+16
@@ -285,10 +285,16 @@ type Taskstats struct {
285285 _ [4]byte
286286 Cpu_count uint64
287287 Cpu_delay_total uint64
288+ Cpu_delay_max uint64
289+ Cpu_delay_min uint64
288290 Blkio_count uint64
289291 Blkio_delay_total uint64
292+ Blkio_delay_max uint64
293+ Blkio_delay_min uint64
290294 Swapin_count uint64
291295 Swapin_delay_total uint64
296+ Swapin_delay_max uint64
297+ Swapin_delay_min uint64
292298 Cpu_run_real_total uint64
293299 Cpu_run_virtual_total uint64
294300 Ac_comm [32]int8
@@ -324,11 +330,17 @@ type Taskstats struct {
324330 Cpu_scaled_run_real_total uint64
325331 Freepages_count uint64
326332 Freepages_delay_total uint64
333+ Freepages_delay_max uint64
334+ Freepages_delay_min uint64
327335 Thrashing_count uint64
328336 Thrashing_delay_total uint64
337+ Thrashing_delay_max uint64
338+ Thrashing_delay_min uint64
329339 Ac_btime64 uint64
330340 Compact_count uint64
331341 Compact_delay_total uint64
342+ Compact_delay_max uint64
343+ Compact_delay_min uint64
332344 Ac_tgid uint32
333345 _ [4]byte
334346 Ac_tgetime uint64
@@ -336,8 +348,12 @@ type Taskstats struct {
336348 Ac_exe_inode uint64
337349 Wpcopy_count uint64
338350 Wpcopy_delay_total uint64
351+ Wpcopy_delay_max uint64
352+ Wpcopy_delay_min uint64
339353 Irq_count uint64
340354 Irq_delay_total uint64
355+ Irq_delay_max uint64
356+ Irq_delay_min uint64
341357}
342358
343359type cpuMask uint32
vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go+16
@@ -300,10 +300,16 @@ type Taskstats struct {
300300 Ac_nice uint8
301301 Cpu_count uint64
302302 Cpu_delay_total uint64
303+ Cpu_delay_max uint64
304+ Cpu_delay_min uint64
303305 Blkio_count uint64
304306 Blkio_delay_total uint64
307+ Blkio_delay_max uint64
308+ Blkio_delay_min uint64
305309 Swapin_count uint64
306310 Swapin_delay_total uint64
311+ Swapin_delay_max uint64
312+ Swapin_delay_min uint64
307313 Cpu_run_real_total uint64
308314 Cpu_run_virtual_total uint64
309315 Ac_comm [32]int8
@@ -338,19 +344,29 @@ type Taskstats struct {
338344 Cpu_scaled_run_real_total uint64
339345 Freepages_count uint64
340346 Freepages_delay_total uint64
347+ Freepages_delay_max uint64
348+ Freepages_delay_min uint64
341349 Thrashing_count uint64
342350 Thrashing_delay_total uint64
351+ Thrashing_delay_max uint64
352+ Thrashing_delay_min uint64
343353 Ac_btime64 uint64
344354 Compact_count uint64
345355 Compact_delay_total uint64
356+ Compact_delay_max uint64
357+ Compact_delay_min uint64
346358 Ac_tgid uint32
347359 Ac_tgetime uint64
348360 Ac_exe_dev uint64
349361 Ac_exe_inode uint64
350362 Wpcopy_count uint64
351363 Wpcopy_delay_total uint64
364+ Wpcopy_delay_max uint64
365+ Wpcopy_delay_min uint64
352366 Irq_count uint64
353367 Irq_delay_total uint64
368+ Irq_delay_max uint64
369+ Irq_delay_min uint64
354370}
355371
356372type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_arm.go+16
@@ -276,10 +276,16 @@ type Taskstats struct {
276276 _ [4]byte
277277 Cpu_count uint64
278278 Cpu_delay_total uint64
279+ Cpu_delay_max uint64
280+ Cpu_delay_min uint64
279281 Blkio_count uint64
280282 Blkio_delay_total uint64
283+ Blkio_delay_max uint64
284+ Blkio_delay_min uint64
281285 Swapin_count uint64
282286 Swapin_delay_total uint64
287+ Swapin_delay_max uint64
288+ Swapin_delay_min uint64
283289 Cpu_run_real_total uint64
284290 Cpu_run_virtual_total uint64
285291 Ac_comm [32]uint8
@@ -315,11 +321,17 @@ type Taskstats struct {
315321 Cpu_scaled_run_real_total uint64
316322 Freepages_count uint64
317323 Freepages_delay_total uint64
324+ Freepages_delay_max uint64
325+ Freepages_delay_min uint64
318326 Thrashing_count uint64
319327 Thrashing_delay_total uint64
328+ Thrashing_delay_max uint64
329+ Thrashing_delay_min uint64
320330 Ac_btime64 uint64
321331 Compact_count uint64
322332 Compact_delay_total uint64
333+ Compact_delay_max uint64
334+ Compact_delay_min uint64
323335 Ac_tgid uint32
324336 _ [4]byte
325337 Ac_tgetime uint64
@@ -327,8 +339,12 @@ type Taskstats struct {
327339 Ac_exe_inode uint64
328340 Wpcopy_count uint64
329341 Wpcopy_delay_total uint64
342+ Wpcopy_delay_max uint64
343+ Wpcopy_delay_min uint64
330344 Irq_count uint64
331345 Irq_delay_total uint64
346+ Irq_delay_max uint64
347+ Irq_delay_min uint64
332348}
333349
334350type cpuMask uint32
vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go+16
@@ -279,10 +279,16 @@ type Taskstats struct {
279279 Ac_nice uint8
280280 Cpu_count uint64
281281 Cpu_delay_total uint64
282+ Cpu_delay_max uint64
283+ Cpu_delay_min uint64
282284 Blkio_count uint64
283285 Blkio_delay_total uint64
286+ Blkio_delay_max uint64
287+ Blkio_delay_min uint64
284288 Swapin_count uint64
285289 Swapin_delay_total uint64
290+ Swapin_delay_max uint64
291+ Swapin_delay_min uint64
286292 Cpu_run_real_total uint64
287293 Cpu_run_virtual_total uint64
288294 Ac_comm [32]int8
@@ -317,19 +323,29 @@ type Taskstats struct {
317323 Cpu_scaled_run_real_total uint64
318324 Freepages_count uint64
319325 Freepages_delay_total uint64
326+ Freepages_delay_max uint64
327+ Freepages_delay_min uint64
320328 Thrashing_count uint64
321329 Thrashing_delay_total uint64
330+ Thrashing_delay_max uint64
331+ Thrashing_delay_min uint64
322332 Ac_btime64 uint64
323333 Compact_count uint64
324334 Compact_delay_total uint64
335+ Compact_delay_max uint64
336+ Compact_delay_min uint64
325337 Ac_tgid uint32
326338 Ac_tgetime uint64
327339 Ac_exe_dev uint64
328340 Ac_exe_inode uint64
329341 Wpcopy_count uint64
330342 Wpcopy_delay_total uint64
343+ Wpcopy_delay_max uint64
344+ Wpcopy_delay_min uint64
331345 Irq_count uint64
332346 Irq_delay_total uint64
347+ Irq_delay_max uint64
348+ Irq_delay_min uint64
333349}
334350
335351type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go+16
@@ -280,10 +280,16 @@ type Taskstats struct {
280280 Ac_nice uint8
281281 Cpu_count uint64
282282 Cpu_delay_total uint64
283+ Cpu_delay_max uint64
284+ Cpu_delay_min uint64
283285 Blkio_count uint64
284286 Blkio_delay_total uint64
287+ Blkio_delay_max uint64
288+ Blkio_delay_min uint64
285289 Swapin_count uint64
286290 Swapin_delay_total uint64
291+ Swapin_delay_max uint64
292+ Swapin_delay_min uint64
287293 Cpu_run_real_total uint64
288294 Cpu_run_virtual_total uint64
289295 Ac_comm [32]int8
@@ -318,19 +324,29 @@ type Taskstats struct {
318324 Cpu_scaled_run_real_total uint64
319325 Freepages_count uint64
320326 Freepages_delay_total uint64
327+ Freepages_delay_max uint64
328+ Freepages_delay_min uint64
321329 Thrashing_count uint64
322330 Thrashing_delay_total uint64
331+ Thrashing_delay_max uint64
332+ Thrashing_delay_min uint64
323333 Ac_btime64 uint64
324334 Compact_count uint64
325335 Compact_delay_total uint64
336+ Compact_delay_max uint64
337+ Compact_delay_min uint64
326338 Ac_tgid uint32
327339 Ac_tgetime uint64
328340 Ac_exe_dev uint64
329341 Ac_exe_inode uint64
330342 Wpcopy_count uint64
331343 Wpcopy_delay_total uint64
344+ Wpcopy_delay_max uint64
345+ Wpcopy_delay_min uint64
332346 Irq_count uint64
333347 Irq_delay_total uint64
348+ Irq_delay_max uint64
349+ Irq_delay_min uint64
334350}
335351
336352type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_mips.go+16
@@ -281,10 +281,16 @@ type Taskstats struct {
281281 _ [4]byte
282282 Cpu_count uint64
283283 Cpu_delay_total uint64
284+ Cpu_delay_max uint64
285+ Cpu_delay_min uint64
284286 Blkio_count uint64
285287 Blkio_delay_total uint64
288+ Blkio_delay_max uint64
289+ Blkio_delay_min uint64
286290 Swapin_count uint64
287291 Swapin_delay_total uint64
292+ Swapin_delay_max uint64
293+ Swapin_delay_min uint64
288294 Cpu_run_real_total uint64
289295 Cpu_run_virtual_total uint64
290296 Ac_comm [32]int8
@@ -320,11 +326,17 @@ type Taskstats struct {
320326 Cpu_scaled_run_real_total uint64
321327 Freepages_count uint64
322328 Freepages_delay_total uint64
329+ Freepages_delay_max uint64
330+ Freepages_delay_min uint64
323331 Thrashing_count uint64
324332 Thrashing_delay_total uint64
333+ Thrashing_delay_max uint64
334+ Thrashing_delay_min uint64
325335 Ac_btime64 uint64
326336 Compact_count uint64
327337 Compact_delay_total uint64
338+ Compact_delay_max uint64
339+ Compact_delay_min uint64
328340 Ac_tgid uint32
329341 _ [4]byte
330342 Ac_tgetime uint64
@@ -332,8 +344,12 @@ type Taskstats struct {
332344 Ac_exe_inode uint64
333345 Wpcopy_count uint64
334346 Wpcopy_delay_total uint64
347+ Wpcopy_delay_max uint64
348+ Wpcopy_delay_min uint64
335349 Irq_count uint64
336350 Irq_delay_total uint64
351+ Irq_delay_max uint64
352+ Irq_delay_min uint64
337353}
338354
339355type cpuMask uint32
vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go+16
@@ -282,10 +282,16 @@ type Taskstats struct {
282282 Ac_nice uint8
283283 Cpu_count uint64
284284 Cpu_delay_total uint64
285+ Cpu_delay_max uint64
286+ Cpu_delay_min uint64
285287 Blkio_count uint64
286288 Blkio_delay_total uint64
289+ Blkio_delay_max uint64
290+ Blkio_delay_min uint64
287291 Swapin_count uint64
288292 Swapin_delay_total uint64
293+ Swapin_delay_max uint64
294+ Swapin_delay_min uint64
289295 Cpu_run_real_total uint64
290296 Cpu_run_virtual_total uint64
291297 Ac_comm [32]int8
@@ -320,19 +326,29 @@ type Taskstats struct {
320326 Cpu_scaled_run_real_total uint64
321327 Freepages_count uint64
322328 Freepages_delay_total uint64
329+ Freepages_delay_max uint64
330+ Freepages_delay_min uint64
323331 Thrashing_count uint64
324332 Thrashing_delay_total uint64
333+ Thrashing_delay_max uint64
334+ Thrashing_delay_min uint64
325335 Ac_btime64 uint64
326336 Compact_count uint64
327337 Compact_delay_total uint64
338+ Compact_delay_max uint64
339+ Compact_delay_min uint64
328340 Ac_tgid uint32
329341 Ac_tgetime uint64
330342 Ac_exe_dev uint64
331343 Ac_exe_inode uint64
332344 Wpcopy_count uint64
333345 Wpcopy_delay_total uint64
346+ Wpcopy_delay_max uint64
347+ Wpcopy_delay_min uint64
334348 Irq_count uint64
335349 Irq_delay_total uint64
350+ Irq_delay_max uint64
351+ Irq_delay_min uint64
336352}
337353
338354type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go+16
@@ -282,10 +282,16 @@ type Taskstats struct {
282282 Ac_nice uint8
283283 Cpu_count uint64
284284 Cpu_delay_total uint64
285+ Cpu_delay_max uint64
286+ Cpu_delay_min uint64
285287 Blkio_count uint64
286288 Blkio_delay_total uint64
289+ Blkio_delay_max uint64
290+ Blkio_delay_min uint64
287291 Swapin_count uint64
288292 Swapin_delay_total uint64
293+ Swapin_delay_max uint64
294+ Swapin_delay_min uint64
289295 Cpu_run_real_total uint64
290296 Cpu_run_virtual_total uint64
291297 Ac_comm [32]int8
@@ -320,19 +326,29 @@ type Taskstats struct {
320326 Cpu_scaled_run_real_total uint64
321327 Freepages_count uint64
322328 Freepages_delay_total uint64
329+ Freepages_delay_max uint64
330+ Freepages_delay_min uint64
323331 Thrashing_count uint64
324332 Thrashing_delay_total uint64
333+ Thrashing_delay_max uint64
334+ Thrashing_delay_min uint64
325335 Ac_btime64 uint64
326336 Compact_count uint64
327337 Compact_delay_total uint64
338+ Compact_delay_max uint64
339+ Compact_delay_min uint64
328340 Ac_tgid uint32
329341 Ac_tgetime uint64
330342 Ac_exe_dev uint64
331343 Ac_exe_inode uint64
332344 Wpcopy_count uint64
333345 Wpcopy_delay_total uint64
346+ Wpcopy_delay_max uint64
347+ Wpcopy_delay_min uint64
334348 Irq_count uint64
335349 Irq_delay_total uint64
350+ Irq_delay_max uint64
351+ Irq_delay_min uint64
336352}
337353
338354type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go+16
@@ -281,10 +281,16 @@ type Taskstats struct {
281281 _ [4]byte
282282 Cpu_count uint64
283283 Cpu_delay_total uint64
284+ Cpu_delay_max uint64
285+ Cpu_delay_min uint64
284286 Blkio_count uint64
285287 Blkio_delay_total uint64
288+ Blkio_delay_max uint64
289+ Blkio_delay_min uint64
286290 Swapin_count uint64
287291 Swapin_delay_total uint64
292+ Swapin_delay_max uint64
293+ Swapin_delay_min uint64
288294 Cpu_run_real_total uint64
289295 Cpu_run_virtual_total uint64
290296 Ac_comm [32]int8
@@ -320,11 +326,17 @@ type Taskstats struct {
320326 Cpu_scaled_run_real_total uint64
321327 Freepages_count uint64
322328 Freepages_delay_total uint64
329+ Freepages_delay_max uint64
330+ Freepages_delay_min uint64
323331 Thrashing_count uint64
324332 Thrashing_delay_total uint64
333+ Thrashing_delay_max uint64
334+ Thrashing_delay_min uint64
325335 Ac_btime64 uint64
326336 Compact_count uint64
327337 Compact_delay_total uint64
338+ Compact_delay_max uint64
339+ Compact_delay_min uint64
328340 Ac_tgid uint32
329341 _ [4]byte
330342 Ac_tgetime uint64
@@ -332,8 +344,12 @@ type Taskstats struct {
332344 Ac_exe_inode uint64
333345 Wpcopy_count uint64
334346 Wpcopy_delay_total uint64
347+ Wpcopy_delay_max uint64
348+ Wpcopy_delay_min uint64
335349 Irq_count uint64
336350 Irq_delay_total uint64
351+ Irq_delay_max uint64
352+ Irq_delay_min uint64
337353}
338354
339355type cpuMask uint32
vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go+16
@@ -288,10 +288,16 @@ type Taskstats struct {
288288 _ [4]byte
289289 Cpu_count uint64
290290 Cpu_delay_total uint64
291+ Cpu_delay_max uint64
292+ Cpu_delay_min uint64
291293 Blkio_count uint64
292294 Blkio_delay_total uint64
295+ Blkio_delay_max uint64
296+ Blkio_delay_min uint64
293297 Swapin_count uint64
294298 Swapin_delay_total uint64
299+ Swapin_delay_max uint64
300+ Swapin_delay_min uint64
295301 Cpu_run_real_total uint64
296302 Cpu_run_virtual_total uint64
297303 Ac_comm [32]uint8
@@ -327,11 +333,17 @@ type Taskstats struct {
327333 Cpu_scaled_run_real_total uint64
328334 Freepages_count uint64
329335 Freepages_delay_total uint64
336+ Freepages_delay_max uint64
337+ Freepages_delay_min uint64
330338 Thrashing_count uint64
331339 Thrashing_delay_total uint64
340+ Thrashing_delay_max uint64
341+ Thrashing_delay_min uint64
332342 Ac_btime64 uint64
333343 Compact_count uint64
334344 Compact_delay_total uint64
345+ Compact_delay_max uint64
346+ Compact_delay_min uint64
335347 Ac_tgid uint32
336348 _ [4]byte
337349 Ac_tgetime uint64
@@ -339,8 +351,12 @@ type Taskstats struct {
339351 Ac_exe_inode uint64
340352 Wpcopy_count uint64
341353 Wpcopy_delay_total uint64
354+ Wpcopy_delay_max uint64
355+ Wpcopy_delay_min uint64
342356 Irq_count uint64
343357 Irq_delay_total uint64
358+ Irq_delay_max uint64
359+ Irq_delay_min uint64
344360}
345361
346362type cpuMask uint32
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go+16
@@ -289,10 +289,16 @@ type Taskstats struct {
289289 Ac_nice uint8
290290 Cpu_count uint64
291291 Cpu_delay_total uint64
292+ Cpu_delay_max uint64
293+ Cpu_delay_min uint64
292294 Blkio_count uint64
293295 Blkio_delay_total uint64
296+ Blkio_delay_max uint64
297+ Blkio_delay_min uint64
294298 Swapin_count uint64
295299 Swapin_delay_total uint64
300+ Swapin_delay_max uint64
301+ Swapin_delay_min uint64
296302 Cpu_run_real_total uint64
297303 Cpu_run_virtual_total uint64
298304 Ac_comm [32]uint8
@@ -327,19 +333,29 @@ type Taskstats struct {
327333 Cpu_scaled_run_real_total uint64
328334 Freepages_count uint64
329335 Freepages_delay_total uint64
336+ Freepages_delay_max uint64
337+ Freepages_delay_min uint64
330338 Thrashing_count uint64
331339 Thrashing_delay_total uint64
340+ Thrashing_delay_max uint64
341+ Thrashing_delay_min uint64
332342 Ac_btime64 uint64
333343 Compact_count uint64
334344 Compact_delay_total uint64
345+ Compact_delay_max uint64
346+ Compact_delay_min uint64
335347 Ac_tgid uint32
336348 Ac_tgetime uint64
337349 Ac_exe_dev uint64
338350 Ac_exe_inode uint64
339351 Wpcopy_count uint64
340352 Wpcopy_delay_total uint64
353+ Wpcopy_delay_max uint64
354+ Wpcopy_delay_min uint64
341355 Irq_count uint64
342356 Irq_delay_total uint64
357+ Irq_delay_max uint64
358+ Irq_delay_min uint64
343359}
344360
345361type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go+16
@@ -289,10 +289,16 @@ type Taskstats struct {
289289 Ac_nice uint8
290290 Cpu_count uint64
291291 Cpu_delay_total uint64
292+ Cpu_delay_max uint64
293+ Cpu_delay_min uint64
292294 Blkio_count uint64
293295 Blkio_delay_total uint64
296+ Blkio_delay_max uint64
297+ Blkio_delay_min uint64
294298 Swapin_count uint64
295299 Swapin_delay_total uint64
300+ Swapin_delay_max uint64
301+ Swapin_delay_min uint64
296302 Cpu_run_real_total uint64
297303 Cpu_run_virtual_total uint64
298304 Ac_comm [32]uint8
@@ -327,19 +333,29 @@ type Taskstats struct {
327333 Cpu_scaled_run_real_total uint64
328334 Freepages_count uint64
329335 Freepages_delay_total uint64
336+ Freepages_delay_max uint64
337+ Freepages_delay_min uint64
330338 Thrashing_count uint64
331339 Thrashing_delay_total uint64
340+ Thrashing_delay_max uint64
341+ Thrashing_delay_min uint64
332342 Ac_btime64 uint64
333343 Compact_count uint64
334344 Compact_delay_total uint64
345+ Compact_delay_max uint64
346+ Compact_delay_min uint64
335347 Ac_tgid uint32
336348 Ac_tgetime uint64
337349 Ac_exe_dev uint64
338350 Ac_exe_inode uint64
339351 Wpcopy_count uint64
340352 Wpcopy_delay_total uint64
353+ Wpcopy_delay_max uint64
354+ Wpcopy_delay_min uint64
341355 Irq_count uint64
342356 Irq_delay_total uint64
357+ Irq_delay_max uint64
358+ Irq_delay_min uint64
343359}
344360
345361type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go+16
@@ -307,10 +307,16 @@ type Taskstats struct {
307307 Ac_nice uint8
308308 Cpu_count uint64
309309 Cpu_delay_total uint64
310+ Cpu_delay_max uint64
311+ Cpu_delay_min uint64
310312 Blkio_count uint64
311313 Blkio_delay_total uint64
314+ Blkio_delay_max uint64
315+ Blkio_delay_min uint64
312316 Swapin_count uint64
313317 Swapin_delay_total uint64
318+ Swapin_delay_max uint64
319+ Swapin_delay_min uint64
314320 Cpu_run_real_total uint64
315321 Cpu_run_virtual_total uint64
316322 Ac_comm [32]uint8
@@ -345,19 +351,29 @@ type Taskstats struct {
345351 Cpu_scaled_run_real_total uint64
346352 Freepages_count uint64
347353 Freepages_delay_total uint64
354+ Freepages_delay_max uint64
355+ Freepages_delay_min uint64
348356 Thrashing_count uint64
349357 Thrashing_delay_total uint64
358+ Thrashing_delay_max uint64
359+ Thrashing_delay_min uint64
350360 Ac_btime64 uint64
351361 Compact_count uint64
352362 Compact_delay_total uint64
363+ Compact_delay_max uint64
364+ Compact_delay_min uint64
353365 Ac_tgid uint32
354366 Ac_tgetime uint64
355367 Ac_exe_dev uint64
356368 Ac_exe_inode uint64
357369 Wpcopy_count uint64
358370 Wpcopy_delay_total uint64
371+ Wpcopy_delay_max uint64
372+ Wpcopy_delay_min uint64
359373 Irq_count uint64
360374 Irq_delay_total uint64
375+ Irq_delay_max uint64
376+ Irq_delay_min uint64
361377}
362378
363379type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go+16
@@ -302,10 +302,16 @@ type Taskstats struct {
302302 Ac_nice uint8
303303 Cpu_count uint64
304304 Cpu_delay_total uint64
305+ Cpu_delay_max uint64
306+ Cpu_delay_min uint64
305307 Blkio_count uint64
306308 Blkio_delay_total uint64
309+ Blkio_delay_max uint64
310+ Blkio_delay_min uint64
307311 Swapin_count uint64
308312 Swapin_delay_total uint64
313+ Swapin_delay_max uint64
314+ Swapin_delay_min uint64
309315 Cpu_run_real_total uint64
310316 Cpu_run_virtual_total uint64
311317 Ac_comm [32]int8
@@ -340,19 +346,29 @@ type Taskstats struct {
340346 Cpu_scaled_run_real_total uint64
341347 Freepages_count uint64
342348 Freepages_delay_total uint64
349+ Freepages_delay_max uint64
350+ Freepages_delay_min uint64
343351 Thrashing_count uint64
344352 Thrashing_delay_total uint64
353+ Thrashing_delay_max uint64
354+ Thrashing_delay_min uint64
345355 Ac_btime64 uint64
346356 Compact_count uint64
347357 Compact_delay_total uint64
358+ Compact_delay_max uint64
359+ Compact_delay_min uint64
348360 Ac_tgid uint32
349361 Ac_tgetime uint64
350362 Ac_exe_dev uint64
351363 Ac_exe_inode uint64
352364 Wpcopy_count uint64
353365 Wpcopy_delay_total uint64
366+ Wpcopy_delay_max uint64
367+ Wpcopy_delay_min uint64
354368 Irq_count uint64
355369 Irq_delay_total uint64
370+ Irq_delay_max uint64
371+ Irq_delay_min uint64
356372}
357373
358374type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go+16
@@ -284,10 +284,16 @@ type Taskstats struct {
284284 Ac_nice uint8
285285 Cpu_count uint64
286286 Cpu_delay_total uint64
287+ Cpu_delay_max uint64
288+ Cpu_delay_min uint64
287289 Blkio_count uint64
288290 Blkio_delay_total uint64
291+ Blkio_delay_max uint64
292+ Blkio_delay_min uint64
289293 Swapin_count uint64
290294 Swapin_delay_total uint64
295+ Swapin_delay_max uint64
296+ Swapin_delay_min uint64
291297 Cpu_run_real_total uint64
292298 Cpu_run_virtual_total uint64
293299 Ac_comm [32]int8
@@ -322,19 +328,29 @@ type Taskstats struct {
322328 Cpu_scaled_run_real_total uint64
323329 Freepages_count uint64
324330 Freepages_delay_total uint64
331+ Freepages_delay_max uint64
332+ Freepages_delay_min uint64
325333 Thrashing_count uint64
326334 Thrashing_delay_total uint64
335+ Thrashing_delay_max uint64
336+ Thrashing_delay_min uint64
327337 Ac_btime64 uint64
328338 Compact_count uint64
329339 Compact_delay_total uint64
340+ Compact_delay_max uint64
341+ Compact_delay_min uint64
330342 Ac_tgid uint32
331343 Ac_tgetime uint64
332344 Ac_exe_dev uint64
333345 Ac_exe_inode uint64
334346 Wpcopy_count uint64
335347 Wpcopy_delay_total uint64
348+ Wpcopy_delay_max uint64
349+ Wpcopy_delay_min uint64
336350 Irq_count uint64
337351 Irq_delay_total uint64
352+ Irq_delay_max uint64
353+ Irq_delay_min uint64
338354}
339355
340356type cpuMask uint64
vendor/modules.txt+7−8
@@ -229,7 +229,6 @@ github.com/aymanbagabas/go-osc52/v2
229229## explicit; go 1.23
230230github.com/aymanbagabas/go-udiff
231231github.com/aymanbagabas/go-udiff/lcs
232−github.com/aymanbagabas/go-udiff/myers
233232# github.com/aymerick/douceur v0.2.0
234233## explicit
235234github.com/aymerick/douceur/css
@@ -254,7 +253,7 @@ github.com/charmbracelet/bubbles/v2/spinner
254253github.com/charmbracelet/bubbles/v2/textarea
255254github.com/charmbracelet/bubbles/v2/textinput
256255github.com/charmbracelet/bubbles/v2/viewport
257−# github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.1 => github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250710185017-3c0ffd25e595
256+# github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.1 => github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250716142813-5d1379f56ba2
258257## explicit; go 1.24.0
259258github.com/charmbracelet/bubbletea/v2
260259# github.com/charmbracelet/colorprofile v0.3.1
@@ -269,7 +268,7 @@ github.com/charmbracelet/glamour/v2
269268github.com/charmbracelet/glamour/v2/ansi
270269github.com/charmbracelet/glamour/v2/internal/autolink
271270github.com/charmbracelet/glamour/v2/styles
272−# github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.3 => github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250710185058-03664cb9cecb
271+# github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.3 => github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250716143013-48f34cb75679
273272## explicit; go 1.24.2
274273github.com/charmbracelet/lipgloss/v2
275274github.com/charmbracelet/lipgloss/v2/table
@@ -277,7 +276,7 @@ github.com/charmbracelet/lipgloss/v2/tree
277276# github.com/charmbracelet/log/v2 v2.0.0-20250226163916-c379e29ff706
278277## explicit; go 1.19
279278github.com/charmbracelet/log/v2
280−# github.com/charmbracelet/ultraviolet v0.0.0-20250708152637-0fe0235c8db9
279+# github.com/charmbracelet/ultraviolet v0.0.0-20250716141307-2fae2b322afb
281280## explicit; go 1.24.0
282281github.com/charmbracelet/ultraviolet
283282# github.com/charmbracelet/x/ansi v0.9.3
@@ -682,10 +681,10 @@ golang.org/x/net/idna
682681golang.org/x/net/internal/httpcommon
683682golang.org/x/net/internal/timeseries
684683golang.org/x/net/trace
685−# golang.org/x/sync v0.15.0
684+# golang.org/x/sync v0.16.0
686685## explicit; go 1.23.0
687686golang.org/x/sync/errgroup
688−# golang.org/x/sys v0.33.0
687+# golang.org/x/sys v0.34.0
689688## explicit; go 1.23.0
690689golang.org/x/sys/cpu
691690golang.org/x/sys/plan9
@@ -838,5 +837,5 @@ mvdan.cc/sh/v3/fileutil
838837mvdan.cc/sh/v3/interp
839838mvdan.cc/sh/v3/pattern
840839mvdan.cc/sh/v3/syntax
841−# github.com/charmbracelet/bubbletea/v2 => github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250710185017-3c0ffd25e595
842−# github.com/charmbracelet/lipgloss/v2 => github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250710185058-03664cb9cecb
840+# github.com/charmbracelet/bubbletea/v2 => github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250716142813-5d1379f56ba2
841+# github.com/charmbracelet/lipgloss/v2 => github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250716143013-48f34cb75679