on main help sign in
Merge remote-tracking branch 'origin/main' into crush-thinking
596128aKujtim Hoxha
README.md+22
@@ -78,6 +78,28 @@ Crush can use LSPs for additional context to help inform its decisions, just lik
78}
78}
79```
79```
80
80
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+
81### OpenAI-Compatible APIs
103### OpenAI-Compatible APIs
82
104
83Crush 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.
105Crush 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 @@
1package cmd
1package cmd
2
2
3import (
3import (
4− "bufio"
4+ "context"
5 "encoding/json"
5 "encoding/json"
6 "fmt"
6 "fmt"
7 "io"
7 "io"
8 "os"
8 "os"
9 "path/filepath"
9 "path/filepath"
10 "slices"
10 "slices"
11− "strings"
12 "time"
11 "time"
13
12
14 "github.com/charmbracelet/crush/internal/config"
13 "github.com/charmbracelet/crush/internal/config"
@@ -17,6 +16,8 @@ import (
17 "github.com/spf13/cobra"
16 "github.com/spf13/cobra"
18)
17)
19
18
19+const defaultTailLines = 1000
20+
20var logsCmd = &cobra.Command{
21var logsCmd = &cobra.Command{
21 Use: "logs",
22 Use: "logs",
22 Short: "View crush logs",
23 Short: "View crush logs",
@@ -38,7 +39,6 @@ var logsCmd = &cobra.Command{
38 }
39 }
39
40
40 log.SetLevel(log.DebugLevel)
41 log.SetLevel(log.DebugLevel)
41− // Configure log to output to stdout instead of stderr
42 log.SetOutput(os.Stdout)
42 log.SetOutput(os.Stdout)
43
43
44 cfg, err := config.Load(cwd, false)
44 cfg, err := config.Load(cwd, false)
@@ -53,104 +53,114 @@ var logsCmd = &cobra.Command{
53 }
53 }
54
54
55 if follow {
55 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)
56+ return followLogs(cmd.Context(), 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− }
97 }
57 }
98
58
99− return nil
59+ return showLogs(logsFile, tailLines)
100 },
60 },
101}
61}
102
62
103func init() {
63func init() {
104 logsCmd.Flags().BoolP("follow", "f", false, "Follow log output")
64 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")
106 rootCmd.AddCommand(logsCmd)
66 rootCmd.AddCommand(logsCmd)
107}
67}
108
68
109−// readLastNLines reads the last N lines from a file using a simple circular buffer approach
69+func followLogs(ctx context.Context, logsFile string, tailLines int) error {
110−func readLastNLines(filename string, n int) ([]string, error) {
70+ t, err := tail.TailFile(logsFile, tail.Config{
111− file, err := os.Open(filename)
71+ Follow: false,
72+ ReOpen: false,
73+ Logger: tail.DiscardingLogger,
74+ })
112 if err != nil {
75 if err != nil {
113− return nil, err
76+ return fmt.Errorf("failed to tail log file: %v", err)
114 }
77 }
115− defer file.Close()
116
78
117− // Use a circular buffer to keep only the last N lines
118− lines := make([]string, n)
79+ var lines []string
119− count := 0
80+ lineCount := 0
120− index := 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()
121
114
122− reader := bufio.NewReader(file)
123 for {
115 for {
124− line, err := reader.ReadString('\n')
116+ select {
117+ case line := <-t.Lines:
125− if err != nil {
118+ if line.Err != nil {
126− if err == io.EOF && line != "" {
119+ continue
127− // Handle last line without newline
120+ }
128− line = strings.TrimSuffix(line, "\n")
121+ printLogLine(line.Text)
129− lines[index] = line
122+ case <-ctx.Done():
130− count++
123+ return nil
131− index = (index + 1) % n
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:]
132 }
151 }
133− break
134 }
152 }
135− // Remove trailing newline
136− line = strings.TrimSuffix(line, "\n")
137− lines[index] = line
138− count++
139− index = (index + 1) % n
140 }
153 }
141
154
142− // Extract the last N lines in correct order
155+ for _, line := range lines {
143− if count <= n {
156+ printLogLine(line)
144− // We have fewer lines than requested, return them all
145− return lines[:count], nil
146 }
157 }
147
158
148− // We have more lines than requested, extract from circular buffer
159+ if len(lines) == tailLines {
149− result := make([]string, n)
160+ fmt.Fprintf(os.Stderr, "\nShowing last %d lines. Full logs available at: %s\n", tailLines, logsFile)
150− for i := range n {
151− result[i] = lines[(index+i)%n]
152 }
161 }
162+
153− return result, nil
163+ return nil
154}
164}
155
165
156func printLogLine(lineText string) {
166func printLogLine(lineText string) {
cmd/root.go−20
@@ -6,14 +6,11 @@ import (
6 "io"
6 "io"
7 "log/slog"
7 "log/slog"
8 "os"
8 "os"
9− "time"
10
9
11 tea "github.com/charmbracelet/bubbletea/v2"
10 tea "github.com/charmbracelet/bubbletea/v2"
12 "github.com/charmbracelet/crush/internal/app"
11 "github.com/charmbracelet/crush/internal/app"
13 "github.com/charmbracelet/crush/internal/config"
12 "github.com/charmbracelet/crush/internal/config"
14 "github.com/charmbracelet/crush/internal/db"
13 "github.com/charmbracelet/crush/internal/db"
15− "github.com/charmbracelet/crush/internal/llm/agent"
16− "github.com/charmbracelet/crush/internal/log"
17 "github.com/charmbracelet/crush/internal/tui"
14 "github.com/charmbracelet/crush/internal/tui"
18 "github.com/charmbracelet/crush/internal/version"
15 "github.com/charmbracelet/crush/internal/version"
19 "github.com/charmbracelet/fang"
16 "github.com/charmbracelet/fang"
@@ -92,9 +89,6 @@ to assist developers in writing, debugging, and understanding code directly from
92 }
89 }
93 defer app.Shutdown()
90 defer app.Shutdown()
94
91
95− // Initialize MCP tools early for both modes
96− initMCPTools(ctx, app, cfg)
97−
98 prompt, err = maybePrependStdin(prompt)
92 prompt, err = maybePrependStdin(prompt)
99 if err != nil {
93 if err != nil {
100 slog.Error(fmt.Sprintf("Failed to read from stdin: %v", err))
94 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
126 },
120 },
127}
121}
128
122
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−
143func Execute() {
123func Execute() {
144 if err := fang.Execute(
124 if err := fang.Execute(
145 context.Background(),
125 context.Background(),
go.mod+5−5
@@ -2,9 +2,9 @@ module github.com/charmbracelet/crush
2
2
3go 1.24.3
3go 1.24.3
4
4
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
6
6
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
8
8
9require (
9require (
10 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0
10 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0
@@ -75,7 +75,7 @@ require (
75 github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
75 github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
76 github.com/aymerick/douceur v0.2.0 // indirect
76 github.com/aymerick/douceur v0.2.0 // indirect
77 github.com/charmbracelet/colorprofile v0.3.1 // indirect
77 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
79 github.com/charmbracelet/x/cellbuf v0.0.14-0.20250516160309-24eee56f89fa // indirect
79 github.com/charmbracelet/x/cellbuf v0.0.14-0.20250516160309-24eee56f89fa // indirect
80 github.com/charmbracelet/x/exp/slice v0.0.0-20250611152503-f53cdd7e01ef
80 github.com/charmbracelet/x/exp/slice v0.0.0-20250611152503-f53cdd7e01ef
81 github.com/charmbracelet/x/term v0.2.1
81 github.com/charmbracelet/x/term v0.2.1
@@ -133,8 +133,8 @@ require (
133 golang.org/x/crypto v0.37.0 // indirect
133 golang.org/x/crypto v0.37.0 // indirect
134 golang.org/x/image v0.26.0 // indirect
134 golang.org/x/image v0.26.0 // indirect
135 golang.org/x/net v0.39.0 // indirect
135 golang.org/x/net v0.39.0 // indirect
136− golang.org/x/sync v0.15.0 // indirect
136+ golang.org/x/sync v0.16.0 // indirect
137− golang.org/x/sys v0.33.0 // indirect
137+ golang.org/x/sys v0.34.0 // indirect
138 golang.org/x/term v0.31.0 // indirect
138 golang.org/x/term v0.31.0 // indirect
139 golang.org/x/text v0.24.0 // indirect
139 golang.org/x/text v0.24.0 // indirect
140 google.golang.org/genai v1.3.0
140 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
70github.com/charlievieth/fastwalk v1.0.11/go.mod h1:yGy1zbxog41ZVMcKA/i8ojXLFsuayX5VvwhQVoj9PBI=
70github.com/charlievieth/fastwalk v1.0.11/go.mod h1:yGy1zbxog41ZVMcKA/i8ojXLFsuayX5VvwhQVoj9PBI=
71github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250710161907-a4c42b579198 h1:CkMS9Ah9ac1Ego5JDC5NJyZyAAqu23Z+O0yDwsa3IxM=
71github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250710161907-a4c42b579198 h1:CkMS9Ah9ac1Ego5JDC5NJyZyAAqu23Z+O0yDwsa3IxM=
72github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250710161907-a4c42b579198/go.mod h1:6HamsBKWqEC/FVHuQMHgQL+knPyvHH55HwJDHl/adMw=
72github.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=
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-20250710185017-3c0ffd25e595/go.mod h1:+Tl7rePElw6OKt382t04zXwtPFoPXxAaJzNrYmtsLds=
74+github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250716142813-5d1379f56ba2/go.mod h1:m240IQxo1/eDQ7klblSzOCAUyc3LddHcV3Rc/YEGAgw=
75github.com/charmbracelet/colorprofile v0.3.1 h1:k8dTHMd7fgw4bnFd7jXTLZrSU/CQrKnL3m+AxCzDz40=
75github.com/charmbracelet/colorprofile v0.3.1 h1:k8dTHMd7fgw4bnFd7jXTLZrSU/CQrKnL3m+AxCzDz40=
76github.com/charmbracelet/colorprofile v0.3.1/go.mod h1:/GkGusxNs8VB/RSOh3fu0TJmQ4ICMMPApIIVn0KszZ0=
76github.com/charmbracelet/colorprofile v0.3.1/go.mod h1:/GkGusxNs8VB/RSOh3fu0TJmQ4ICMMPApIIVn0KszZ0=
77github.com/charmbracelet/fang v0.3.1-0.20250711140230-d5ebb8c1d674 h1:+Cz+VfxD5DO+JT1LlswXWhre0HYLj6l2HW8HVGfMuC0=
77github.com/charmbracelet/fang v0.3.1-0.20250711140230-d5ebb8c1d674 h1:+Cz+VfxD5DO+JT1LlswXWhre0HYLj6l2HW8HVGfMuC0=
78github.com/charmbracelet/fang v0.3.1-0.20250711140230-d5ebb8c1d674/go.mod h1:9gCUAHmVx5BwSafeyNr3GI0GgvlB1WYjL21SkPp1jyU=
78github.com/charmbracelet/fang v0.3.1-0.20250711140230-d5ebb8c1d674/go.mod h1:9gCUAHmVx5BwSafeyNr3GI0GgvlB1WYjL21SkPp1jyU=
79github.com/charmbracelet/glamour/v2 v2.0.0-20250516160903-6f1e2c8f9ebe h1:i6ce4CcAlPpTj2ER69m1DBeLZ3RRcHnKExuwhKa3GfY=
79github.com/charmbracelet/glamour/v2 v2.0.0-20250516160903-6f1e2c8f9ebe h1:i6ce4CcAlPpTj2ER69m1DBeLZ3RRcHnKExuwhKa3GfY=
80github.com/charmbracelet/glamour/v2 v2.0.0-20250516160903-6f1e2c8f9ebe/go.mod h1:p3Q+aN4eQKeM5jhrmXPMgPrlKbmc59rWSnMsSA3udhk=
80github.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=
81+github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250716143013-48f34cb75679 h1:z0og40Sck650PjX51SmiTP8Div2OSugiZJBPZyJInOg=
82−github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250710185058-03664cb9cecb/go.mod h1:wEc/TRrTAIDJYjVCg3+y8WeKaN+F88gpYfGbUuP6W3A=
82+github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250716143013-48f34cb75679/go.mod h1:BXY7j7rZgAprFwzNcO698++5KTd6GKI6lU83Pr4o0r0=
83github.com/charmbracelet/log/v2 v2.0.0-20250226163916-c379e29ff706 h1:WkwO6Ks3mSIGnGuSdKl9qDSyfbYK50z2wc2gGMggegE=
83github.com/charmbracelet/log/v2 v2.0.0-20250226163916-c379e29ff706 h1:WkwO6Ks3mSIGnGuSdKl9qDSyfbYK50z2wc2gGMggegE=
84github.com/charmbracelet/log/v2 v2.0.0-20250226163916-c379e29ff706/go.mod h1:mjJGp00cxcfvD5xdCa+bso251Jt4owrQvuimJtVmEmM=
84github.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=
85+github.com/charmbracelet/ultraviolet v0.0.0-20250716141307-2fae2b322afb h1:fMyaSpuEyPP+uuTu98Wx2S/7OY52uhjF+kYfM5w7x+s=
86−github.com/charmbracelet/ultraviolet v0.0.0-20250708152637-0fe0235c8db9/go.mod h1:/O+B00+dYG6lqRAWIaNxSvywnDrIH6dmLYQAsH0LRTg=
86+github.com/charmbracelet/ultraviolet v0.0.0-20250716141307-2fae2b322afb/go.mod h1:XrrgNFfXLrFAyd9DUmrqVc3yQFVv8Uk+okj4PsNNzpc=
87github.com/charmbracelet/x/ansi v0.9.3 h1:BXt5DHS/MKF+LjuK4huWrC6NCvHtexww7dMayh6GXd0=
87github.com/charmbracelet/x/ansi v0.9.3 h1:BXt5DHS/MKF+LjuK4huWrC6NCvHtexww7dMayh6GXd0=
88github.com/charmbracelet/x/ansi v0.9.3/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE=
88github.com/charmbracelet/x/ansi v0.9.3/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE=
89github.com/charmbracelet/x/cellbuf v0.0.14-0.20250516160309-24eee56f89fa h1:lphz0Z3rsiOtMYiz8axkT24i9yFiueDhJbzyNUADmME=
89github.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=
309golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
309golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
310golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
310golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
311golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
311golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
312−golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
312+golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
313−golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
313+golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
314golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
314golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
315golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
315golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
316golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
316golang.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=
325golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
325golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
326golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
326golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
327golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
327golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
328−golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
328+golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
329−golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
329+golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
330golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
330golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
331golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
331golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
332golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
332golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
internal/config/config.go+39−6
@@ -6,8 +6,10 @@ import (
6 "slices"
6 "slices"
7 "strings"
7 "strings"
8
8
9+ "github.com/charmbracelet/crush/internal/env"
9 "github.com/charmbracelet/crush/internal/fur/provider"
10 "github.com/charmbracelet/crush/internal/fur/provider"
10 "github.com/tidwall/sjson"
11 "github.com/tidwall/sjson"
12+ "golang.org/x/exp/slog"
11)
13)
12
14
13const (
15const (
@@ -90,12 +92,12 @@ const (
90)
92)
91
93
92type MCPConfig struct {
94type MCPConfig struct {
93− Command string `json:"command,omitempty" `
95+ Command string `json:"command,omitempty" `
94− Env []string `json:"env,omitempty"`
96+ Env map[string]string `json:"env,omitempty"`
95− Args []string `json:"args,omitempty"`
97+ Args []string `json:"args,omitempty"`
96− Type MCPType `json:"type"`
98+ Type MCPType `json:"type"`
97− URL string `json:"url,omitempty"`
99+ URL string `json:"url,omitempty"`
98− Disabled bool `json:"disabled,omitempty"`
100+ Disabled bool `json:"disabled,omitempty"`
99
101
100 // TODO: maybe make it possible to get the value from the env
102 // TODO: maybe make it possible to get the value from the env
101 Headers map[string]string `json:"headers,omitempty"`
103 Headers map[string]string `json:"headers,omitempty"`
@@ -165,6 +167,37 @@ func (l LSPs) Sorted() []LSP {
165 return sorted
167 return sorted
166}
168}
167
169
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+
168type Agent struct {
201type Agent struct {
169 ID string `json:"id,omitempty"`
202 ID string `json:"id,omitempty"`
170 Name string `json:"name,omitempty"`
203 Name string `json:"name,omitempty"`
internal/llm/agent/agent.go+2−2
@@ -94,7 +94,7 @@ func NewAgent(
94) (Service, error) {
94) (Service, error) {
95 ctx := context.Background()
95 ctx := context.Background()
96 cfg := config.Get()
96 cfg := config.Get()
97− otherTools := GetMcpTools(ctx, permissions, cfg)
97+ otherTools := GetMCPTools(ctx, permissions, cfg)
98 if len(lspClients) > 0 {
98 if len(lspClients) > 0 {
99 otherTools = append(otherTools, tools.NewDiagnosticsTool(lspClients))
99 otherTools = append(otherTools, tools.NewDiagnosticsTool(lspClients))
100 }
100 }
@@ -859,7 +859,7 @@ func (a *agent) UpdateModel() error {
859
859
860 // Get current provider configuration
860 // Get current provider configuration
861 currentProviderCfg := cfg.GetProviderForModel(a.agentCfg.Model)
861 currentProviderCfg := cfg.GetProviderForModel(a.agentCfg.Model)
862− if currentProviderCfg.ID == "" {
862+ if currentProviderCfg == nil || currentProviderCfg.ID == "" {
863 return fmt.Errorf("provider for agent %s not found in config", a.agentCfg.Name)
863 return fmt.Errorf("provider for agent %s not found in config", a.agentCfg.Name)
864 }
864 }
865
865
internal/llm/agent/mcp-tools.go+68−47
@@ -5,6 +5,7 @@ import (
5 "encoding/json"
5 "encoding/json"
6 "fmt"
6 "fmt"
7 "log/slog"
7 "log/slog"
8+ "sync"
8
9
9 "github.com/charmbracelet/crush/internal/config"
10 "github.com/charmbracelet/crush/internal/config"
10 "github.com/charmbracelet/crush/internal/llm/tools"
11 "github.com/charmbracelet/crush/internal/llm/tools"
@@ -36,7 +37,7 @@ type MCPClient interface {
36}
37}
37
38
38func (b *mcpTool) Name() string {
39func (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)
40}
41}
41
42
42func (b *mcpTool) Info() tools.ToolInfo {
43func (b *mcpTool) Info() tools.ToolInfo {
@@ -45,7 +46,7 @@ func (b *mcpTool) Info() tools.ToolInfo {
45 required = make([]string, 0)
46 required = make([]string, 0)
46 }
47 }
47 return tools.ToolInfo{
48 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),
49 Description: b.tool.Description,
50 Description: b.tool.Description,
50 Parameters: b.tool.InputSchema.Properties,
51 Parameters: b.tool.InputSchema.Properties,
51 Required: required,
52 Required: required,
@@ -107,14 +108,14 @@ func (b *mcpTool) Run(ctx context.Context, params tools.ToolCall) (tools.ToolRes
107 },
108 },
108 )
109 )
109 if !p {
110 if !p {
110− return tools.NewTextErrorResponse("permission denied"), nil
111+ return tools.ToolResponse{}, permission.ErrorPermissionDenied
111 }
112 }
112
113
113 switch b.mcpConfig.Type {
114 switch b.mcpConfig.Type {
114 case config.MCPStdio:
115 case config.MCPStdio:
115 c, err := client.NewStdioMCPClient(
116 c, err := client.NewStdioMCPClient(
116 b.mcpConfig.Command,
117 b.mcpConfig.Command,
117− b.mcpConfig.Env,
118+ b.mcpConfig.ResolvedEnv(),
118 b.mcpConfig.Args...,
119 b.mcpConfig.Args...,
119 )
120 )
120 if err != nil {
121 if err != nil {
@@ -124,7 +125,7 @@ func (b *mcpTool) Run(ctx context.Context, params tools.ToolCall) (tools.ToolRes
124 case config.MCPHttp:
125 case config.MCPHttp:
125 c, err := client.NewStreamableHttpClient(
126 c, err := client.NewStreamableHttpClient(
126 b.mcpConfig.URL,
127 b.mcpConfig.URL,
127− transport.WithHTTPHeaders(b.mcpConfig.Headers),
128+ transport.WithHTTPHeaders(b.mcpConfig.ResolvedHeaders()),
128 )
129 )
129 if err != nil {
130 if err != nil {
130 return tools.NewTextErrorResponse(err.Error()), nil
131 return tools.NewTextErrorResponse(err.Error()), nil
@@ -133,7 +134,7 @@ func (b *mcpTool) Run(ctx context.Context, params tools.ToolCall) (tools.ToolRes
133 case config.MCPSse:
134 case config.MCPSse:
134 c, err := client.NewSSEMCPClient(
135 c, err := client.NewSSEMCPClient(
135 b.mcpConfig.URL,
136 b.mcpConfig.URL,
136− client.WithHeaders(b.mcpConfig.Headers),
137+ client.WithHeaders(b.mcpConfig.ResolvedHeaders()),
137 )
138 )
138 if err != nil {
139 if err != nil {
139 return tools.NewTextErrorResponse(err.Error()), nil
140 return tools.NewTextErrorResponse(err.Error()), nil
@@ -154,8 +155,6 @@ func NewMcpTool(name string, tool mcp.Tool, permissions permission.Service, mcpC
154 }
155 }
155}
156}
156
157
157−var mcpTools []tools.BaseTool
158−
159func getTools(ctx context.Context, name string, m config.MCPConfig, permissions permission.Service, c MCPClient, workingDir string) []tools.BaseTool {
158func getTools(ctx context.Context, name string, m config.MCPConfig, permissions permission.Service, c MCPClient, workingDir string) []tools.BaseTool {
160 var stdioTools []tools.BaseTool
159 var stdioTools []tools.BaseTool
161 initRequest := mcp.InitializeRequest{}
160 initRequest := mcp.InitializeRequest{}
@@ -183,50 +182,72 @@ func getTools(ctx context.Context, name string, m config.MCPConfig, permissions
183 return stdioTools
182 return stdioTools
184}
183}
185
184
185+var (
186+ mcpToolsOnce sync.Once
187+ mcpTools []tools.BaseTool
188+)
189+
186−func GetMcpTools(ctx context.Context, permissions permission.Service, cfg *config.Config) []tools.BaseTool {
190+func GetMCPTools(ctx context.Context, permissions permission.Service, cfg *config.Config) []tools.BaseTool {
187− if len(mcpTools) > 0 {
191+ mcpToolsOnce.Do(func() {
192+ mcpTools = doGetMCPTools(ctx, permissions, cfg)
193+ })
188− return mcpTools
194+ return mcpTools
189− }
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
190 for name, m := range cfg.MCP {
201 for name, m := range cfg.MCP {
191 if m.Disabled {
202 if m.Disabled {
192 slog.Debug("skipping disabled mcp", "name", name)
203 slog.Debug("skipping disabled mcp", "name", name)
193 continue
204 continue
194 }
205 }
206+ wg.Add(1)
207+ go func(name string, m config.MCPConfig) {
208+ defer wg.Done()
195− switch m.Type {
209+ switch m.Type {
196− case config.MCPStdio:
210+ case config.MCPStdio:
197− c, err := client.NewStdioMCPClient(
211+ c, err := client.NewStdioMCPClient(
198− m.Command,
212+ m.Command,
199− m.Env,
213+ m.ResolvedEnv(),
200− m.Args...,
214+ m.Args...,
201− )
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+ )
202− if err != nil {
241+ if err != nil {
203− slog.Error("error creating mcp client", "error", err)
242+ slog.Error("error creating mcp client", "error", err)
204− continue
243+ return
244+ }
245+ mu.Lock()
246+ result = append(result, getTools(ctx, name, m, permissions, c, cfg.WorkingDir())...)
247+ mu.Unlock()
205 }
248 }
206−
249+ }(name, m)
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− }
229 }
250 }
230−
251+ wg.Wait()
231− return mcpTools
252+ return result
232}
253}
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:
188
188
1894. Create the commit with a message ending with:
1894. Create the commit with a message ending with:
190💘 Generated with Crush
190💘 Generated with Crush
191−Co-Authored-By: Crush <noreply@crush.charm.land>
191+Co-Authored-By: Crush <crush@charm.land>
192
192
193- In order to ensure good formatting, ALWAYS pass the commit message via a HEREDOC, a la this example:
193- In order to ensure good formatting, ALWAYS pass the commit message via a HEREDOC, a la this example:
194<example>
194<example>
@@ -196,7 +196,7 @@ git commit -m "$(cat <<'EOF'
196 Commit message here.
196 Commit message here.
197
197
198 💘 Generated with Crush
198 💘 Generated with Crush
199− Co-Authored-By: 💘 Crush <noreply@crush.charm.land>
199+ Co-Authored-By: 💘 Crush <crush@charm.land>
200 EOF
200 EOF
201 )"
201 )"
202</example>
202</example>
internal/tui/components/chat/messages/renderer.go+30−2
@@ -655,6 +655,7 @@ func joinHeaderBody(header, body string) string {
655
655
656func renderPlainContent(v *toolCallCmp, content string) string {
656func renderPlainContent(v *toolCallCmp, content string) string {
657 t := styles.CurrentTheme()
657 t := styles.CurrentTheme()
658+ content = strings.ReplaceAll(content, "\r\n", "\n") // Normalize line endings
658 content = strings.TrimSpace(content)
659 content = strings.TrimSpace(content)
659 lines := strings.Split(content, "\n")
660 lines := strings.Split(content, "\n")
660
661
@@ -664,6 +665,7 @@ func renderPlainContent(v *toolCallCmp, content string) string {
664 if i >= responseContextHeight {
665 if i >= responseContextHeight {
665 break
666 break
666 }
667 }
668+ ln = escapeContent(ln)
667 ln = " " + ln // left padding
669 ln = " " + ln // left padding
668 if len(ln) > width {
670 if len(ln) > width {
669 ln = v.fit(ln, width)
671 ln = v.fit(ln, width)
@@ -680,6 +682,7 @@ func renderPlainContent(v *toolCallCmp, content string) string {
680 Width(width).
682 Width(width).
681 Render(fmt.Sprintf("… (%d lines)", len(lines)-responseContextHeight)))
683 Render(fmt.Sprintf("… (%d lines)", len(lines)-responseContextHeight)))
682 }
684 }
685+
683 return strings.Join(out, "\n")
686 return strings.Join(out, "\n")
684}
687}
685
688
@@ -694,10 +697,17 @@ func pad(v any, width int) string {
694
697
695func renderCodeContent(v *toolCallCmp, path, content string, offset int) string {
698func renderCodeContent(v *toolCallCmp, path, content string, offset int) string {
696 t := styles.CurrentTheme()
699 t := styles.CurrentTheme()
700+ content = strings.ReplaceAll(content, "\r\n", "\n") // Normalize line endings
701+ content = strings.ReplaceAll(content, "\t", " ") // Replace tabs with spaces
697 truncated := truncateHeight(content, responseContextHeight)
702 truncated := truncateHeight(content, responseContextHeight)
698
703
704+ lines := strings.Split(truncated, "\n")
705+ for i, ln := range lines {
706+ lines[i] = escapeContent(ln)
707+ }
708+
699− highlighted, _ := highlight.SyntaxHighlight(truncated, path, t.BgBase)
709+ highlighted, _ := highlight.SyntaxHighlight(strings.Join(lines, "\n"), path, t.BgBase)
700− lines := strings.Split(highlighted, "\n")
710+ lines = strings.Split(highlighted, "\n")
701
711
702 if len(strings.Split(content, "\n")) > responseContextHeight {
712 if len(strings.Split(content, "\n")) > responseContextHeight {
703 lines = append(lines, t.S().Muted.
713 lines = append(lines, t.S().Muted.
@@ -721,6 +731,7 @@ func renderCodeContent(v *toolCallCmp, path, content string, offset int) string
721 PaddingLeft(1).
731 PaddingLeft(1).
722 Render(v.fit(ln, w-1)))
732 Render(v.fit(ln, w-1)))
723 }
733 }
734+
724 return lipgloss.JoinVertical(lipgloss.Left, lines...)
735 return lipgloss.JoinVertical(lipgloss.Left, lines...)
725}
736}
726
737
@@ -766,3 +777,20 @@ func prettifyToolName(name string) string {
766 return name
777 return name
767 }
778 }
768}
779}
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 {
40 Query() string // Returns the current filter query
40 Query() string // Returns the current filter query
41 KeyMap() KeyMap
41 KeyMap() KeyMap
42 Position() (int, int) // Returns the X and Y position of the completions popup
42 Position() (int, int) // Returns the X and Y position of the completions popup
43+ Width() int
44+ Height() int
43}
45}
44
46
45type completionsCmp struct {
47type completionsCmp struct {
@@ -54,6 +56,8 @@ type completionsCmp struct {
54 query string // The current filter query
56 query string // The current filter query
55}
57}
56
58
59+const maxCompletionsWidth = 80 // Maximum width for the completions popup
60+
57func New() Completions {
61func New() Completions {
58 completionsKeyMap := DefaultKeyMap()
62 completionsKeyMap := DefaultKeyMap()
59 keyMap := list.DefaultKeyMap()
63 keyMap := list.DefaultKeyMap()
@@ -92,7 +96,7 @@ func (c *completionsCmp) Init() tea.Cmd {
92func (c *completionsCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
96func (c *completionsCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
93 switch msg := msg.(type) {
97 switch msg := msg.(type) {
94 case tea.WindowSizeMsg:
98 case tea.WindowSizeMsg:
95− c.width = min(msg.Width-c.x, 80)
99+ c.width = min(msg.Width-c.x, maxCompletionsWidth)
96 c.height = min(msg.Height-c.y, 15)
100 c.height = min(msg.Height-c.y, 15)
97 return c, nil
101 return c, nil
98 case tea.KeyPressMsg:
102 case tea.KeyPressMsg:
@@ -118,10 +122,7 @@ func (c *completionsCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
118 Value: selectedItem,
122 Value: selectedItem,
119 })
123 })
120 case key.Matches(msg, c.keyMap.Cancel):
124 case key.Matches(msg, c.keyMap.Cancel):
121− if c.open {
122− c.open = false
123− return c, util.CmdHandler(CompletionsClosedMsg{})
125+ return c, util.CmdHandler(CloseCompletionsMsg{})
124− }
125 }
126 }
126 case CloseCompletionsMsg:
127 case CloseCompletionsMsg:
127 c.open = false
128 c.open = false
@@ -197,3 +198,11 @@ func (c *completionsCmp) KeyMap() KeyMap {
197func (c *completionsCmp) Position() (int, int) {
198func (c *completionsCmp) Position() (int, int) {
198 return c.x, c.y - c.height
199 return c.x, c.y - c.height
199}
200}
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 {
323 content := pr.Command
323 content := pr.Command
324 t := styles.CurrentTheme()
324 t := styles.CurrentTheme()
325 content = strings.TrimSpace(content)
325 content = strings.TrimSpace(content)
326− content = "\n" + content + "\n"
327 lines := strings.Split(content, "\n")
326 lines := strings.Split(content, "\n")
328
327
329 width := p.width - 4
328 width := p.width - 4
330 var out []string
329 var out []string
331 for _, ln := range lines {
330 for _, ln := range lines {
332− ln = " " + ln // left padding
333− if len(ln) > width {
334− ln = ansi.Truncate(ln, width, "…")
335− }
336 out = append(out, t.S().Muted.
331 out = append(out, t.S().Muted.
337 Width(width).
332 Width(width).
333+ Padding(0, 3).
338 Foreground(t.FgBase).
334 Foreground(t.FgBase).
339 Background(t.BgSubtle).
335 Background(t.BgSubtle).
340 Render(ln))
336 Render(ln))
@@ -344,6 +340,7 @@ func (p *permissionDialogCmp) generateBashContent() string {
344 renderedContent := strings.Join(out, "\n")
340 renderedContent := strings.Join(out, "\n")
345 finalContent := baseStyle.
341 finalContent := baseStyle.
346 Width(p.contentViewPort.Width()).
342 Width(p.contentViewPort.Width()).
343+ Padding(1, 0).
347 Render(renderedContent)
344 Render(renderedContent)
348
345
349 return finalContent
346 return finalContent
@@ -413,13 +410,26 @@ func (p *permissionDialogCmp) generateDefaultContent() string {
413
410
414 content := p.permission.Description
411 content := p.permission.Description
415
412
416− // Use the cache for markdown rendering
413+ content = strings.TrimSpace(content)
417− renderedContent := p.GetOrSetMarkdown(p.permission.ID, func() (string, error) {
414+ content = "\n" + content + "\n"
418− r := styles.GetMarkdownRenderer(p.width - 4)
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).
419− s, err := r.Render(content)
428+ Render(ln))
420− return s, err
421− })
429+ }
422
430
431+ // Use the cache for markdown rendering
432+ renderedContent := strings.Join(out, "\n")
423 finalContent := baseStyle.
433 finalContent := baseStyle.
424 Width(p.contentViewPort.Width()).
434 Width(p.contentViewPort.Width()).
425 Render(renderedContent)
435 Render(renderedContent)
@@ -459,7 +469,11 @@ func (p *permissionDialogCmp) render() string {
459 contentFinal := p.getOrGenerateContent()
469 contentFinal := p.getOrGenerateContent()
460
470
461 // Always set viewport content (the caching is handled in getOrGenerateContent)
471 // Always set viewport content (the caching is handled in getOrGenerateContent)
472+ const minContentHeight = 9
473+ contentHeight := min(
474+ max(minContentHeight, p.height-minContentHeight),
462− contentHeight := min(p.height-9, lipgloss.Height(contentFinal))
475+ lipgloss.Height(contentFinal),
476+ )
463 p.contentViewPort.SetHeight(contentHeight)
477 p.contentViewPort.SetHeight(contentHeight)
464 p.contentViewPort.SetContent(contentFinal)
478 p.contentViewPort.SetContent(contentFinal)
465
479
@@ -529,6 +543,9 @@ func (p *permissionDialogCmp) SetSize() tea.Cmd {
529 // Default to diff split mode when dialog is wide enough.
543 // Default to diff split mode when dialog is wide enough.
530 p.defaultDiffSplitMode = p.width >= 140
544 p.defaultDiffSplitMode = p.width >= 140
531
545
546+ // Set a maximum width for the dialog
547+ p.width = min(p.width, 180)
548+
532 // Mark content as dirty if size changed
549 // Mark content as dirty if size changed
533 if oldWidth != p.width || oldHeight != p.height {
550 if oldWidth != p.width || oldHeight != p.height {
534 p.contentDirty = true
551 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) {
275 return p, p.cancel()
275 return p, p.cancel()
276 }
276 }
277 case key.Matches(msg, p.keyMap.Details):
277 case key.Matches(msg, p.keyMap.Details):
278− p.showDetails()
278+ p.toggleDetails()
279 return p, nil
279 return p, nil
280 }
280 }
281
281
@@ -382,7 +382,7 @@ func (p *chatPage) View() string {
382 Width(p.detailsWidth).
382 Width(p.detailsWidth).
383 Border(lipgloss.RoundedBorder()).
383 Border(lipgloss.RoundedBorder()).
384 BorderForeground(t.BorderFocus)
384 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)
386 details := style.Render(
386 details := style.Render(
387 lipgloss.JoinVertical(
387 lipgloss.JoinVertical(
388 lipgloss.Left,
388 lipgloss.Left,
@@ -446,12 +446,9 @@ func (p *chatPage) setCompactMode(compact bool) {
446 }
446 }
447 p.compact = compact
447 p.compact = compact
448 if compact {
448 if compact {
449− p.compact = true
450 p.sidebar.SetCompactMode(true)
449 p.sidebar.SetCompactMode(true)
451 } else {
450 } else {
452− p.compact = false
451+ p.setShowDetails(false)
453− p.showingDetails = false
454− p.sidebar.SetCompactMode(false)
455 }
452 }
456}
453}
457
454
@@ -558,12 +555,19 @@ func (p *chatPage) cancel() tea.Cmd {
558 return cancelTimerCmd()
555 return cancelTimerCmd()
559}
556}
560
557
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() {
562 if p.session.ID == "" || !p.compact {
567 if p.session.ID == "" || !p.compact {
563 return
568 return
564 }
569 }
565− p.showingDetails = !p.showingDetails
566− p.header.SetDetailsOpen(p.showingDetails)
570+ p.setShowDetails(!p.showingDetails)
567}
571}
568
572
569func (p *chatPage) sendMessage(text string, attachments []message.Attachment) tea.Cmd {
573func (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) {
116 case completions.OpenCompletionsMsg, completions.FilterCompletionsMsg, completions.CloseCompletionsMsg:
116 case completions.OpenCompletionsMsg, completions.FilterCompletionsMsg, completions.CloseCompletionsMsg:
117 u, completionCmd := a.completions.Update(msg)
117 u, completionCmd := a.completions.Update(msg)
118 a.completions = u.(completions.Completions)
118 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+ }
119 return a, completionCmd
129 return a, completionCmd
120
130
121 // Dialog messages
131 // 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 {
320
320
321 // where to read inputs from, this will usually be os.Stdin.
321 // where to read inputs from, this will usually be os.Stdin.
322 input io.Reader
322 input io.Reader
323− mu sync.Mutex
324 // ttyInput is null if input is not a TTY.
323 // ttyInput is null if input is not a TTY.
325 ttyInput term.File
324 ttyInput term.File
326 previousTtyInputState *term.State
325 previousTtyInputState *term.State
327 inputReader *uv.TerminalReader
326 inputReader *uv.TerminalReader
328− traceInput bool // true if input should be traced
329 readLoopDone chan struct{}
327 readLoopDone chan struct{}
330 mouseMode bool // indicates whether we should enable mouse on Windows
328 mouseMode bool // indicates whether we should enable mouse on Windows
331
329
vendor/github.com/charmbracelet/lipgloss/v2/canvas.go+45−14
@@ -1,6 +1,7 @@
1package lipgloss
1package lipgloss
2
2
3import (
3import (
4+ "fmt"
4 "image"
5 "image"
5 "sort"
6 "sort"
6
7
@@ -94,17 +95,14 @@ type Layer struct {
94 zIndex int
95 zIndex int
95 children []*Layer
96 children []*Layer
96 id string
97 id string
97− content string
98+ content uv.Drawable
98}
99}
99
100
100// NewLayer creates a new Layer with the given content. It calculates the size
101// NewLayer creates a new Layer with the given content. It calculates the size
101// based on the widest line and the number of lines in the content.
102// 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) {
103 l = new(Layer)
104 l = new(Layer)
104− l.content = content
105− height := Height(content)
106− width := Width(content)
105+ l.SetContent(content)
107− l.rect = image.Rect(0, 0, width, height)
108 return l
106 return l
109}
107}
110
108
@@ -216,23 +214,56 @@ func (l *Layer) AddLayers(layers ...*Layer) *Layer {
216}
214}
217
215
218// SetContent sets the content of the Layer.
216// SetContent sets the content of the Layer.
219−func (l *Layer) SetContent(content string) *Layer {
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+ }
220− l.content = content
246+ l.content = drawable
247+ l.rect = rect
221 return l
248 return l
222}
249}
223
250
224// Content returns the content of the Layer.
251// Content returns the content of the Layer.
225−func (l *Layer) Content() string {
252+func (l *Layer) Content() any {
226 return l.content
253 return l.content
227}
254}
228
255
229// Draw draws the Layer onto the given screen buffer.
256// Draw draws the Layer onto the given screen buffer.
230−func (l *Layer) Draw(scr uv.Screen, _ image.Rectangle) {
257+func (l *Layer) Draw(scr uv.Screen, area image.Rectangle) {
231− ss := uv.NewStyledString(l.content)
258+ if l.content == nil {
259+ return
260+ }
232− ss.Draw(scr, l.Bounds())
261+ l.content.Draw(scr, area.Intersect(l.Bounds()))
233 for _, child := range l.children {
262 for _, child := range l.children {
234− ss := uv.NewStyledString(child.content)
263+ if child.content == nil {
264+ continue
265+ }
235− ss.Draw(scr, child.Bounds())
266+ child.content.Draw(scr, area.Intersect(child.Bounds()))
236 }
267 }
237}
268}
238
269
vendor/github.com/charmbracelet/ultraviolet/README.md+2
@@ -1,5 +1,7 @@
1# Ultraviolet
1# Ultraviolet
2
2
3+<img width="400" alt="Charm Ultraviolet" src="https://github.com/user-attachments/assets/3484e4b0-3741-4e8c-bebf-9ea51f5bb49c" />
4+
3<p>
5<p>
4 <a href="https://github.com/charmbracelet/ultraviolet/releases"><img src="https://img.shields.io/github/release/charmbracelet/ultraviolet.svg" alt="Latest Release"></a>
6 <a href="https://github.com/charmbracelet/ultraviolet/releases"><img src="https://img.shields.io/github/release/charmbracelet/ultraviolet.svg" alt="Latest Release"></a>
5 <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>
7 <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
3import (
3import (
4 "context"
4 "context"
5
5
6+ "github.com/charmbracelet/x/term"
6 "golang.org/x/sync/errgroup"
7 "golang.org/x/sync/errgroup"
7)
8)
8
9
@@ -59,3 +60,30 @@ func (im *InputManager) ReceiveEvents(ctx context.Context, events chan<- Event)
59 // Wait for all receivers to finish
60 // Wait for all receivers to finish
60 return errg.Wait()
61 return errg.Wait()
61}
62}
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 (
20 "github.com/muesli/cancelreader"
20 "github.com/muesli/cancelreader"
21)
21)
22
22
23+const isWindows = "windows"
24+
23var (
25var (
24 // ErrNotTerminal is returned when one of the I/O streams is not a terminal.
26 // ErrNotTerminal is returned when one of the I/O streams is not a terminal.
25 ErrNotTerminal = fmt.Errorf("not a terminal")
27 ErrNotTerminal = fmt.Errorf("not a terminal")
@@ -42,8 +44,7 @@ type Terminal struct {
42 inTtyState *term.State
44 inTtyState *term.State
43 outTty term.File
45 outTty term.File
44 outTtyState *term.State
46 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.
47
48
48 // Terminal type, screen and buffer.
49 // Terminal type, screen and buffer.
49 termtype string // The $TERM type.
50 termtype string // The $TERM type.
@@ -123,7 +124,7 @@ func NewTerminal(in io.Reader, out io.Writer, env []string) *Terminal {
123 // Handle debugging I/O.
124 // Handle debugging I/O.
124 debug, ok := os.LookupEnv("UV_DEBUG")
125 debug, ok := os.LookupEnv("UV_DEBUG")
125 if ok && len(debug) > 0 {
126 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)
127 if err != nil {
128 if err != nil {
128 panic("failed to open debug file: " + err.Error())
129 panic("failed to open debug file: " + err.Error())
129 }
130 }
@@ -346,7 +347,7 @@ func (t *Terminal) EnableMode(modes ...ansi.Mode) {
346 for _, m := range modes {
347 for _, m := range modes {
347 t.modes[m] = ansi.ModeSet
348 t.modes[m] = ansi.ModeSet
348 }
349 }
349− t.scr.WriteString(ansi.SetMode(modes...)) //nolint:errcheck
350+ t.scr.WriteString(ansi.SetMode(modes...)) //nolint:errcheck,gosec
350}
351}
351
352
352// DisableMode disables the given modes on the terminal. This is typically
353// DisableMode disables the given modes on the terminal. This is typically
@@ -362,7 +363,7 @@ func (t *Terminal) DisableMode(modes ...ansi.Mode) {
362 for _, m := range modes {
363 for _, m := range modes {
363 t.modes[m] = ansi.ModeReset
364 t.modes[m] = ansi.ModeReset
364 }
365 }
365− t.scr.WriteString(ansi.ResetMode(modes...)) //nolint:errcheck
366+ t.scr.WriteString(ansi.ResetMode(modes...)) //nolint:errcheck,gosec
366}
367}
367
368
368// RequestMode requests the current state of the given modes from the terminal.
369// RequestMode requests the current state of the given modes from the terminal.
@@ -372,7 +373,7 @@ func (t *Terminal) DisableMode(modes ...ansi.Mode) {
372// Note that this won't take any effect until the next [Terminal.Display] or
373// Note that this won't take any effect until the next [Terminal.Display] or
373// [Terminal.Flush] call.
374// [Terminal.Flush] call.
374func (t *Terminal) RequestMode(mode ansi.Mode) {
375func (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
376}
377}
377
378
378// MouseMode represents the mouse mode for the terminal. It is used to enable
379// MouseMode represents the mouse mode for the terminal. It is used to enable
@@ -399,7 +400,7 @@ func (t *Terminal) SetForegroundColor(c color.Color) {
399 t.setFg = c
400 t.setFg = c
400 col, ok := colorful.MakeColor(c)
401 col, ok := colorful.MakeColor(c)
401 if ok {
402 if ok {
402− t.scr.WriteString(ansi.SetForegroundColor(col.Hex())) //nolint:errcheck
403+ t.scr.WriteString(ansi.SetForegroundColor(col.Hex())) //nolint:errcheck,gosec
403 }
404 }
404}
405}
405
406
@@ -408,7 +409,7 @@ func (t *Terminal) SetForegroundColor(c color.Color) {
408// Note that this won't take any effect until the next [Terminal.Display] or
409// Note that this won't take any effect until the next [Terminal.Display] or
409// [Terminal.Flush] call.
410// [Terminal.Flush] call.
410func (t *Terminal) RequestForegroundColor() {
411func (t *Terminal) RequestForegroundColor() {
411− t.scr.WriteString(ansi.RequestForegroundColor) //nolint:errcheck
412+ t.scr.WriteString(ansi.RequestForegroundColor) //nolint:errcheck,gosec
412}
413}
413
414
414// ResetForegroundColor resets the terminal foreground color to the
415// ResetForegroundColor resets the terminal foreground color to the
@@ -418,7 +419,7 @@ func (t *Terminal) RequestForegroundColor() {
418// [Terminal.Flush] call.
419// [Terminal.Flush] call.
419func (t *Terminal) ResetForegroundColor() {
420func (t *Terminal) ResetForegroundColor() {
420 t.setFg = nil
421 t.setFg = nil
421− t.scr.WriteString(ansi.ResetForegroundColor) //nolint:errcheck
422+ t.scr.WriteString(ansi.ResetForegroundColor) //nolint:errcheck,gosec
422}
423}
423
424
424// SetBackgroundColor sets the terminal default background color.
425// SetBackgroundColor sets the terminal default background color.
@@ -429,7 +430,7 @@ func (t *Terminal) SetBackgroundColor(c color.Color) {
429 t.setBg = c
430 t.setBg = c
430 col, ok := colorful.MakeColor(c)
431 col, ok := colorful.MakeColor(c)
431 if ok {
432 if ok {
432− t.scr.WriteString(ansi.SetBackgroundColor(col.Hex())) //nolint:errcheck
433+ t.scr.WriteString(ansi.SetBackgroundColor(col.Hex())) //nolint:errcheck,gosec
433 }
434 }
434}
435}
435
436
@@ -438,7 +439,7 @@ func (t *Terminal) SetBackgroundColor(c color.Color) {
438// Note that this won't take any effect until the next [Terminal.Display] or
439// Note that this won't take any effect until the next [Terminal.Display] or
439// [Terminal.Flush] call.
440// [Terminal.Flush] call.
440func (t *Terminal) RequestBackgroundColor() {
441func (t *Terminal) RequestBackgroundColor() {
441− t.scr.WriteString(ansi.RequestBackgroundColor) //nolint:errcheck
442+ t.scr.WriteString(ansi.RequestBackgroundColor) //nolint:errcheck,gosec
442}
443}
443
444
444// ResetBackgroundColor resets the terminal background color to the
445// ResetBackgroundColor resets the terminal background color to the
@@ -448,7 +449,7 @@ func (t *Terminal) RequestBackgroundColor() {
448// [Terminal.Flush] call.
449// [Terminal.Flush] call.
449func (t *Terminal) ResetBackgroundColor() {
450func (t *Terminal) ResetBackgroundColor() {
450 t.setBg = nil
451 t.setBg = nil
451− t.scr.WriteString(ansi.ResetBackgroundColor) //nolint:errcheck
452+ t.scr.WriteString(ansi.ResetBackgroundColor) //nolint:errcheck,gosec
452}
453}
453
454
454// SetCursorColor sets the terminal cursor color.
455// SetCursorColor sets the terminal cursor color.
@@ -459,7 +460,7 @@ func (t *Terminal) SetCursorColor(c color.Color) {
459 t.setCc = c
460 t.setCc = c
460 col, ok := colorful.MakeColor(c)
461 col, ok := colorful.MakeColor(c)
461 if ok {
462 if ok {
462− t.scr.WriteString(ansi.SetCursorColor(col.Hex())) //nolint:errcheck
463+ t.scr.WriteString(ansi.SetCursorColor(col.Hex())) //nolint:errcheck,gosec
463 }
464 }
464}
465}
465
466
@@ -468,7 +469,7 @@ func (t *Terminal) SetCursorColor(c color.Color) {
468// Note that this won't take any effect until the next [Terminal.Display] or
469// Note that this won't take any effect until the next [Terminal.Display] or
469// [Terminal.Flush] call.
470// [Terminal.Flush] call.
470func (t *Terminal) RequestCursorColor() {
471func (t *Terminal) RequestCursorColor() {
471− t.scr.WriteString(ansi.RequestCursorColor) //nolint:errcheck
472+ t.scr.WriteString(ansi.RequestCursorColor) //nolint:errcheck,gosec
472}
473}
473
474
474// ResetCursorColor resets the terminal cursor color to the
475// ResetCursorColor resets the terminal cursor color to the
@@ -478,7 +479,7 @@ func (t *Terminal) RequestCursorColor() {
478// [Terminal.Flush] call.
479// [Terminal.Flush] call.
479func (t *Terminal) ResetCursorColor() {
480func (t *Terminal) ResetCursorColor() {
480 t.setCc = nil
481 t.setCc = nil
481− t.scr.WriteString(ansi.ResetCursorColor) //nolint:errcheck
482+ t.scr.WriteString(ansi.ResetCursorColor) //nolint:errcheck,gosec
482}
483}
483
484
484// SetCursorShape sets the terminal cursor shape and blinking style.
485// SetCursorShape sets the terminal cursor shape and blinking style.
@@ -488,7 +489,7 @@ func (t *Terminal) ResetCursorColor() {
488func (t *Terminal) SetCursorShape(shape CursorShape, blink bool) {
489func (t *Terminal) SetCursorShape(shape CursorShape, blink bool) {
489 style := shape.Encode(blink)
490 style := shape.Encode(blink)
490 t.curStyle = style
491 t.curStyle = style
491− t.scr.WriteString(ansi.SetCursorStyle(style)) //nolint:errcheck
492+ t.scr.WriteString(ansi.SetCursorStyle(style)) //nolint:errcheck,gosec
492}
493}
493
494
494// EnableMouse enables mouse support on the terminal.
495// EnableMouse enables mouse support on the terminal.
@@ -520,7 +521,7 @@ func (t *Terminal) EnableMouse(modes ...MouseMode) {
520 mode = ButtonMouseMode | DragMouseMode | AllMouseMode
521 mode = ButtonMouseMode | DragMouseMode | AllMouseMode
521 }
522 }
522 t.mouseMode = mode
523 t.mouseMode = mode
523− if runtime.GOOS != "windows" {
524+ if runtime.GOOS != isWindows {
524 modes := []ansi.Mode{}
525 modes := []ansi.Mode{}
525 if t.mouseMode&AllMouseMode != 0 {
526 if t.mouseMode&AllMouseMode != 0 {
526 modes = append(modes, ansi.AnyEventMouseMode)
527 modes = append(modes, ansi.AnyEventMouseMode)
@@ -532,7 +533,7 @@ func (t *Terminal) EnableMouse(modes ...MouseMode) {
532 modes = append(modes, ansi.SgrExtMouseMode)
533 modes = append(modes, ansi.SgrExtMouseMode)
533 t.EnableMode(modes...)
534 t.EnableMode(modes...)
534 }
535 }
535− t.enableWindowsMouse() //nolint:errcheck
536+ t.enableWindowsMouse() //nolint:errcheck,gosec
536}
537}
537
538
538// DisableMouse disables mouse support on the terminal. This will disable mouse
539// DisableMouse disables mouse support on the terminal. This will disable mouse
@@ -542,7 +543,7 @@ func (t *Terminal) EnableMouse(modes ...MouseMode) {
542// [Terminal.Display] or [Terminal.Flush] call.
543// [Terminal.Display] or [Terminal.Flush] call.
543func (t *Terminal) DisableMouse() {
544func (t *Terminal) DisableMouse() {
544 t.mouseMode = 0
545 t.mouseMode = 0
545− if runtime.GOOS != "windows" {
546+ if runtime.GOOS != isWindows {
546 var modes []ansi.Mode
547 var modes []ansi.Mode
547 if t.modes.Get(ansi.AnyEventMouseMode).IsSet() {
548 if t.modes.Get(ansi.AnyEventMouseMode).IsSet() {
548 modes = append(modes, ansi.AnyEventMouseMode)
549 modes = append(modes, ansi.AnyEventMouseMode)
@@ -558,7 +559,7 @@ func (t *Terminal) DisableMouse() {
558 }
559 }
559 t.DisableMode(modes...)
560 t.DisableMode(modes...)
560 }
561 }
561− t.disableWindowsMouse() //nolint:errcheck
562+ t.disableWindowsMouse() //nolint:errcheck,gosec
562}
563}
563
564
564// EnableBracketedPaste enables bracketed paste mode on the terminal. This is
565// EnableBracketedPaste enables bracketed paste mode on the terminal. This is
@@ -608,9 +609,9 @@ func (t *Terminal) enterAltScreen(cursor bool) {
608 t.scr.EnterAltScreen()
609 t.scr.EnterAltScreen()
609 if cursor && !altscreen {
610 if cursor && !altscreen {
610 if t.scr.CursorHidden() {
611 if t.scr.CursorHidden() {
611− t.scr.WriteString(ansi.HideCursor) //nolint:errcheck
612+ t.scr.WriteString(ansi.HideCursor) //nolint:errcheck,gosec
612 } else {
613 } else {
613− t.scr.WriteString(ansi.ShowCursor) //nolint:errcheck
614+ t.scr.WriteString(ansi.ShowCursor) //nolint:errcheck,gosec
614 }
615 }
615 }
616 }
616 t.scr.SetRelativeCursor(false)
617 t.scr.SetRelativeCursor(false)
@@ -639,9 +640,9 @@ func (t *Terminal) exitAltScreen(cursor bool) {
639 t.scr.ExitAltScreen()
640 t.scr.ExitAltScreen()
640 if cursor && altscreen {
641 if cursor && altscreen {
641 if t.scr.CursorHidden() {
642 if t.scr.CursorHidden() {
642− t.scr.WriteString(ansi.HideCursor) //nolint:errcheck
643+ t.scr.WriteString(ansi.HideCursor) //nolint:errcheck,gosec
643 } else {
644 } else {
644− t.scr.WriteString(ansi.ShowCursor) //nolint:errcheck
645+ t.scr.WriteString(ansi.ShowCursor) //nolint:errcheck,gosec
645 }
646 }
646 }
647 }
647 t.scr.SetRelativeCursor(true)
648 t.scr.SetRelativeCursor(true)
@@ -725,11 +726,6 @@ func (t *Terminal) Start() error {
725 return ErrNotTerminal
726 return ErrNotTerminal
726 }
727 }
727
728
728− t.winchTty = t.inTty
729− if t.winchTty == nil {
730− t.winchTty = t.outTty
731− }
732−
733 // Get the initial terminal size.
729 // Get the initial terminal size.
734 var err error
730 var err error
735 t.size.Width, t.size.Height, err = t.GetSize()
731 t.size.Width, t.size.Height, err = t.GetSize()
@@ -749,11 +745,11 @@ func (t *Terminal) Start() error {
749 t.configureRenderer()
745 t.configureRenderer()
750
746
751 if t.modes.Get(ansi.AltScreenSaveCursorMode).IsSet() {
747 if t.modes.Get(ansi.AltScreenSaveCursorMode).IsSet() {
752− t.enterAltScreen(false) //nolint:errcheck
748+ t.enterAltScreen(false)
753 }
749 }
754 if t.cursorHidden == t.modes.Get(ansi.TextCursorEnableMode).IsReset() {
750 if t.cursorHidden == t.modes.Get(ansi.TextCursorEnableMode).IsReset() {
755 // We always hide the cursor when we start.
751 // We always hide the cursor when we start.
756− t.hideCursor() //nolint:errcheck
752+ t.hideCursor()
757 }
753 }
758 // Restore terminal modes.
754 // Restore terminal modes.
759 for m, s := range t.modes {
755 for m, s := range t.modes {
@@ -763,7 +759,7 @@ func (t *Terminal) Start() error {
763 continue
759 continue
764 default:
760 default:
765 if s.IsSet() {
761 if s.IsSet() {
766− t.scr.WriteString(ansi.SetMode(m)) //nolint:errcheck
762+ t.scr.WriteString(ansi.SetMode(m)) //nolint:errcheck,gosec
767 }
763 }
768 }
764 }
769 }
765 }
@@ -779,21 +775,32 @@ func (t *Terminal) Start() error {
779 if c.colorp != nil && *c.colorp != nil {
775 if c.colorp != nil && *c.colorp != nil {
780 col, ok := colorful.MakeColor(*c.colorp)
776 col, ok := colorful.MakeColor(*c.colorp)
781 if ok {
777 if ok {
782− t.scr.WriteString(c.setter(col.Hex())) //nolint:errcheck
778+ t.scr.WriteString(c.setter(col.Hex())) //nolint:errcheck,gosec
783 }
779 }
784 }
780 }
785 }
781 }
786 if t.curStyle > 1 {
782 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
788 }
784 }
789
785
790 if err := t.rd.Start(); err != nil {
786 if err := t.rd.Start(); err != nil {
791 return fmt.Errorf("error starting terminal: %w", err)
787 return fmt.Errorf("error starting terminal: %w", err)
792 }
788 }
793
789
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+ }
794− recvs := []InputReceiver{t.rd}
801+ recvs := []InputReceiver{t.rd, &InitialSizeReceiver{winchTty}}
795− if runtime.GOOS != "windows" {
802+ if runtime.GOOS != isWindows {
796− t.wrdr = &WinChReceiver{t.winchTty}
803+ t.wrdr = &WinChReceiver{winchTty}
797 if err := t.wrdr.Start(); err != nil {
804 if err := t.wrdr.Start(); err != nil {
798 return fmt.Errorf("error starting window size receiver: %w", err)
805 return fmt.Errorf("error starting window size receiver: %w", err)
799 }
806 }
@@ -818,13 +825,13 @@ func (t *Terminal) Start() error {
818func (t *Terminal) Restore() error {
825func (t *Terminal) Restore() error {
819 if t.inTtyState != nil {
826 if t.inTtyState != nil {
820 if err := term.Restore(t.inTty.Fd(), t.inTtyState); err != nil {
827 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)
822 }
829 }
823 t.inTtyState = nil
830 t.inTtyState = nil
824 }
831 }
825 if t.outTtyState != nil {
832 if t.outTtyState != nil {
826 if err := term.Restore(t.outTty.Fd(), t.outTtyState); err != nil {
833 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)
828 }
835 }
829 t.outTtyState = nil
836 t.outTtyState = nil
830 }
837 }
@@ -835,10 +842,10 @@ func (t *Terminal) Restore() error {
835 t.scr.MoveTo(0, t.buf.Height()-1)
842 t.scr.MoveTo(0, t.buf.Height()-1)
836 }
843 }
837 if altscreen {
844 if altscreen {
838− t.exitAltScreen(false) //nolint:errcheck
845+ t.exitAltScreen(false)
839 }
846 }
840 if cursorHidden {
847 if cursorHidden {
841− t.showCursor() //nolint:errcheck
848+ t.showCursor()
842 // Override the cursor hidden state so that we can auto hide it again
849 // Override the cursor hidden state so that we can auto hide it again
843 // when the terminal resumes using [Terminal.Start].
850 // when the terminal resumes using [Terminal.Start].
844 t.cursorHidden = false
851 t.cursorHidden = false
vendor/github.com/charmbracelet/ultraviolet/terminal_reader.go+9−5
@@ -259,17 +259,22 @@ func (d *TerminalReader) run() {
259 // - "\x1b^" (alt+^ key press)
259 // - "\x1b^" (alt+^ key press)
260 esc := n > 0 && n <= 2 && readBuf[0] == ansi.ESC
260 esc := n > 0 && n <= 2 && readBuf[0] == ansi.ESC
261 if esc {
261 if esc {
262− d.esc.Store(true)
262+ d.resetEsc()
263− d.timeout.Reset(d.EscTimeout)
264 }
263 }
265
264
266 d.notify <- readBuf[:n]
265 d.notify <- readBuf[:n]
267 }
266 }
268}
267}
269
268
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+
270func (d *TerminalReader) sendEvents(events chan<- Event) {
275func (d *TerminalReader) sendEvents(events chan<- Event) {
271 // Lookup table first
276 // 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 {
273 if k, ok := d.table[string(d.buf)]; ok {
278 if k, ok := d.table[string(d.buf)]; ok {
274 events <- KeyPressEvent(k)
279 events <- KeyPressEvent(k)
275 d.buf = d.buf[:0]
280 d.buf = d.buf[:0]
@@ -309,8 +314,7 @@ LOOP:
309 if slices.Contains([]byte{
314 if slices.Contains([]byte{
310 ansi.ESC, ansi.CSI, ansi.OSC, ansi.DCS, ansi.APC, ansi.SOS, ansi.PM,
315 ansi.ESC, ansi.CSI, ansi.OSC, ansi.DCS, ansi.APC, ansi.SOS, ansi.PM,
311 }, d.buf[0]) {
316 }, d.buf[0]) {
312− d.esc.Store(true)
317+ d.resetEsc()
313− d.timeout.Reset(d.EscTimeout)
314 }
318 }
315 }
319 }
316 // If this is the entire buffer, we can break and assume this
320 // 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
18 sig := make(chan os.Signal, 1)
18 sig := make(chan os.Signal, 1)
19 signal.Notify(sig, syscall.SIGWINCH)
19 signal.Notify(sig, syscall.SIGWINCH)
20
20
21+ defer signal.Stop(sig)
22+
21 sendWinSize := func(w, h int) {
23 sendWinSize := func(w, h int) {
22 select {
24 select {
23 case <-ctx.Done():
25 case <-ctx.Done():
@@ -32,31 +34,8 @@ func (l *WinChReceiver) receiveEvents(ctx context.Context, f term.File, evch cha
32 }
34 }
33 }
35 }
34
36
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−
59 // Listen for window size changes.
37 // Listen for window size changes.
38+ var wg sync.WaitGroup
60 for {
39 for {
61 select {
40 select {
62 case <-ctx.Done():
41 case <-ctx.Done():
vendor/golang.org/x/sync/errgroup/errgroup.go+31−87
@@ -12,8 +12,6 @@ package errgroup
12import (
12import (
13 "context"
13 "context"
14 "fmt"
14 "fmt"
15− "runtime"
16− "runtime/debug"
17 "sync"
15 "sync"
18)
16)
19
17
@@ -33,10 +31,6 @@ type Group struct {
33
31
34 errOnce sync.Once
32 errOnce sync.Once
35 err error
33 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).
40}
34}
41
35
42func (g *Group) done() {
36func (g *Group) done() {
@@ -56,22 +50,13 @@ func WithContext(ctx context.Context) (*Group, context.Context) {
56 return &Group{cancel: cancel}, ctx
50 return &Group{cancel: cancel}, ctx
57}
51}
58
52
59−// Wait blocks until all function calls from the Go method have returned
53+// Wait blocks until all function calls from the Go method have returned, then
60−// normally, then returns the first non-nil error (if any) from them.
54+// 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.
64func (g *Group) Wait() error {
55func (g *Group) Wait() error {
65 g.wg.Wait()
56 g.wg.Wait()
66 if g.cancel != nil {
57 if g.cancel != nil {
67 g.cancel(g.err)
58 g.cancel(g.err)
68 }
59 }
69− if g.panicValue != nil {
70− panic(g.panicValue)
71− }
72− if g.abnormal {
73− runtime.Goexit()
74− }
75 return g.err
60 return g.err
76}
61}
77
62
@@ -81,53 +66,31 @@ func (g *Group) Wait() error {
81// It blocks until the new goroutine can be added without the number of
66// It blocks until the new goroutine can be added without the number of
82// goroutines in the group exceeding the configured limit.
67// goroutines in the group exceeding the configured limit.
83//
68//
84−// The first goroutine in the group that returns a non-nil error, panics, or
69+// The first goroutine in the group that returns a non-nil error will
85−// invokes [runtime.Goexit] will cancel the associated Context, if any.
70+// cancel the associated Context, if any. The error will be returned
71+// by Wait.
86func (g *Group) Go(f func() error) {
72func (g *Group) Go(f func() error) {
87 if g.sem != nil {
73 if g.sem != nil {
88 g.sem <- token{}
74 g.sem <- token{}
89 }
75 }
90
76
91− g.add(f)
92−}
93−
94−func (g *Group) add(f func() error) {
95 g.wg.Add(1)
77 g.wg.Add(1)
96 go func() {
78 go func() {
97 defer g.done()
79 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− }()
127
80
128− err := f()
81+ // It is tempting to propagate panics from f()
129− normalReturn = true
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+
130− if err != nil {
93+ if err := f(); err != nil {
131 g.errOnce.Do(func() {
94 g.errOnce.Do(func() {
132 g.err = err
95 g.err = err
133 if g.cancel != nil {
96 if g.cancel != nil {
@@ -152,7 +115,19 @@ func (g *Group) TryGo(f func() error) bool {
152 }
115 }
153 }
116 }
154
117
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+ }()
156 return true
131 return true
157}
132}
158
133
@@ -174,34 +149,3 @@ func (g *Group) SetLimit(n int) {
174 }
149 }
175 g.sem = make(chan token, n)
150 g.sem = make(chan token, n)
176}
151}
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 (
319 AUDIT_INTEGRITY_POLICY_RULE = 0x70f
319 AUDIT_INTEGRITY_POLICY_RULE = 0x70f
320 AUDIT_INTEGRITY_RULE = 0x70d
320 AUDIT_INTEGRITY_RULE = 0x70d
321 AUDIT_INTEGRITY_STATUS = 0x70a
321 AUDIT_INTEGRITY_STATUS = 0x70a
322+ AUDIT_INTEGRITY_USERSPACE = 0x710
322 AUDIT_IPC = 0x517
323 AUDIT_IPC = 0x517
323 AUDIT_IPC_SET_PERM = 0x51f
324 AUDIT_IPC_SET_PERM = 0x51f
324 AUDIT_IPE_ACCESS = 0x58c
325 AUDIT_IPE_ACCESS = 0x58c
@@ -843,9 +844,9 @@ const (
843 DM_UUID_FLAG = 0x4000
844 DM_UUID_FLAG = 0x4000
844 DM_UUID_LEN = 0x81
845 DM_UUID_LEN = 0x81
845 DM_VERSION = 0xc138fd00
846 DM_VERSION = 0xc138fd00
846− DM_VERSION_EXTRA = "-ioctl (2023-03-01)"
847+ DM_VERSION_EXTRA = "-ioctl (2025-01-17)"
847 DM_VERSION_MAJOR = 0x4
848 DM_VERSION_MAJOR = 0x4
848− DM_VERSION_MINOR = 0x30
849+ DM_VERSION_MINOR = 0x31
849 DM_VERSION_PATCHLEVEL = 0x0
850 DM_VERSION_PATCHLEVEL = 0x0
850 DT_BLK = 0x6
851 DT_BLK = 0x6
851 DT_CHR = 0x2
852 DT_CHR = 0x2
@@ -941,6 +942,8 @@ const (
941 ETHER_FLOW = 0x12
942 ETHER_FLOW = 0x12
942 ETHTOOL_BUSINFO_LEN = 0x20
943 ETHTOOL_BUSINFO_LEN = 0x20
943 ETHTOOL_EROMVERS_LEN = 0x20
944 ETHTOOL_EROMVERS_LEN = 0x20
945+ ETHTOOL_FAMILY_NAME = "ethtool"
946+ ETHTOOL_FAMILY_VERSION = 0x1
944 ETHTOOL_FEC_AUTO = 0x2
947 ETHTOOL_FEC_AUTO = 0x2
945 ETHTOOL_FEC_BASER = 0x10
948 ETHTOOL_FEC_BASER = 0x10
946 ETHTOOL_FEC_LLRS = 0x20
949 ETHTOOL_FEC_LLRS = 0x20
@@ -1203,6 +1206,9 @@ const (
1203 FAN_DENY = 0x2
1206 FAN_DENY = 0x2
1204 FAN_ENABLE_AUDIT = 0x40
1207 FAN_ENABLE_AUDIT = 0x40
1205 FAN_EPIDFD = -0x2
1208 FAN_EPIDFD = -0x2
1209+ FAN_ERRNO_BITS = 0x8
1210+ FAN_ERRNO_MASK = 0xff
1211+ FAN_ERRNO_SHIFT = 0x18
1206 FAN_EVENT_INFO_TYPE_DFID = 0x3
1212 FAN_EVENT_INFO_TYPE_DFID = 0x3
1207 FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
1213 FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
1208 FAN_EVENT_INFO_TYPE_ERROR = 0x5
1214 FAN_EVENT_INFO_TYPE_ERROR = 0x5
@@ -1210,6 +1216,7 @@ const (
1210 FAN_EVENT_INFO_TYPE_NEW_DFID_NAME = 0xc
1216 FAN_EVENT_INFO_TYPE_NEW_DFID_NAME = 0xc
1211 FAN_EVENT_INFO_TYPE_OLD_DFID_NAME = 0xa
1217 FAN_EVENT_INFO_TYPE_OLD_DFID_NAME = 0xa
1212 FAN_EVENT_INFO_TYPE_PIDFD = 0x4
1218 FAN_EVENT_INFO_TYPE_PIDFD = 0x4
1219+ FAN_EVENT_INFO_TYPE_RANGE = 0x6
1213 FAN_EVENT_METADATA_LEN = 0x18
1220 FAN_EVENT_METADATA_LEN = 0x18
1214 FAN_EVENT_ON_CHILD = 0x8000000
1221 FAN_EVENT_ON_CHILD = 0x8000000
1215 FAN_FS_ERROR = 0x8000
1222 FAN_FS_ERROR = 0x8000
@@ -1240,6 +1247,7 @@ const (
1240 FAN_OPEN_EXEC = 0x1000
1247 FAN_OPEN_EXEC = 0x1000
1241 FAN_OPEN_EXEC_PERM = 0x40000
1248 FAN_OPEN_EXEC_PERM = 0x40000
1242 FAN_OPEN_PERM = 0x10000
1249 FAN_OPEN_PERM = 0x10000
1250+ FAN_PRE_ACCESS = 0x100000
1243 FAN_Q_OVERFLOW = 0x4000
1251 FAN_Q_OVERFLOW = 0x4000
1244 FAN_RENAME = 0x10000000
1252 FAN_RENAME = 0x10000000
1245 FAN_REPORT_DFID_NAME = 0xc00
1253 FAN_REPORT_DFID_NAME = 0xc00
@@ -2787,7 +2795,7 @@ const (
2787 RTAX_UNSPEC = 0x0
2795 RTAX_UNSPEC = 0x0
2788 RTAX_WINDOW = 0x3
2796 RTAX_WINDOW = 0x3
2789 RTA_ALIGNTO = 0x4
2797 RTA_ALIGNTO = 0x4
2790− RTA_MAX = 0x1e
2798+ RTA_MAX = 0x1f
2791 RTCF_DIRECTSRC = 0x4000000
2799 RTCF_DIRECTSRC = 0x4000000
2792 RTCF_DOREDIRECT = 0x1000000
2800 RTCF_DOREDIRECT = 0x1000000
2793 RTCF_LOG = 0x2000000
2801 RTCF_LOG = 0x2000000
@@ -2864,10 +2872,12 @@ const (
2864 RTM_DELACTION = 0x31
2872 RTM_DELACTION = 0x31
2865 RTM_DELADDR = 0x15
2873 RTM_DELADDR = 0x15
2866 RTM_DELADDRLABEL = 0x49
2874 RTM_DELADDRLABEL = 0x49
2875+ RTM_DELANYCAST = 0x3d
2867 RTM_DELCHAIN = 0x65
2876 RTM_DELCHAIN = 0x65
2868 RTM_DELLINK = 0x11
2877 RTM_DELLINK = 0x11
2869 RTM_DELLINKPROP = 0x6d
2878 RTM_DELLINKPROP = 0x6d
2870 RTM_DELMDB = 0x55
2879 RTM_DELMDB = 0x55
2880+ RTM_DELMULTICAST = 0x39
2871 RTM_DELNEIGH = 0x1d
2881 RTM_DELNEIGH = 0x1d
2872 RTM_DELNETCONF = 0x51
2882 RTM_DELNETCONF = 0x51
2873 RTM_DELNEXTHOP = 0x69
2883 RTM_DELNEXTHOP = 0x69
@@ -2917,11 +2927,13 @@ const (
2917 RTM_NEWACTION = 0x30
2927 RTM_NEWACTION = 0x30
2918 RTM_NEWADDR = 0x14
2928 RTM_NEWADDR = 0x14
2919 RTM_NEWADDRLABEL = 0x48
2929 RTM_NEWADDRLABEL = 0x48
2930+ RTM_NEWANYCAST = 0x3c
2920 RTM_NEWCACHEREPORT = 0x60
2931 RTM_NEWCACHEREPORT = 0x60
2921 RTM_NEWCHAIN = 0x64
2932 RTM_NEWCHAIN = 0x64
2922 RTM_NEWLINK = 0x10
2933 RTM_NEWLINK = 0x10
2923 RTM_NEWLINKPROP = 0x6c
2934 RTM_NEWLINKPROP = 0x6c
2924 RTM_NEWMDB = 0x54
2935 RTM_NEWMDB = 0x54
2936+ RTM_NEWMULTICAST = 0x38
2925 RTM_NEWNDUSEROPT = 0x44
2937 RTM_NEWNDUSEROPT = 0x44
2926 RTM_NEWNEIGH = 0x1c
2938 RTM_NEWNEIGH = 0x1c
2927 RTM_NEWNEIGHTBL = 0x40
2939 RTM_NEWNEIGHTBL = 0x40
@@ -2987,11 +2999,12 @@ const (
2987 RUSAGE_THREAD = 0x1
2999 RUSAGE_THREAD = 0x1
2988 RWF_APPEND = 0x10
3000 RWF_APPEND = 0x10
2989 RWF_ATOMIC = 0x40
3001 RWF_ATOMIC = 0x40
3002+ RWF_DONTCACHE = 0x80
2990 RWF_DSYNC = 0x2
3003 RWF_DSYNC = 0x2
2991 RWF_HIPRI = 0x1
3004 RWF_HIPRI = 0x1
2992 RWF_NOAPPEND = 0x20
3005 RWF_NOAPPEND = 0x20
2993 RWF_NOWAIT = 0x8
3006 RWF_NOWAIT = 0x8
2994− RWF_SUPPORTED = 0x7f
3007+ RWF_SUPPORTED = 0xff
2995 RWF_SYNC = 0x4
3008 RWF_SYNC = 0x4
2996 RWF_WRITE_LIFE_NOT_SET = 0x0
3009 RWF_WRITE_LIFE_NOT_SET = 0x0
2997 SCHED_BATCH = 0x3
3010 SCHED_BATCH = 0x3
@@ -3271,6 +3284,7 @@ const (
3271 STATX_BTIME = 0x800
3284 STATX_BTIME = 0x800
3272 STATX_CTIME = 0x80
3285 STATX_CTIME = 0x80
3273 STATX_DIOALIGN = 0x2000
3286 STATX_DIOALIGN = 0x2000
3287+ STATX_DIO_READ_ALIGN = 0x20000
3274 STATX_GID = 0x10
3288 STATX_GID = 0x10
3275 STATX_INO = 0x100
3289 STATX_INO = 0x100
3276 STATX_MNT_ID = 0x1000
3290 STATX_MNT_ID = 0x1000
@@ -3322,7 +3336,7 @@ const (
3322 TASKSTATS_GENL_NAME = "TASKSTATS"
3336 TASKSTATS_GENL_NAME = "TASKSTATS"
3323 TASKSTATS_GENL_VERSION = 0x1
3337 TASKSTATS_GENL_VERSION = 0x1
3324 TASKSTATS_TYPE_MAX = 0x6
3338 TASKSTATS_TYPE_MAX = 0x6
3325− TASKSTATS_VERSION = 0xe
3339+ TASKSTATS_VERSION = 0xf
3326 TCIFLUSH = 0x0
3340 TCIFLUSH = 0x0
3327 TCIOFF = 0x2
3341 TCIOFF = 0x2
3328 TCIOFLUSH = 0x2
3342 TCIOFLUSH = 0x2
@@ -3503,6 +3517,7 @@ const (
3503 TP_STATUS_WRONG_FORMAT = 0x4
3517 TP_STATUS_WRONG_FORMAT = 0x4
3504 TRACEFS_MAGIC = 0x74726163
3518 TRACEFS_MAGIC = 0x74726163
3505 TS_COMM_LEN = 0x20
3519 TS_COMM_LEN = 0x20
3520+ UBI_IOCECNFO = 0xc01c6f06
3506 UDF_SUPER_MAGIC = 0x15013346
3521 UDF_SUPER_MAGIC = 0x15013346
3507 UDP_CORK = 0x1
3522 UDP_CORK = 0x1
3508 UDP_ENCAP = 0x64
3523 UDP_ENCAP = 0x64
vendor/golang.org/x/sys/unix/zerrors_linux_386.go+1
@@ -372,6 +372,7 @@ const (
372 SO_RCVBUFFORCE = 0x21
372 SO_RCVBUFFORCE = 0x21
373 SO_RCVLOWAT = 0x12
373 SO_RCVLOWAT = 0x12
374 SO_RCVMARK = 0x4b
374 SO_RCVMARK = 0x4b
375+ SO_RCVPRIORITY = 0x52
375 SO_RCVTIMEO = 0x14
376 SO_RCVTIMEO = 0x14
376 SO_RCVTIMEO_NEW = 0x42
377 SO_RCVTIMEO_NEW = 0x42
377 SO_RCVTIMEO_OLD = 0x14
378 SO_RCVTIMEO_OLD = 0x14
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go+1
@@ -373,6 +373,7 @@ const (
373 SO_RCVBUFFORCE = 0x21
373 SO_RCVBUFFORCE = 0x21
374 SO_RCVLOWAT = 0x12
374 SO_RCVLOWAT = 0x12
375 SO_RCVMARK = 0x4b
375 SO_RCVMARK = 0x4b
376+ SO_RCVPRIORITY = 0x52
376 SO_RCVTIMEO = 0x14
377 SO_RCVTIMEO = 0x14
377 SO_RCVTIMEO_NEW = 0x42
378 SO_RCVTIMEO_NEW = 0x42
378 SO_RCVTIMEO_OLD = 0x14
379 SO_RCVTIMEO_OLD = 0x14
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go+1
@@ -378,6 +378,7 @@ const (
378 SO_RCVBUFFORCE = 0x21
378 SO_RCVBUFFORCE = 0x21
379 SO_RCVLOWAT = 0x12
379 SO_RCVLOWAT = 0x12
380 SO_RCVMARK = 0x4b
380 SO_RCVMARK = 0x4b
381+ SO_RCVPRIORITY = 0x52
381 SO_RCVTIMEO = 0x14
382 SO_RCVTIMEO = 0x14
382 SO_RCVTIMEO_NEW = 0x42
383 SO_RCVTIMEO_NEW = 0x42
383 SO_RCVTIMEO_OLD = 0x14
384 SO_RCVTIMEO_OLD = 0x14
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go+1
@@ -371,6 +371,7 @@ const (
371 SO_RCVBUFFORCE = 0x21
371 SO_RCVBUFFORCE = 0x21
372 SO_RCVLOWAT = 0x12
372 SO_RCVLOWAT = 0x12
373 SO_RCVMARK = 0x4b
373 SO_RCVMARK = 0x4b
374+ SO_RCVPRIORITY = 0x52
374 SO_RCVTIMEO = 0x14
375 SO_RCVTIMEO = 0x14
375 SO_RCVTIMEO_NEW = 0x42
376 SO_RCVTIMEO_NEW = 0x42
376 SO_RCVTIMEO_OLD = 0x14
377 SO_RCVTIMEO_OLD = 0x14
vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go+1
@@ -365,6 +365,7 @@ const (
365 SO_RCVBUFFORCE = 0x21
365 SO_RCVBUFFORCE = 0x21
366 SO_RCVLOWAT = 0x12
366 SO_RCVLOWAT = 0x12
367 SO_RCVMARK = 0x4b
367 SO_RCVMARK = 0x4b
368+ SO_RCVPRIORITY = 0x52
368 SO_RCVTIMEO = 0x14
369 SO_RCVTIMEO = 0x14
369 SO_RCVTIMEO_NEW = 0x42
370 SO_RCVTIMEO_NEW = 0x42
370 SO_RCVTIMEO_OLD = 0x14
371 SO_RCVTIMEO_OLD = 0x14
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go+1
@@ -371,6 +371,7 @@ const (
371 SO_RCVBUFFORCE = 0x21
371 SO_RCVBUFFORCE = 0x21
372 SO_RCVLOWAT = 0x1004
372 SO_RCVLOWAT = 0x1004
373 SO_RCVMARK = 0x4b
373 SO_RCVMARK = 0x4b
374+ SO_RCVPRIORITY = 0x52
374 SO_RCVTIMEO = 0x1006
375 SO_RCVTIMEO = 0x1006
375 SO_RCVTIMEO_NEW = 0x42
376 SO_RCVTIMEO_NEW = 0x42
376 SO_RCVTIMEO_OLD = 0x1006
377 SO_RCVTIMEO_OLD = 0x1006
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go+1
@@ -371,6 +371,7 @@ const (
371 SO_RCVBUFFORCE = 0x21
371 SO_RCVBUFFORCE = 0x21
372 SO_RCVLOWAT = 0x1004
372 SO_RCVLOWAT = 0x1004
373 SO_RCVMARK = 0x4b
373 SO_RCVMARK = 0x4b
374+ SO_RCVPRIORITY = 0x52
374 SO_RCVTIMEO = 0x1006
375 SO_RCVTIMEO = 0x1006
375 SO_RCVTIMEO_NEW = 0x42
376 SO_RCVTIMEO_NEW = 0x42
376 SO_RCVTIMEO_OLD = 0x1006
377 SO_RCVTIMEO_OLD = 0x1006
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go+1
@@ -371,6 +371,7 @@ const (
371 SO_RCVBUFFORCE = 0x21
371 SO_RCVBUFFORCE = 0x21
372 SO_RCVLOWAT = 0x1004
372 SO_RCVLOWAT = 0x1004
373 SO_RCVMARK = 0x4b
373 SO_RCVMARK = 0x4b
374+ SO_RCVPRIORITY = 0x52
374 SO_RCVTIMEO = 0x1006
375 SO_RCVTIMEO = 0x1006
375 SO_RCVTIMEO_NEW = 0x42
376 SO_RCVTIMEO_NEW = 0x42
376 SO_RCVTIMEO_OLD = 0x1006
377 SO_RCVTIMEO_OLD = 0x1006
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go+1
@@ -371,6 +371,7 @@ const (
371 SO_RCVBUFFORCE = 0x21
371 SO_RCVBUFFORCE = 0x21
372 SO_RCVLOWAT = 0x1004
372 SO_RCVLOWAT = 0x1004
373 SO_RCVMARK = 0x4b
373 SO_RCVMARK = 0x4b
374+ SO_RCVPRIORITY = 0x52
374 SO_RCVTIMEO = 0x1006
375 SO_RCVTIMEO = 0x1006
375 SO_RCVTIMEO_NEW = 0x42
376 SO_RCVTIMEO_NEW = 0x42
376 SO_RCVTIMEO_OLD = 0x1006
377 SO_RCVTIMEO_OLD = 0x1006
vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go+1
@@ -426,6 +426,7 @@ const (
426 SO_RCVBUFFORCE = 0x21
426 SO_RCVBUFFORCE = 0x21
427 SO_RCVLOWAT = 0x10
427 SO_RCVLOWAT = 0x10
428 SO_RCVMARK = 0x4b
428 SO_RCVMARK = 0x4b
429+ SO_RCVPRIORITY = 0x52
429 SO_RCVTIMEO = 0x12
430 SO_RCVTIMEO = 0x12
430 SO_RCVTIMEO_NEW = 0x42
431 SO_RCVTIMEO_NEW = 0x42
431 SO_RCVTIMEO_OLD = 0x12
432 SO_RCVTIMEO_OLD = 0x12
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go+1
@@ -430,6 +430,7 @@ const (
430 SO_RCVBUFFORCE = 0x21
430 SO_RCVBUFFORCE = 0x21
431 SO_RCVLOWAT = 0x10
431 SO_RCVLOWAT = 0x10
432 SO_RCVMARK = 0x4b
432 SO_RCVMARK = 0x4b
433+ SO_RCVPRIORITY = 0x52
433 SO_RCVTIMEO = 0x12
434 SO_RCVTIMEO = 0x12
434 SO_RCVTIMEO_NEW = 0x42
435 SO_RCVTIMEO_NEW = 0x42
435 SO_RCVTIMEO_OLD = 0x12
436 SO_RCVTIMEO_OLD = 0x12
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go+1
@@ -430,6 +430,7 @@ const (
430 SO_RCVBUFFORCE = 0x21
430 SO_RCVBUFFORCE = 0x21
431 SO_RCVLOWAT = 0x10
431 SO_RCVLOWAT = 0x10
432 SO_RCVMARK = 0x4b
432 SO_RCVMARK = 0x4b
433+ SO_RCVPRIORITY = 0x52
433 SO_RCVTIMEO = 0x12
434 SO_RCVTIMEO = 0x12
434 SO_RCVTIMEO_NEW = 0x42
435 SO_RCVTIMEO_NEW = 0x42
435 SO_RCVTIMEO_OLD = 0x12
436 SO_RCVTIMEO_OLD = 0x12
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go+1
@@ -362,6 +362,7 @@ const (
362 SO_RCVBUFFORCE = 0x21
362 SO_RCVBUFFORCE = 0x21
363 SO_RCVLOWAT = 0x12
363 SO_RCVLOWAT = 0x12
364 SO_RCVMARK = 0x4b
364 SO_RCVMARK = 0x4b
365+ SO_RCVPRIORITY = 0x52
365 SO_RCVTIMEO = 0x14
366 SO_RCVTIMEO = 0x14
366 SO_RCVTIMEO_NEW = 0x42
367 SO_RCVTIMEO_NEW = 0x42
367 SO_RCVTIMEO_OLD = 0x14
368 SO_RCVTIMEO_OLD = 0x14
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go+1
@@ -434,6 +434,7 @@ const (
434 SO_RCVBUFFORCE = 0x21
434 SO_RCVBUFFORCE = 0x21
435 SO_RCVLOWAT = 0x12
435 SO_RCVLOWAT = 0x12
436 SO_RCVMARK = 0x4b
436 SO_RCVMARK = 0x4b
437+ SO_RCVPRIORITY = 0x52
437 SO_RCVTIMEO = 0x14
438 SO_RCVTIMEO = 0x14
438 SO_RCVTIMEO_NEW = 0x42
439 SO_RCVTIMEO_NEW = 0x42
439 SO_RCVTIMEO_OLD = 0x14
440 SO_RCVTIMEO_OLD = 0x14
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go+1
@@ -473,6 +473,7 @@ const (
473 SO_RCVBUFFORCE = 0x100b
473 SO_RCVBUFFORCE = 0x100b
474 SO_RCVLOWAT = 0x800
474 SO_RCVLOWAT = 0x800
475 SO_RCVMARK = 0x54
475 SO_RCVMARK = 0x54
476+ SO_RCVPRIORITY = 0x5b
476 SO_RCVTIMEO = 0x2000
477 SO_RCVTIMEO = 0x2000
477 SO_RCVTIMEO_NEW = 0x44
478 SO_RCVTIMEO_NEW = 0x44
478 SO_RCVTIMEO_OLD = 0x2000
479 SO_RCVTIMEO_OLD = 0x2000
vendor/golang.org/x/sys/unix/ztypes_linux.go+101−7
@@ -114,7 +114,7 @@ type Statx_t struct {
114 Atomic_write_unit_min uint32
114 Atomic_write_unit_min uint32
115 Atomic_write_unit_max uint32
115 Atomic_write_unit_max uint32
116 Atomic_write_segments_max uint32
116 Atomic_write_segments_max uint32
117− _ [1]uint32
117+ Dio_read_offset_align uint32
118 _ [9]uint64
118 _ [9]uint64
119}
119}
120
120
@@ -2226,8 +2226,11 @@ const (
2226 NFT_PAYLOAD_LL_HEADER = 0x0
2226 NFT_PAYLOAD_LL_HEADER = 0x0
2227 NFT_PAYLOAD_NETWORK_HEADER = 0x1
2227 NFT_PAYLOAD_NETWORK_HEADER = 0x1
2228 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
2228 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
2229+ NFT_PAYLOAD_INNER_HEADER = 0x3
2230+ NFT_PAYLOAD_TUN_HEADER = 0x4
2229 NFT_PAYLOAD_CSUM_NONE = 0x0
2231 NFT_PAYLOAD_CSUM_NONE = 0x0
2230 NFT_PAYLOAD_CSUM_INET = 0x1
2232 NFT_PAYLOAD_CSUM_INET = 0x1
2233+ NFT_PAYLOAD_CSUM_SCTP = 0x2
2231 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
2234 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
2232 NFTA_PAYLOAD_UNSPEC = 0x0
2235 NFTA_PAYLOAD_UNSPEC = 0x0
2233 NFTA_PAYLOAD_DREG = 0x1
2236 NFTA_PAYLOAD_DREG = 0x1
@@ -3802,7 +3805,16 @@ const (
3802 ETHTOOL_MSG_PSE_GET = 0x24
3805 ETHTOOL_MSG_PSE_GET = 0x24
3803 ETHTOOL_MSG_PSE_SET = 0x25
3806 ETHTOOL_MSG_PSE_SET = 0x25
3804 ETHTOOL_MSG_RSS_GET = 0x26
3807 ETHTOOL_MSG_RSS_GET = 0x26
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
3805− ETHTOOL_MSG_USER_MAX = 0x2d
3817+ ETHTOOL_MSG_USER_MAX = 0x2f
3806 ETHTOOL_MSG_KERNEL_NONE = 0x0
3818 ETHTOOL_MSG_KERNEL_NONE = 0x0
3807 ETHTOOL_MSG_STRSET_GET_REPLY = 0x1
3819 ETHTOOL_MSG_STRSET_GET_REPLY = 0x1
3808 ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2
3820 ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2
@@ -3842,7 +3854,17 @@ const (
3842 ETHTOOL_MSG_MODULE_NTF = 0x24
3854 ETHTOOL_MSG_MODULE_NTF = 0x24
3843 ETHTOOL_MSG_PSE_GET_REPLY = 0x25
3855 ETHTOOL_MSG_PSE_GET_REPLY = 0x25
3844 ETHTOOL_MSG_RSS_GET_REPLY = 0x26
3856 ETHTOOL_MSG_RSS_GET_REPLY = 0x26
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
3845− ETHTOOL_MSG_KERNEL_MAX = 0x2e
3867+ ETHTOOL_MSG_KERNEL_MAX = 0x30
3846 ETHTOOL_FLAG_COMPACT_BITSETS = 0x1
3868 ETHTOOL_FLAG_COMPACT_BITSETS = 0x1
3847 ETHTOOL_FLAG_OMIT_REPLY = 0x2
3869 ETHTOOL_FLAG_OMIT_REPLY = 0x2
3848 ETHTOOL_FLAG_STATS = 0x4
3870 ETHTOOL_FLAG_STATS = 0x4
@@ -3949,7 +3971,12 @@ const (
3949 ETHTOOL_A_RINGS_TCP_DATA_SPLIT = 0xb
3971 ETHTOOL_A_RINGS_TCP_DATA_SPLIT = 0xb
3950 ETHTOOL_A_RINGS_CQE_SIZE = 0xc
3972 ETHTOOL_A_RINGS_CQE_SIZE = 0xc
3951 ETHTOOL_A_RINGS_TX_PUSH = 0xd
3973 ETHTOOL_A_RINGS_TX_PUSH = 0xd
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
3952− ETHTOOL_A_RINGS_MAX = 0x10
3979+ ETHTOOL_A_RINGS_MAX = 0x12
3953 ETHTOOL_A_CHANNELS_UNSPEC = 0x0
3980 ETHTOOL_A_CHANNELS_UNSPEC = 0x0
3954 ETHTOOL_A_CHANNELS_HEADER = 0x1
3981 ETHTOOL_A_CHANNELS_HEADER = 0x1
3955 ETHTOOL_A_CHANNELS_RX_MAX = 0x2
3982 ETHTOOL_A_CHANNELS_RX_MAX = 0x2
@@ -4015,7 +4042,9 @@ const (
4015 ETHTOOL_A_TSINFO_TX_TYPES = 0x3
4042 ETHTOOL_A_TSINFO_TX_TYPES = 0x3
4016 ETHTOOL_A_TSINFO_RX_FILTERS = 0x4
4043 ETHTOOL_A_TSINFO_RX_FILTERS = 0x4
4017 ETHTOOL_A_TSINFO_PHC_INDEX = 0x5
4044 ETHTOOL_A_TSINFO_PHC_INDEX = 0x5
4045+ ETHTOOL_A_TSINFO_STATS = 0x6
4046+ ETHTOOL_A_TSINFO_HWTSTAMP_PROVIDER = 0x7
4018− ETHTOOL_A_TSINFO_MAX = 0x6
4047+ ETHTOOL_A_TSINFO_MAX = 0x7
4019 ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0
4048 ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0
4020 ETHTOOL_A_CABLE_TEST_HEADER = 0x1
4049 ETHTOOL_A_CABLE_TEST_HEADER = 0x1
4021 ETHTOOL_A_CABLE_TEST_MAX = 0x1
4050 ETHTOOL_A_CABLE_TEST_MAX = 0x1
@@ -4613,6 +4642,7 @@ const (
4613 NL80211_ATTR_AKM_SUITES = 0x4c
4642 NL80211_ATTR_AKM_SUITES = 0x4c
4614 NL80211_ATTR_AP_ISOLATE = 0x60
4643 NL80211_ATTR_AP_ISOLATE = 0x60
4615 NL80211_ATTR_AP_SETTINGS_FLAGS = 0x135
4644 NL80211_ATTR_AP_SETTINGS_FLAGS = 0x135
4645+ NL80211_ATTR_ASSOC_SPP_AMSDU = 0x14a
4616 NL80211_ATTR_AUTH_DATA = 0x9c
4646 NL80211_ATTR_AUTH_DATA = 0x9c
4617 NL80211_ATTR_AUTH_TYPE = 0x35
4647 NL80211_ATTR_AUTH_TYPE = 0x35
4618 NL80211_ATTR_BANDS = 0xef
4648 NL80211_ATTR_BANDS = 0xef
@@ -4623,6 +4653,7 @@ const (
4623 NL80211_ATTR_BSS_BASIC_RATES = 0x24
4653 NL80211_ATTR_BSS_BASIC_RATES = 0x24
4624 NL80211_ATTR_BSS = 0x2f
4654 NL80211_ATTR_BSS = 0x2f
4625 NL80211_ATTR_BSS_CTS_PROT = 0x1c
4655 NL80211_ATTR_BSS_CTS_PROT = 0x1c
4656+ NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA = 0x147
4626 NL80211_ATTR_BSS_HT_OPMODE = 0x6d
4657 NL80211_ATTR_BSS_HT_OPMODE = 0x6d
4627 NL80211_ATTR_BSSID = 0xf5
4658 NL80211_ATTR_BSSID = 0xf5
4628 NL80211_ATTR_BSS_SELECT = 0xe3
4659 NL80211_ATTR_BSS_SELECT = 0xe3
@@ -4682,6 +4713,7 @@ const (
4682 NL80211_ATTR_DTIM_PERIOD = 0xd
4713 NL80211_ATTR_DTIM_PERIOD = 0xd
4683 NL80211_ATTR_DURATION = 0x57
4714 NL80211_ATTR_DURATION = 0x57
4684 NL80211_ATTR_EHT_CAPABILITY = 0x136
4715 NL80211_ATTR_EHT_CAPABILITY = 0x136
4716+ NL80211_ATTR_EMA_RNR_ELEMS = 0x145
4685 NL80211_ATTR_EML_CAPABILITY = 0x13d
4717 NL80211_ATTR_EML_CAPABILITY = 0x13d
4686 NL80211_ATTR_EXT_CAPA = 0xa9
4718 NL80211_ATTR_EXT_CAPA = 0xa9
4687 NL80211_ATTR_EXT_CAPA_MASK = 0xaa
4719 NL80211_ATTR_EXT_CAPA_MASK = 0xaa
@@ -4717,6 +4749,7 @@ const (
4717 NL80211_ATTR_HIDDEN_SSID = 0x7e
4749 NL80211_ATTR_HIDDEN_SSID = 0x7e
4718 NL80211_ATTR_HT_CAPABILITY = 0x1f
4750 NL80211_ATTR_HT_CAPABILITY = 0x1f
4719 NL80211_ATTR_HT_CAPABILITY_MASK = 0x94
4751 NL80211_ATTR_HT_CAPABILITY_MASK = 0x94
4752+ NL80211_ATTR_HW_TIMESTAMP_ENABLED = 0x144
4720 NL80211_ATTR_IE_ASSOC_RESP = 0x80
4753 NL80211_ATTR_IE_ASSOC_RESP = 0x80
4721 NL80211_ATTR_IE = 0x2a
4754 NL80211_ATTR_IE = 0x2a
4722 NL80211_ATTR_IE_PROBE_RESP = 0x7f
4755 NL80211_ATTR_IE_PROBE_RESP = 0x7f
@@ -4747,9 +4780,10 @@ const (
4747 NL80211_ATTR_MAC_HINT = 0xc8
4780 NL80211_ATTR_MAC_HINT = 0xc8
4748 NL80211_ATTR_MAC_MASK = 0xd7
4781 NL80211_ATTR_MAC_MASK = 0xd7
4749 NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca
4782 NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca
4750− NL80211_ATTR_MAX = 0x14d
4783+ NL80211_ATTR_MAX = 0x150
4751 NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4
4784 NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4
4752 NL80211_ATTR_MAX_CSA_COUNTERS = 0xce
4785 NL80211_ATTR_MAX_CSA_COUNTERS = 0xce
4786+ NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS = 0x143
4753 NL80211_ATTR_MAX_MATCH_SETS = 0x85
4787 NL80211_ATTR_MAX_MATCH_SETS = 0x85
4754 NL80211_ATTR_MAX_NUM_AKM_SUITES = 0x13c
4788 NL80211_ATTR_MAX_NUM_AKM_SUITES = 0x13c
4755 NL80211_ATTR_MAX_NUM_PMKIDS = 0x56
4789 NL80211_ATTR_MAX_NUM_PMKIDS = 0x56
@@ -4774,9 +4808,12 @@ const (
4774 NL80211_ATTR_MGMT_SUBTYPE = 0x29
4808 NL80211_ATTR_MGMT_SUBTYPE = 0x29
4775 NL80211_ATTR_MLD_ADDR = 0x13a
4809 NL80211_ATTR_MLD_ADDR = 0x13a
4776 NL80211_ATTR_MLD_CAPA_AND_OPS = 0x13e
4810 NL80211_ATTR_MLD_CAPA_AND_OPS = 0x13e
4811+ NL80211_ATTR_MLO_LINK_DISABLED = 0x146
4777 NL80211_ATTR_MLO_LINK_ID = 0x139
4812 NL80211_ATTR_MLO_LINK_ID = 0x139
4778 NL80211_ATTR_MLO_LINKS = 0x138
4813 NL80211_ATTR_MLO_LINKS = 0x138
4779 NL80211_ATTR_MLO_SUPPORT = 0x13b
4814 NL80211_ATTR_MLO_SUPPORT = 0x13b
4815+ NL80211_ATTR_MLO_TTLM_DLINK = 0x148
4816+ NL80211_ATTR_MLO_TTLM_ULINK = 0x149
4780 NL80211_ATTR_MNTR_FLAGS = 0x17
4817 NL80211_ATTR_MNTR_FLAGS = 0x17
4781 NL80211_ATTR_MPATH_INFO = 0x1b
4818 NL80211_ATTR_MPATH_INFO = 0x1b
4782 NL80211_ATTR_MPATH_NEXT_HOP = 0x1a
4819 NL80211_ATTR_MPATH_NEXT_HOP = 0x1a
@@ -4809,12 +4846,14 @@ const (
4809 NL80211_ATTR_PORT_AUTHORIZED = 0x103
4846 NL80211_ATTR_PORT_AUTHORIZED = 0x103
4810 NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN = 0x5
4847 NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN = 0x5
4811 NL80211_ATTR_POWER_RULE_MAX_EIRP = 0x6
4848 NL80211_ATTR_POWER_RULE_MAX_EIRP = 0x6
4849+ NL80211_ATTR_POWER_RULE_PSD = 0x8
4812 NL80211_ATTR_PREV_BSSID = 0x4f
4850 NL80211_ATTR_PREV_BSSID = 0x4f
4813 NL80211_ATTR_PRIVACY = 0x46
4851 NL80211_ATTR_PRIVACY = 0x46
4814 NL80211_ATTR_PROBE_RESP = 0x91
4852 NL80211_ATTR_PROBE_RESP = 0x91
4815 NL80211_ATTR_PROBE_RESP_OFFLOAD = 0x90
4853 NL80211_ATTR_PROBE_RESP_OFFLOAD = 0x90
4816 NL80211_ATTR_PROTOCOL_FEATURES = 0xad
4854 NL80211_ATTR_PROTOCOL_FEATURES = 0xad
4817 NL80211_ATTR_PS_STATE = 0x5d
4855 NL80211_ATTR_PS_STATE = 0x5d
4856+ NL80211_ATTR_PUNCT_BITMAP = 0x142
4818 NL80211_ATTR_QOS_MAP = 0xc7
4857 NL80211_ATTR_QOS_MAP = 0xc7
4819 NL80211_ATTR_RADAR_BACKGROUND = 0x134
4858 NL80211_ATTR_RADAR_BACKGROUND = 0x134
4820 NL80211_ATTR_RADAR_EVENT = 0xa8
4859 NL80211_ATTR_RADAR_EVENT = 0xa8
@@ -4943,7 +4982,9 @@ const (
4943 NL80211_ATTR_WIPHY_FREQ = 0x26
4982 NL80211_ATTR_WIPHY_FREQ = 0x26
4944 NL80211_ATTR_WIPHY_FREQ_HINT = 0xc9
4983 NL80211_ATTR_WIPHY_FREQ_HINT = 0xc9
4945 NL80211_ATTR_WIPHY_FREQ_OFFSET = 0x122
4984 NL80211_ATTR_WIPHY_FREQ_OFFSET = 0x122
4985+ NL80211_ATTR_WIPHY_INTERFACE_COMBINATIONS = 0x14c
4946 NL80211_ATTR_WIPHY_NAME = 0x2
4986 NL80211_ATTR_WIPHY_NAME = 0x2
4987+ NL80211_ATTR_WIPHY_RADIOS = 0x14b
4947 NL80211_ATTR_WIPHY_RETRY_LONG = 0x3e
4988 NL80211_ATTR_WIPHY_RETRY_LONG = 0x3e
4948 NL80211_ATTR_WIPHY_RETRY_SHORT = 0x3d
4989 NL80211_ATTR_WIPHY_RETRY_SHORT = 0x3d
4949 NL80211_ATTR_WIPHY_RTS_THRESHOLD = 0x40
4990 NL80211_ATTR_WIPHY_RTS_THRESHOLD = 0x40
@@ -4978,6 +5019,8 @@ const (
4978 NL80211_BAND_ATTR_IFTYPE_DATA = 0x9
5019 NL80211_BAND_ATTR_IFTYPE_DATA = 0x9
4979 NL80211_BAND_ATTR_MAX = 0xd
5020 NL80211_BAND_ATTR_MAX = 0xd
4980 NL80211_BAND_ATTR_RATES = 0x2
5021 NL80211_BAND_ATTR_RATES = 0x2
5022+ NL80211_BAND_ATTR_S1G_CAPA = 0xd
5023+ NL80211_BAND_ATTR_S1G_MCS_NSS_SET = 0xc
4981 NL80211_BAND_ATTR_VHT_CAPA = 0x8
5024 NL80211_BAND_ATTR_VHT_CAPA = 0x8
4982 NL80211_BAND_ATTR_VHT_MCS_SET = 0x7
5025 NL80211_BAND_ATTR_VHT_MCS_SET = 0x7
4983 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC = 0x8
5026 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC = 0x8
@@ -5001,6 +5044,10 @@ const (
5001 NL80211_BSS_BEACON_INTERVAL = 0x4
5044 NL80211_BSS_BEACON_INTERVAL = 0x4
5002 NL80211_BSS_BEACON_TSF = 0xd
5045 NL80211_BSS_BEACON_TSF = 0xd
5003 NL80211_BSS_BSSID = 0x1
5046 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
5004 NL80211_BSS_CAPABILITY = 0x5
5051 NL80211_BSS_CAPABILITY = 0x5
5005 NL80211_BSS_CHAIN_SIGNAL = 0x13
5052 NL80211_BSS_CHAIN_SIGNAL = 0x13
5006 NL80211_BSS_CHAN_WIDTH_10 = 0x1
5053 NL80211_BSS_CHAN_WIDTH_10 = 0x1
@@ -5032,6 +5079,9 @@ const (
5032 NL80211_BSS_STATUS = 0x9
5079 NL80211_BSS_STATUS = 0x9
5033 NL80211_BSS_STATUS_IBSS_JOINED = 0x2
5080 NL80211_BSS_STATUS_IBSS_JOINED = 0x2
5034 NL80211_BSS_TSF = 0x3
5081 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
5035 NL80211_CHAN_HT20 = 0x1
5085 NL80211_CHAN_HT20 = 0x1
5036 NL80211_CHAN_HT40MINUS = 0x2
5086 NL80211_CHAN_HT40MINUS = 0x2
5037 NL80211_CHAN_HT40PLUS = 0x3
5087 NL80211_CHAN_HT40PLUS = 0x3
@@ -5117,7 +5167,8 @@ const (
5117 NL80211_CMD_LEAVE_IBSS = 0x2c
5167 NL80211_CMD_LEAVE_IBSS = 0x2c
5118 NL80211_CMD_LEAVE_MESH = 0x45
5168 NL80211_CMD_LEAVE_MESH = 0x45
5119 NL80211_CMD_LEAVE_OCB = 0x6d
5169 NL80211_CMD_LEAVE_OCB = 0x6d
5170+ NL80211_CMD_LINKS_REMOVED = 0x9a
5120− NL80211_CMD_MAX = 0x9b
5171+ NL80211_CMD_MAX = 0x9d
5121 NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29
5172 NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29
5122 NL80211_CMD_MODIFY_LINK_STA = 0x97
5173 NL80211_CMD_MODIFY_LINK_STA = 0x97
5123 NL80211_CMD_NAN_MATCH = 0x78
5174 NL80211_CMD_NAN_MATCH = 0x78
@@ -5161,6 +5212,7 @@ const (
5161 NL80211_CMD_SET_COALESCE = 0x65
5212 NL80211_CMD_SET_COALESCE = 0x65
5162 NL80211_CMD_SET_CQM = 0x3f
5213 NL80211_CMD_SET_CQM = 0x3f
5163 NL80211_CMD_SET_FILS_AAD = 0x92
5214 NL80211_CMD_SET_FILS_AAD = 0x92
5215+ NL80211_CMD_SET_HW_TIMESTAMP = 0x99
5164 NL80211_CMD_SET_INTERFACE = 0x6
5216 NL80211_CMD_SET_INTERFACE = 0x6
5165 NL80211_CMD_SET_KEY = 0xa
5217 NL80211_CMD_SET_KEY = 0xa
5166 NL80211_CMD_SET_MAC_ACL = 0x5d
5218 NL80211_CMD_SET_MAC_ACL = 0x5d
@@ -5180,6 +5232,7 @@ const (
5180 NL80211_CMD_SET_SAR_SPECS = 0x8c
5232 NL80211_CMD_SET_SAR_SPECS = 0x8c
5181 NL80211_CMD_SET_STATION = 0x12
5233 NL80211_CMD_SET_STATION = 0x12
5182 NL80211_CMD_SET_TID_CONFIG = 0x89
5234 NL80211_CMD_SET_TID_CONFIG = 0x89
5235+ NL80211_CMD_SET_TID_TO_LINK_MAPPING = 0x9b
5183 NL80211_CMD_SET_TX_BITRATE_MASK = 0x39
5236 NL80211_CMD_SET_TX_BITRATE_MASK = 0x39
5184 NL80211_CMD_SET_WDS_PEER = 0x42
5237 NL80211_CMD_SET_WDS_PEER = 0x42
5185 NL80211_CMD_SET_WIPHY = 0x2
5238 NL80211_CMD_SET_WIPHY = 0x2
@@ -5247,6 +5300,7 @@ const (
5247 NL80211_EXT_FEATURE_AIRTIME_FAIRNESS = 0x21
5300 NL80211_EXT_FEATURE_AIRTIME_FAIRNESS = 0x21
5248 NL80211_EXT_FEATURE_AP_PMKSA_CACHING = 0x22
5301 NL80211_EXT_FEATURE_AP_PMKSA_CACHING = 0x22
5249 NL80211_EXT_FEATURE_AQL = 0x28
5302 NL80211_EXT_FEATURE_AQL = 0x28
5303+ NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA = 0x40
5250 NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT = 0x2e
5304 NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT = 0x2e
5251 NL80211_EXT_FEATURE_BEACON_PROTECTION = 0x29
5305 NL80211_EXT_FEATURE_BEACON_PROTECTION = 0x29
5252 NL80211_EXT_FEATURE_BEACON_RATE_HE = 0x36
5306 NL80211_EXT_FEATURE_BEACON_RATE_HE = 0x36
@@ -5262,6 +5316,7 @@ const (
5262 NL80211_EXT_FEATURE_CQM_RSSI_LIST = 0xd
5316 NL80211_EXT_FEATURE_CQM_RSSI_LIST = 0xd
5263 NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = 0x1b
5317 NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = 0x1b
5264 NL80211_EXT_FEATURE_DEL_IBSS_STA = 0x2c
5318 NL80211_EXT_FEATURE_DEL_IBSS_STA = 0x2c
5319+ NL80211_EXT_FEATURE_DFS_CONCURRENT = 0x43
5265 NL80211_EXT_FEATURE_DFS_OFFLOAD = 0x19
5320 NL80211_EXT_FEATURE_DFS_OFFLOAD = 0x19
5266 NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER = 0x20
5321 NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER = 0x20
5267 NL80211_EXT_FEATURE_EXT_KEY_ID = 0x24
5322 NL80211_EXT_FEATURE_EXT_KEY_ID = 0x24
@@ -5281,9 +5336,12 @@ const (
5281 NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 0x14
5336 NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 0x14
5282 NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE = 0x13
5337 NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE = 0x13
5283 NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION = 0x31
5338 NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION = 0x31
5339+ NL80211_EXT_FEATURE_OWE_OFFLOAD_AP = 0x42
5340+ NL80211_EXT_FEATURE_OWE_OFFLOAD = 0x41
5284 NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE = 0x3d
5341 NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE = 0x3d
5285 NL80211_EXT_FEATURE_PROTECTED_TWT = 0x2b
5342 NL80211_EXT_FEATURE_PROTECTED_TWT = 0x2b
5286 NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE = 0x39
5343 NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE = 0x39
5344+ NL80211_EXT_FEATURE_PUNCT = 0x3e
5287 NL80211_EXT_FEATURE_RADAR_BACKGROUND = 0x3c
5345 NL80211_EXT_FEATURE_RADAR_BACKGROUND = 0x3c
5288 NL80211_EXT_FEATURE_RRM = 0x1
5346 NL80211_EXT_FEATURE_RRM = 0x1
5289 NL80211_EXT_FEATURE_SAE_OFFLOAD_AP = 0x33
5347 NL80211_EXT_FEATURE_SAE_OFFLOAD_AP = 0x33
@@ -5295,8 +5353,10 @@ const (
5295 NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD = 0x23
5353 NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD = 0x23
5296 NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI = 0xc
5354 NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI = 0xc
5297 NL80211_EXT_FEATURE_SECURE_LTF = 0x37
5355 NL80211_EXT_FEATURE_SECURE_LTF = 0x37
5356+ NL80211_EXT_FEATURE_SECURE_NAN = 0x3f
5298 NL80211_EXT_FEATURE_SECURE_RTT = 0x38
5357 NL80211_EXT_FEATURE_SECURE_RTT = 0x38
5299 NL80211_EXT_FEATURE_SET_SCAN_DWELL = 0x5
5358 NL80211_EXT_FEATURE_SET_SCAN_DWELL = 0x5
5359+ NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT = 0x44
5300 NL80211_EXT_FEATURE_STA_TX_PWR = 0x25
5360 NL80211_EXT_FEATURE_STA_TX_PWR = 0x25
5301 NL80211_EXT_FEATURE_TXQS = 0x1c
5361 NL80211_EXT_FEATURE_TXQS = 0x1c
5302 NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP = 0x35
5362 NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP = 0x35
@@ -5343,7 +5403,10 @@ const (
5343 NL80211_FREQUENCY_ATTR_2MHZ = 0x16
5403 NL80211_FREQUENCY_ATTR_2MHZ = 0x16
5344 NL80211_FREQUENCY_ATTR_4MHZ = 0x17
5404 NL80211_FREQUENCY_ATTR_4MHZ = 0x17
5345 NL80211_FREQUENCY_ATTR_8MHZ = 0x18
5405 NL80211_FREQUENCY_ATTR_8MHZ = 0x18
5406+ NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP = 0x21
5407+ NL80211_FREQUENCY_ATTR_CAN_MONITOR = 0x20
5346 NL80211_FREQUENCY_ATTR_DFS_CAC_TIME = 0xd
5408 NL80211_FREQUENCY_ATTR_DFS_CAC_TIME = 0xd
5409+ NL80211_FREQUENCY_ATTR_DFS_CONCURRENT = 0x1d
5347 NL80211_FREQUENCY_ATTR_DFS_STATE = 0x7
5410 NL80211_FREQUENCY_ATTR_DFS_STATE = 0x7
5348 NL80211_FREQUENCY_ATTR_DFS_TIME = 0x8
5411 NL80211_FREQUENCY_ATTR_DFS_TIME = 0x8
5349 NL80211_FREQUENCY_ATTR_DISABLED = 0x2
5412 NL80211_FREQUENCY_ATTR_DISABLED = 0x2
@@ -5357,6 +5420,8 @@ const (
5357 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc
5420 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc
5358 NL80211_FREQUENCY_ATTR_NO_20MHZ = 0x10
5421 NL80211_FREQUENCY_ATTR_NO_20MHZ = 0x10
5359 NL80211_FREQUENCY_ATTR_NO_320MHZ = 0x1a
5422 NL80211_FREQUENCY_ATTR_NO_320MHZ = 0x1a
5423+ NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT = 0x1f
5424+ NL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT = 0x1e
5360 NL80211_FREQUENCY_ATTR_NO_80MHZ = 0xb
5425 NL80211_FREQUENCY_ATTR_NO_80MHZ = 0xb
5361 NL80211_FREQUENCY_ATTR_NO_EHT = 0x1b
5426 NL80211_FREQUENCY_ATTR_NO_EHT = 0x1b
5362 NL80211_FREQUENCY_ATTR_NO_HE = 0x13
5427 NL80211_FREQUENCY_ATTR_NO_HE = 0x13
@@ -5364,8 +5429,11 @@ const (
5364 NL80211_FREQUENCY_ATTR_NO_HT40_PLUS = 0xa
5429 NL80211_FREQUENCY_ATTR_NO_HT40_PLUS = 0xa
5365 NL80211_FREQUENCY_ATTR_NO_IBSS = 0x3
5430 NL80211_FREQUENCY_ATTR_NO_IBSS = 0x3
5366 NL80211_FREQUENCY_ATTR_NO_IR = 0x3
5431 NL80211_FREQUENCY_ATTR_NO_IR = 0x3
5432+ NL80211_FREQUENCY_ATTR_NO_UHB_AFC_CLIENT = 0x1f
5433+ NL80211_FREQUENCY_ATTR_NO_UHB_VLP_CLIENT = 0x1e
5367 NL80211_FREQUENCY_ATTR_OFFSET = 0x14
5434 NL80211_FREQUENCY_ATTR_OFFSET = 0x14
5368 NL80211_FREQUENCY_ATTR_PASSIVE_SCAN = 0x3
5435 NL80211_FREQUENCY_ATTR_PASSIVE_SCAN = 0x3
5436+ NL80211_FREQUENCY_ATTR_PSD = 0x1c
5369 NL80211_FREQUENCY_ATTR_RADAR = 0x5
5437 NL80211_FREQUENCY_ATTR_RADAR = 0x5
5370 NL80211_FREQUENCY_ATTR_WMM = 0x12
5438 NL80211_FREQUENCY_ATTR_WMM = 0x12
5371 NL80211_FTM_RESP_ATTR_CIVICLOC = 0x3
5439 NL80211_FTM_RESP_ATTR_CIVICLOC = 0x3
@@ -5430,6 +5498,7 @@ const (
5430 NL80211_IFTYPE_STATION = 0x2
5498 NL80211_IFTYPE_STATION = 0x2
5431 NL80211_IFTYPE_UNSPECIFIED = 0x0
5499 NL80211_IFTYPE_UNSPECIFIED = 0x0
5432 NL80211_IFTYPE_WDS = 0x5
5500 NL80211_IFTYPE_WDS = 0x5
5501+ NL80211_KCK_EXT_LEN_32 = 0x20
5433 NL80211_KCK_EXT_LEN = 0x18
5502 NL80211_KCK_EXT_LEN = 0x18
5434 NL80211_KCK_LEN = 0x10
5503 NL80211_KCK_LEN = 0x10
5435 NL80211_KEK_EXT_LEN = 0x20
5504 NL80211_KEK_EXT_LEN = 0x20
@@ -5458,6 +5527,7 @@ const (
5458 NL80211_MAX_SUPP_HT_RATES = 0x4d
5527 NL80211_MAX_SUPP_HT_RATES = 0x4d
5459 NL80211_MAX_SUPP_RATES = 0x20
5528 NL80211_MAX_SUPP_RATES = 0x20
5460 NL80211_MAX_SUPP_REG_RULES = 0x80
5529 NL80211_MAX_SUPP_REG_RULES = 0x80
5530+ NL80211_MAX_SUPP_SELECTORS = 0x80
5461 NL80211_MBSSID_CONFIG_ATTR_EMA = 0x5
5531 NL80211_MBSSID_CONFIG_ATTR_EMA = 0x5
5462 NL80211_MBSSID_CONFIG_ATTR_INDEX = 0x3
5532 NL80211_MBSSID_CONFIG_ATTR_INDEX = 0x3
5463 NL80211_MBSSID_CONFIG_ATTR_MAX = 0x5
5533 NL80211_MBSSID_CONFIG_ATTR_MAX = 0x5
@@ -5703,11 +5773,16 @@ const (
5703 NL80211_RADAR_PRE_CAC_EXPIRED = 0x4
5773 NL80211_RADAR_PRE_CAC_EXPIRED = 0x4
5704 NL80211_RATE_INFO_10_MHZ_WIDTH = 0xb
5774 NL80211_RATE_INFO_10_MHZ_WIDTH = 0xb
5705 NL80211_RATE_INFO_160_MHZ_WIDTH = 0xa
5775 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
5706 NL80211_RATE_INFO_320_MHZ_WIDTH = 0x12
5779 NL80211_RATE_INFO_320_MHZ_WIDTH = 0x12
5707 NL80211_RATE_INFO_40_MHZ_WIDTH = 0x3
5780 NL80211_RATE_INFO_40_MHZ_WIDTH = 0x3
5781+ NL80211_RATE_INFO_4_MHZ_WIDTH = 0x1b
5708 NL80211_RATE_INFO_5_MHZ_WIDTH = 0xc
5782 NL80211_RATE_INFO_5_MHZ_WIDTH = 0xc
5709 NL80211_RATE_INFO_80_MHZ_WIDTH = 0x8
5783 NL80211_RATE_INFO_80_MHZ_WIDTH = 0x8
5710 NL80211_RATE_INFO_80P80_MHZ_WIDTH = 0x9
5784 NL80211_RATE_INFO_80P80_MHZ_WIDTH = 0x9
5785+ NL80211_RATE_INFO_8_MHZ_WIDTH = 0x1c
5711 NL80211_RATE_INFO_BITRATE32 = 0x5
5786 NL80211_RATE_INFO_BITRATE32 = 0x5
5712 NL80211_RATE_INFO_BITRATE = 0x1
5787 NL80211_RATE_INFO_BITRATE = 0x1
5713 NL80211_RATE_INFO_EHT_GI_0_8 = 0x0
5788 NL80211_RATE_INFO_EHT_GI_0_8 = 0x0
@@ -5753,6 +5828,8 @@ const (
5753 NL80211_RATE_INFO_HE_RU_ALLOC = 0x11
5828 NL80211_RATE_INFO_HE_RU_ALLOC = 0x11
5754 NL80211_RATE_INFO_MAX = 0x1d
5829 NL80211_RATE_INFO_MAX = 0x1d
5755 NL80211_RATE_INFO_MCS = 0x2
5830 NL80211_RATE_INFO_MCS = 0x2
5831+ NL80211_RATE_INFO_S1G_MCS = 0x17
5832+ NL80211_RATE_INFO_S1G_NSS = 0x18
5756 NL80211_RATE_INFO_SHORT_GI = 0x4
5833 NL80211_RATE_INFO_SHORT_GI = 0x4
5757 NL80211_RATE_INFO_VHT_MCS = 0x6
5834 NL80211_RATE_INFO_VHT_MCS = 0x6
5758 NL80211_RATE_INFO_VHT_NSS = 0x7
5835 NL80211_RATE_INFO_VHT_NSS = 0x7
@@ -5770,14 +5847,19 @@ const (
5770 NL80211_REKEY_DATA_KEK = 0x1
5847 NL80211_REKEY_DATA_KEK = 0x1
5771 NL80211_REKEY_DATA_REPLAY_CTR = 0x3
5848 NL80211_REKEY_DATA_REPLAY_CTR = 0x3
5772 NL80211_REPLAY_CTR_LEN = 0x8
5849 NL80211_REPLAY_CTR_LEN = 0x8
5850+ NL80211_RRF_ALLOW_6GHZ_VLP_AP = 0x1000000
5773 NL80211_RRF_AUTO_BW = 0x800
5851 NL80211_RRF_AUTO_BW = 0x800
5774 NL80211_RRF_DFS = 0x10
5852 NL80211_RRF_DFS = 0x10
5853+ NL80211_RRF_DFS_CONCURRENT = 0x200000
5775 NL80211_RRF_GO_CONCURRENT = 0x1000
5854 NL80211_RRF_GO_CONCURRENT = 0x1000
5776 NL80211_RRF_IR_CONCURRENT = 0x1000
5855 NL80211_RRF_IR_CONCURRENT = 0x1000
5777 NL80211_RRF_NO_160MHZ = 0x10000
5856 NL80211_RRF_NO_160MHZ = 0x10000
5778 NL80211_RRF_NO_320MHZ = 0x40000
5857 NL80211_RRF_NO_320MHZ = 0x40000
5858+ NL80211_RRF_NO_6GHZ_AFC_CLIENT = 0x800000
5859+ NL80211_RRF_NO_6GHZ_VLP_CLIENT = 0x400000
5779 NL80211_RRF_NO_80MHZ = 0x8000
5860 NL80211_RRF_NO_80MHZ = 0x8000
5780 NL80211_RRF_NO_CCK = 0x2
5861 NL80211_RRF_NO_CCK = 0x2
5862+ NL80211_RRF_NO_EHT = 0x80000
5781 NL80211_RRF_NO_HE = 0x20000
5863 NL80211_RRF_NO_HE = 0x20000
5782 NL80211_RRF_NO_HT40 = 0x6000
5864 NL80211_RRF_NO_HT40 = 0x6000
5783 NL80211_RRF_NO_HT40MINUS = 0x2000
5865 NL80211_RRF_NO_HT40MINUS = 0x2000
@@ -5788,7 +5870,10 @@ const (
5788 NL80211_RRF_NO_IR = 0x80
5870 NL80211_RRF_NO_IR = 0x80
5789 NL80211_RRF_NO_OFDM = 0x1
5871 NL80211_RRF_NO_OFDM = 0x1
5790 NL80211_RRF_NO_OUTDOOR = 0x8
5872 NL80211_RRF_NO_OUTDOOR = 0x8
5873+ NL80211_RRF_NO_UHB_AFC_CLIENT = 0x800000
5874+ NL80211_RRF_NO_UHB_VLP_CLIENT = 0x400000
5791 NL80211_RRF_PASSIVE_SCAN = 0x80
5875 NL80211_RRF_PASSIVE_SCAN = 0x80
5876+ NL80211_RRF_PSD = 0x100000
5792 NL80211_RRF_PTMP_ONLY = 0x40
5877 NL80211_RRF_PTMP_ONLY = 0x40
5793 NL80211_RRF_PTP_ONLY = 0x20
5878 NL80211_RRF_PTP_ONLY = 0x20
5794 NL80211_RXMGMT_FLAG_ANSWERED = 0x1
5879 NL80211_RXMGMT_FLAG_ANSWERED = 0x1
@@ -5849,6 +5934,7 @@ const (
5849 NL80211_STA_FLAG_MAX_OLD_API = 0x6
5934 NL80211_STA_FLAG_MAX_OLD_API = 0x6
5850 NL80211_STA_FLAG_MFP = 0x4
5935 NL80211_STA_FLAG_MFP = 0x4
5851 NL80211_STA_FLAG_SHORT_PREAMBLE = 0x2
5936 NL80211_STA_FLAG_SHORT_PREAMBLE = 0x2
5937+ NL80211_STA_FLAG_SPP_AMSDU = 0x8
5852 NL80211_STA_FLAG_TDLS_PEER = 0x6
5938 NL80211_STA_FLAG_TDLS_PEER = 0x6
5853 NL80211_STA_FLAG_WME = 0x3
5939 NL80211_STA_FLAG_WME = 0x3
5854 NL80211_STA_INFO_ACK_SIGNAL_AVG = 0x23
5940 NL80211_STA_INFO_ACK_SIGNAL_AVG = 0x23
@@ -6007,6 +6093,13 @@ const (
6007 NL80211_VHT_CAPABILITY_LEN = 0xc
6093 NL80211_VHT_CAPABILITY_LEN = 0xc
6008 NL80211_VHT_NSS_MAX = 0x8
6094 NL80211_VHT_NSS_MAX = 0x8
6009 NL80211_WIPHY_NAME_MAXLEN = 0x40
6095 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
6010 NL80211_WMMR_AIFSN = 0x3
6103 NL80211_WMMR_AIFSN = 0x3
6011 NL80211_WMMR_CW_MAX = 0x2
6104 NL80211_WMMR_CW_MAX = 0x2
6012 NL80211_WMMR_CW_MIN = 0x1
6105 NL80211_WMMR_CW_MIN = 0x1
@@ -6038,6 +6131,7 @@ const (
6038 NL80211_WOWLAN_TRIG_PKT_PATTERN = 0x4
6131 NL80211_WOWLAN_TRIG_PKT_PATTERN = 0x4
6039 NL80211_WOWLAN_TRIG_RFKILL_RELEASE = 0x9
6132 NL80211_WOWLAN_TRIG_RFKILL_RELEASE = 0x9
6040 NL80211_WOWLAN_TRIG_TCP_CONNECTION = 0xe
6133 NL80211_WOWLAN_TRIG_TCP_CONNECTION = 0xe
6134+ NL80211_WOWLAN_TRIG_UNPROTECTED_DEAUTH_DISASSOC = 0x14
6041 NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211 = 0xa
6135 NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211 = 0xa
6042 NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN = 0xb
6136 NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN = 0xb
6043 NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023 = 0xc
6137 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 {
285 _ [4]byte
285 _ [4]byte
286 Cpu_count uint64
286 Cpu_count uint64
287 Cpu_delay_total uint64
287 Cpu_delay_total uint64
288+ Cpu_delay_max uint64
289+ Cpu_delay_min uint64
288 Blkio_count uint64
290 Blkio_count uint64
289 Blkio_delay_total uint64
291 Blkio_delay_total uint64
292+ Blkio_delay_max uint64
293+ Blkio_delay_min uint64
290 Swapin_count uint64
294 Swapin_count uint64
291 Swapin_delay_total uint64
295 Swapin_delay_total uint64
296+ Swapin_delay_max uint64
297+ Swapin_delay_min uint64
292 Cpu_run_real_total uint64
298 Cpu_run_real_total uint64
293 Cpu_run_virtual_total uint64
299 Cpu_run_virtual_total uint64
294 Ac_comm [32]int8
300 Ac_comm [32]int8
@@ -324,11 +330,17 @@ type Taskstats struct {
324 Cpu_scaled_run_real_total uint64
330 Cpu_scaled_run_real_total uint64
325 Freepages_count uint64
331 Freepages_count uint64
326 Freepages_delay_total uint64
332 Freepages_delay_total uint64
333+ Freepages_delay_max uint64
334+ Freepages_delay_min uint64
327 Thrashing_count uint64
335 Thrashing_count uint64
328 Thrashing_delay_total uint64
336 Thrashing_delay_total uint64
337+ Thrashing_delay_max uint64
338+ Thrashing_delay_min uint64
329 Ac_btime64 uint64
339 Ac_btime64 uint64
330 Compact_count uint64
340 Compact_count uint64
331 Compact_delay_total uint64
341 Compact_delay_total uint64
342+ Compact_delay_max uint64
343+ Compact_delay_min uint64
332 Ac_tgid uint32
344 Ac_tgid uint32
333 _ [4]byte
345 _ [4]byte
334 Ac_tgetime uint64
346 Ac_tgetime uint64
@@ -336,8 +348,12 @@ type Taskstats struct {
336 Ac_exe_inode uint64
348 Ac_exe_inode uint64
337 Wpcopy_count uint64
349 Wpcopy_count uint64
338 Wpcopy_delay_total uint64
350 Wpcopy_delay_total uint64
351+ Wpcopy_delay_max uint64
352+ Wpcopy_delay_min uint64
339 Irq_count uint64
353 Irq_count uint64
340 Irq_delay_total uint64
354 Irq_delay_total uint64
355+ Irq_delay_max uint64
356+ Irq_delay_min uint64
341}
357}
342
358
343type cpuMask uint32
359type cpuMask uint32
vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go+16
@@ -300,10 +300,16 @@ type Taskstats struct {
300 Ac_nice uint8
300 Ac_nice uint8
301 Cpu_count uint64
301 Cpu_count uint64
302 Cpu_delay_total uint64
302 Cpu_delay_total uint64
303+ Cpu_delay_max uint64
304+ Cpu_delay_min uint64
303 Blkio_count uint64
305 Blkio_count uint64
304 Blkio_delay_total uint64
306 Blkio_delay_total uint64
307+ Blkio_delay_max uint64
308+ Blkio_delay_min uint64
305 Swapin_count uint64
309 Swapin_count uint64
306 Swapin_delay_total uint64
310 Swapin_delay_total uint64
311+ Swapin_delay_max uint64
312+ Swapin_delay_min uint64
307 Cpu_run_real_total uint64
313 Cpu_run_real_total uint64
308 Cpu_run_virtual_total uint64
314 Cpu_run_virtual_total uint64
309 Ac_comm [32]int8
315 Ac_comm [32]int8
@@ -338,19 +344,29 @@ type Taskstats struct {
338 Cpu_scaled_run_real_total uint64
344 Cpu_scaled_run_real_total uint64
339 Freepages_count uint64
345 Freepages_count uint64
340 Freepages_delay_total uint64
346 Freepages_delay_total uint64
347+ Freepages_delay_max uint64
348+ Freepages_delay_min uint64
341 Thrashing_count uint64
349 Thrashing_count uint64
342 Thrashing_delay_total uint64
350 Thrashing_delay_total uint64
351+ Thrashing_delay_max uint64
352+ Thrashing_delay_min uint64
343 Ac_btime64 uint64
353 Ac_btime64 uint64
344 Compact_count uint64
354 Compact_count uint64
345 Compact_delay_total uint64
355 Compact_delay_total uint64
356+ Compact_delay_max uint64
357+ Compact_delay_min uint64
346 Ac_tgid uint32
358 Ac_tgid uint32
347 Ac_tgetime uint64
359 Ac_tgetime uint64
348 Ac_exe_dev uint64
360 Ac_exe_dev uint64
349 Ac_exe_inode uint64
361 Ac_exe_inode uint64
350 Wpcopy_count uint64
362 Wpcopy_count uint64
351 Wpcopy_delay_total uint64
363 Wpcopy_delay_total uint64
364+ Wpcopy_delay_max uint64
365+ Wpcopy_delay_min uint64
352 Irq_count uint64
366 Irq_count uint64
353 Irq_delay_total uint64
367 Irq_delay_total uint64
368+ Irq_delay_max uint64
369+ Irq_delay_min uint64
354}
370}
355
371
356type cpuMask uint64
372type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_arm.go+16
@@ -276,10 +276,16 @@ type Taskstats struct {
276 _ [4]byte
276 _ [4]byte
277 Cpu_count uint64
277 Cpu_count uint64
278 Cpu_delay_total uint64
278 Cpu_delay_total uint64
279+ Cpu_delay_max uint64
280+ Cpu_delay_min uint64
279 Blkio_count uint64
281 Blkio_count uint64
280 Blkio_delay_total uint64
282 Blkio_delay_total uint64
283+ Blkio_delay_max uint64
284+ Blkio_delay_min uint64
281 Swapin_count uint64
285 Swapin_count uint64
282 Swapin_delay_total uint64
286 Swapin_delay_total uint64
287+ Swapin_delay_max uint64
288+ Swapin_delay_min uint64
283 Cpu_run_real_total uint64
289 Cpu_run_real_total uint64
284 Cpu_run_virtual_total uint64
290 Cpu_run_virtual_total uint64
285 Ac_comm [32]uint8
291 Ac_comm [32]uint8
@@ -315,11 +321,17 @@ type Taskstats struct {
315 Cpu_scaled_run_real_total uint64
321 Cpu_scaled_run_real_total uint64
316 Freepages_count uint64
322 Freepages_count uint64
317 Freepages_delay_total uint64
323 Freepages_delay_total uint64
324+ Freepages_delay_max uint64
325+ Freepages_delay_min uint64
318 Thrashing_count uint64
326 Thrashing_count uint64
319 Thrashing_delay_total uint64
327 Thrashing_delay_total uint64
328+ Thrashing_delay_max uint64
329+ Thrashing_delay_min uint64
320 Ac_btime64 uint64
330 Ac_btime64 uint64
321 Compact_count uint64
331 Compact_count uint64
322 Compact_delay_total uint64
332 Compact_delay_total uint64
333+ Compact_delay_max uint64
334+ Compact_delay_min uint64
323 Ac_tgid uint32
335 Ac_tgid uint32
324 _ [4]byte
336 _ [4]byte
325 Ac_tgetime uint64
337 Ac_tgetime uint64
@@ -327,8 +339,12 @@ type Taskstats struct {
327 Ac_exe_inode uint64
339 Ac_exe_inode uint64
328 Wpcopy_count uint64
340 Wpcopy_count uint64
329 Wpcopy_delay_total uint64
341 Wpcopy_delay_total uint64
342+ Wpcopy_delay_max uint64
343+ Wpcopy_delay_min uint64
330 Irq_count uint64
344 Irq_count uint64
331 Irq_delay_total uint64
345 Irq_delay_total uint64
346+ Irq_delay_max uint64
347+ Irq_delay_min uint64
332}
348}
333
349
334type cpuMask uint32
350type cpuMask uint32
vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go+16
@@ -279,10 +279,16 @@ type Taskstats struct {
279 Ac_nice uint8
279 Ac_nice uint8
280 Cpu_count uint64
280 Cpu_count uint64
281 Cpu_delay_total uint64
281 Cpu_delay_total uint64
282+ Cpu_delay_max uint64
283+ Cpu_delay_min uint64
282 Blkio_count uint64
284 Blkio_count uint64
283 Blkio_delay_total uint64
285 Blkio_delay_total uint64
286+ Blkio_delay_max uint64
287+ Blkio_delay_min uint64
284 Swapin_count uint64
288 Swapin_count uint64
285 Swapin_delay_total uint64
289 Swapin_delay_total uint64
290+ Swapin_delay_max uint64
291+ Swapin_delay_min uint64
286 Cpu_run_real_total uint64
292 Cpu_run_real_total uint64
287 Cpu_run_virtual_total uint64
293 Cpu_run_virtual_total uint64
288 Ac_comm [32]int8
294 Ac_comm [32]int8
@@ -317,19 +323,29 @@ type Taskstats struct {
317 Cpu_scaled_run_real_total uint64
323 Cpu_scaled_run_real_total uint64
318 Freepages_count uint64
324 Freepages_count uint64
319 Freepages_delay_total uint64
325 Freepages_delay_total uint64
326+ Freepages_delay_max uint64
327+ Freepages_delay_min uint64
320 Thrashing_count uint64
328 Thrashing_count uint64
321 Thrashing_delay_total uint64
329 Thrashing_delay_total uint64
330+ Thrashing_delay_max uint64
331+ Thrashing_delay_min uint64
322 Ac_btime64 uint64
332 Ac_btime64 uint64
323 Compact_count uint64
333 Compact_count uint64
324 Compact_delay_total uint64
334 Compact_delay_total uint64
335+ Compact_delay_max uint64
336+ Compact_delay_min uint64
325 Ac_tgid uint32
337 Ac_tgid uint32
326 Ac_tgetime uint64
338 Ac_tgetime uint64
327 Ac_exe_dev uint64
339 Ac_exe_dev uint64
328 Ac_exe_inode uint64
340 Ac_exe_inode uint64
329 Wpcopy_count uint64
341 Wpcopy_count uint64
330 Wpcopy_delay_total uint64
342 Wpcopy_delay_total uint64
343+ Wpcopy_delay_max uint64
344+ Wpcopy_delay_min uint64
331 Irq_count uint64
345 Irq_count uint64
332 Irq_delay_total uint64
346 Irq_delay_total uint64
347+ Irq_delay_max uint64
348+ Irq_delay_min uint64
333}
349}
334
350
335type cpuMask uint64
351type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go+16
@@ -280,10 +280,16 @@ type Taskstats struct {
280 Ac_nice uint8
280 Ac_nice uint8
281 Cpu_count uint64
281 Cpu_count uint64
282 Cpu_delay_total uint64
282 Cpu_delay_total uint64
283+ Cpu_delay_max uint64
284+ Cpu_delay_min uint64
283 Blkio_count uint64
285 Blkio_count uint64
284 Blkio_delay_total uint64
286 Blkio_delay_total uint64
287+ Blkio_delay_max uint64
288+ Blkio_delay_min uint64
285 Swapin_count uint64
289 Swapin_count uint64
286 Swapin_delay_total uint64
290 Swapin_delay_total uint64
291+ Swapin_delay_max uint64
292+ Swapin_delay_min uint64
287 Cpu_run_real_total uint64
293 Cpu_run_real_total uint64
288 Cpu_run_virtual_total uint64
294 Cpu_run_virtual_total uint64
289 Ac_comm [32]int8
295 Ac_comm [32]int8
@@ -318,19 +324,29 @@ type Taskstats struct {
318 Cpu_scaled_run_real_total uint64
324 Cpu_scaled_run_real_total uint64
319 Freepages_count uint64
325 Freepages_count uint64
320 Freepages_delay_total uint64
326 Freepages_delay_total uint64
327+ Freepages_delay_max uint64
328+ Freepages_delay_min uint64
321 Thrashing_count uint64
329 Thrashing_count uint64
322 Thrashing_delay_total uint64
330 Thrashing_delay_total uint64
331+ Thrashing_delay_max uint64
332+ Thrashing_delay_min uint64
323 Ac_btime64 uint64
333 Ac_btime64 uint64
324 Compact_count uint64
334 Compact_count uint64
325 Compact_delay_total uint64
335 Compact_delay_total uint64
336+ Compact_delay_max uint64
337+ Compact_delay_min uint64
326 Ac_tgid uint32
338 Ac_tgid uint32
327 Ac_tgetime uint64
339 Ac_tgetime uint64
328 Ac_exe_dev uint64
340 Ac_exe_dev uint64
329 Ac_exe_inode uint64
341 Ac_exe_inode uint64
330 Wpcopy_count uint64
342 Wpcopy_count uint64
331 Wpcopy_delay_total uint64
343 Wpcopy_delay_total uint64
344+ Wpcopy_delay_max uint64
345+ Wpcopy_delay_min uint64
332 Irq_count uint64
346 Irq_count uint64
333 Irq_delay_total uint64
347 Irq_delay_total uint64
348+ Irq_delay_max uint64
349+ Irq_delay_min uint64
334}
350}
335
351
336type cpuMask uint64
352type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_mips.go+16
@@ -281,10 +281,16 @@ type Taskstats struct {
281 _ [4]byte
281 _ [4]byte
282 Cpu_count uint64
282 Cpu_count uint64
283 Cpu_delay_total uint64
283 Cpu_delay_total uint64
284+ Cpu_delay_max uint64
285+ Cpu_delay_min uint64
284 Blkio_count uint64
286 Blkio_count uint64
285 Blkio_delay_total uint64
287 Blkio_delay_total uint64
288+ Blkio_delay_max uint64
289+ Blkio_delay_min uint64
286 Swapin_count uint64
290 Swapin_count uint64
287 Swapin_delay_total uint64
291 Swapin_delay_total uint64
292+ Swapin_delay_max uint64
293+ Swapin_delay_min uint64
288 Cpu_run_real_total uint64
294 Cpu_run_real_total uint64
289 Cpu_run_virtual_total uint64
295 Cpu_run_virtual_total uint64
290 Ac_comm [32]int8
296 Ac_comm [32]int8
@@ -320,11 +326,17 @@ type Taskstats struct {
320 Cpu_scaled_run_real_total uint64
326 Cpu_scaled_run_real_total uint64
321 Freepages_count uint64
327 Freepages_count uint64
322 Freepages_delay_total uint64
328 Freepages_delay_total uint64
329+ Freepages_delay_max uint64
330+ Freepages_delay_min uint64
323 Thrashing_count uint64
331 Thrashing_count uint64
324 Thrashing_delay_total uint64
332 Thrashing_delay_total uint64
333+ Thrashing_delay_max uint64
334+ Thrashing_delay_min uint64
325 Ac_btime64 uint64
335 Ac_btime64 uint64
326 Compact_count uint64
336 Compact_count uint64
327 Compact_delay_total uint64
337 Compact_delay_total uint64
338+ Compact_delay_max uint64
339+ Compact_delay_min uint64
328 Ac_tgid uint32
340 Ac_tgid uint32
329 _ [4]byte
341 _ [4]byte
330 Ac_tgetime uint64
342 Ac_tgetime uint64
@@ -332,8 +344,12 @@ type Taskstats struct {
332 Ac_exe_inode uint64
344 Ac_exe_inode uint64
333 Wpcopy_count uint64
345 Wpcopy_count uint64
334 Wpcopy_delay_total uint64
346 Wpcopy_delay_total uint64
347+ Wpcopy_delay_max uint64
348+ Wpcopy_delay_min uint64
335 Irq_count uint64
349 Irq_count uint64
336 Irq_delay_total uint64
350 Irq_delay_total uint64
351+ Irq_delay_max uint64
352+ Irq_delay_min uint64
337}
353}
338
354
339type cpuMask uint32
355type cpuMask uint32
vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go+16
@@ -282,10 +282,16 @@ type Taskstats struct {
282 Ac_nice uint8
282 Ac_nice uint8
283 Cpu_count uint64
283 Cpu_count uint64
284 Cpu_delay_total uint64
284 Cpu_delay_total uint64
285+ Cpu_delay_max uint64
286+ Cpu_delay_min uint64
285 Blkio_count uint64
287 Blkio_count uint64
286 Blkio_delay_total uint64
288 Blkio_delay_total uint64
289+ Blkio_delay_max uint64
290+ Blkio_delay_min uint64
287 Swapin_count uint64
291 Swapin_count uint64
288 Swapin_delay_total uint64
292 Swapin_delay_total uint64
293+ Swapin_delay_max uint64
294+ Swapin_delay_min uint64
289 Cpu_run_real_total uint64
295 Cpu_run_real_total uint64
290 Cpu_run_virtual_total uint64
296 Cpu_run_virtual_total uint64
291 Ac_comm [32]int8
297 Ac_comm [32]int8
@@ -320,19 +326,29 @@ type Taskstats struct {
320 Cpu_scaled_run_real_total uint64
326 Cpu_scaled_run_real_total uint64
321 Freepages_count uint64
327 Freepages_count uint64
322 Freepages_delay_total uint64
328 Freepages_delay_total uint64
329+ Freepages_delay_max uint64
330+ Freepages_delay_min uint64
323 Thrashing_count uint64
331 Thrashing_count uint64
324 Thrashing_delay_total uint64
332 Thrashing_delay_total uint64
333+ Thrashing_delay_max uint64
334+ Thrashing_delay_min uint64
325 Ac_btime64 uint64
335 Ac_btime64 uint64
326 Compact_count uint64
336 Compact_count uint64
327 Compact_delay_total uint64
337 Compact_delay_total uint64
338+ Compact_delay_max uint64
339+ Compact_delay_min uint64
328 Ac_tgid uint32
340 Ac_tgid uint32
329 Ac_tgetime uint64
341 Ac_tgetime uint64
330 Ac_exe_dev uint64
342 Ac_exe_dev uint64
331 Ac_exe_inode uint64
343 Ac_exe_inode uint64
332 Wpcopy_count uint64
344 Wpcopy_count uint64
333 Wpcopy_delay_total uint64
345 Wpcopy_delay_total uint64
346+ Wpcopy_delay_max uint64
347+ Wpcopy_delay_min uint64
334 Irq_count uint64
348 Irq_count uint64
335 Irq_delay_total uint64
349 Irq_delay_total uint64
350+ Irq_delay_max uint64
351+ Irq_delay_min uint64
336}
352}
337
353
338type cpuMask uint64
354type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go+16
@@ -282,10 +282,16 @@ type Taskstats struct {
282 Ac_nice uint8
282 Ac_nice uint8
283 Cpu_count uint64
283 Cpu_count uint64
284 Cpu_delay_total uint64
284 Cpu_delay_total uint64
285+ Cpu_delay_max uint64
286+ Cpu_delay_min uint64
285 Blkio_count uint64
287 Blkio_count uint64
286 Blkio_delay_total uint64
288 Blkio_delay_total uint64
289+ Blkio_delay_max uint64
290+ Blkio_delay_min uint64
287 Swapin_count uint64
291 Swapin_count uint64
288 Swapin_delay_total uint64
292 Swapin_delay_total uint64
293+ Swapin_delay_max uint64
294+ Swapin_delay_min uint64
289 Cpu_run_real_total uint64
295 Cpu_run_real_total uint64
290 Cpu_run_virtual_total uint64
296 Cpu_run_virtual_total uint64
291 Ac_comm [32]int8
297 Ac_comm [32]int8
@@ -320,19 +326,29 @@ type Taskstats struct {
320 Cpu_scaled_run_real_total uint64
326 Cpu_scaled_run_real_total uint64
321 Freepages_count uint64
327 Freepages_count uint64
322 Freepages_delay_total uint64
328 Freepages_delay_total uint64
329+ Freepages_delay_max uint64
330+ Freepages_delay_min uint64
323 Thrashing_count uint64
331 Thrashing_count uint64
324 Thrashing_delay_total uint64
332 Thrashing_delay_total uint64
333+ Thrashing_delay_max uint64
334+ Thrashing_delay_min uint64
325 Ac_btime64 uint64
335 Ac_btime64 uint64
326 Compact_count uint64
336 Compact_count uint64
327 Compact_delay_total uint64
337 Compact_delay_total uint64
338+ Compact_delay_max uint64
339+ Compact_delay_min uint64
328 Ac_tgid uint32
340 Ac_tgid uint32
329 Ac_tgetime uint64
341 Ac_tgetime uint64
330 Ac_exe_dev uint64
342 Ac_exe_dev uint64
331 Ac_exe_inode uint64
343 Ac_exe_inode uint64
332 Wpcopy_count uint64
344 Wpcopy_count uint64
333 Wpcopy_delay_total uint64
345 Wpcopy_delay_total uint64
346+ Wpcopy_delay_max uint64
347+ Wpcopy_delay_min uint64
334 Irq_count uint64
348 Irq_count uint64
335 Irq_delay_total uint64
349 Irq_delay_total uint64
350+ Irq_delay_max uint64
351+ Irq_delay_min uint64
336}
352}
337
353
338type cpuMask uint64
354type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go+16
@@ -281,10 +281,16 @@ type Taskstats struct {
281 _ [4]byte
281 _ [4]byte
282 Cpu_count uint64
282 Cpu_count uint64
283 Cpu_delay_total uint64
283 Cpu_delay_total uint64
284+ Cpu_delay_max uint64
285+ Cpu_delay_min uint64
284 Blkio_count uint64
286 Blkio_count uint64
285 Blkio_delay_total uint64
287 Blkio_delay_total uint64
288+ Blkio_delay_max uint64
289+ Blkio_delay_min uint64
286 Swapin_count uint64
290 Swapin_count uint64
287 Swapin_delay_total uint64
291 Swapin_delay_total uint64
292+ Swapin_delay_max uint64
293+ Swapin_delay_min uint64
288 Cpu_run_real_total uint64
294 Cpu_run_real_total uint64
289 Cpu_run_virtual_total uint64
295 Cpu_run_virtual_total uint64
290 Ac_comm [32]int8
296 Ac_comm [32]int8
@@ -320,11 +326,17 @@ type Taskstats struct {
320 Cpu_scaled_run_real_total uint64
326 Cpu_scaled_run_real_total uint64
321 Freepages_count uint64
327 Freepages_count uint64
322 Freepages_delay_total uint64
328 Freepages_delay_total uint64
329+ Freepages_delay_max uint64
330+ Freepages_delay_min uint64
323 Thrashing_count uint64
331 Thrashing_count uint64
324 Thrashing_delay_total uint64
332 Thrashing_delay_total uint64
333+ Thrashing_delay_max uint64
334+ Thrashing_delay_min uint64
325 Ac_btime64 uint64
335 Ac_btime64 uint64
326 Compact_count uint64
336 Compact_count uint64
327 Compact_delay_total uint64
337 Compact_delay_total uint64
338+ Compact_delay_max uint64
339+ Compact_delay_min uint64
328 Ac_tgid uint32
340 Ac_tgid uint32
329 _ [4]byte
341 _ [4]byte
330 Ac_tgetime uint64
342 Ac_tgetime uint64
@@ -332,8 +344,12 @@ type Taskstats struct {
332 Ac_exe_inode uint64
344 Ac_exe_inode uint64
333 Wpcopy_count uint64
345 Wpcopy_count uint64
334 Wpcopy_delay_total uint64
346 Wpcopy_delay_total uint64
347+ Wpcopy_delay_max uint64
348+ Wpcopy_delay_min uint64
335 Irq_count uint64
349 Irq_count uint64
336 Irq_delay_total uint64
350 Irq_delay_total uint64
351+ Irq_delay_max uint64
352+ Irq_delay_min uint64
337}
353}
338
354
339type cpuMask uint32
355type cpuMask uint32
vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go+16
@@ -288,10 +288,16 @@ type Taskstats struct {
288 _ [4]byte
288 _ [4]byte
289 Cpu_count uint64
289 Cpu_count uint64
290 Cpu_delay_total uint64
290 Cpu_delay_total uint64
291+ Cpu_delay_max uint64
292+ Cpu_delay_min uint64
291 Blkio_count uint64
293 Blkio_count uint64
292 Blkio_delay_total uint64
294 Blkio_delay_total uint64
295+ Blkio_delay_max uint64
296+ Blkio_delay_min uint64
293 Swapin_count uint64
297 Swapin_count uint64
294 Swapin_delay_total uint64
298 Swapin_delay_total uint64
299+ Swapin_delay_max uint64
300+ Swapin_delay_min uint64
295 Cpu_run_real_total uint64
301 Cpu_run_real_total uint64
296 Cpu_run_virtual_total uint64
302 Cpu_run_virtual_total uint64
297 Ac_comm [32]uint8
303 Ac_comm [32]uint8
@@ -327,11 +333,17 @@ type Taskstats struct {
327 Cpu_scaled_run_real_total uint64
333 Cpu_scaled_run_real_total uint64
328 Freepages_count uint64
334 Freepages_count uint64
329 Freepages_delay_total uint64
335 Freepages_delay_total uint64
336+ Freepages_delay_max uint64
337+ Freepages_delay_min uint64
330 Thrashing_count uint64
338 Thrashing_count uint64
331 Thrashing_delay_total uint64
339 Thrashing_delay_total uint64
340+ Thrashing_delay_max uint64
341+ Thrashing_delay_min uint64
332 Ac_btime64 uint64
342 Ac_btime64 uint64
333 Compact_count uint64
343 Compact_count uint64
334 Compact_delay_total uint64
344 Compact_delay_total uint64
345+ Compact_delay_max uint64
346+ Compact_delay_min uint64
335 Ac_tgid uint32
347 Ac_tgid uint32
336 _ [4]byte
348 _ [4]byte
337 Ac_tgetime uint64
349 Ac_tgetime uint64
@@ -339,8 +351,12 @@ type Taskstats struct {
339 Ac_exe_inode uint64
351 Ac_exe_inode uint64
340 Wpcopy_count uint64
352 Wpcopy_count uint64
341 Wpcopy_delay_total uint64
353 Wpcopy_delay_total uint64
354+ Wpcopy_delay_max uint64
355+ Wpcopy_delay_min uint64
342 Irq_count uint64
356 Irq_count uint64
343 Irq_delay_total uint64
357 Irq_delay_total uint64
358+ Irq_delay_max uint64
359+ Irq_delay_min uint64
344}
360}
345
361
346type cpuMask uint32
362type cpuMask uint32
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go+16
@@ -289,10 +289,16 @@ type Taskstats struct {
289 Ac_nice uint8
289 Ac_nice uint8
290 Cpu_count uint64
290 Cpu_count uint64
291 Cpu_delay_total uint64
291 Cpu_delay_total uint64
292+ Cpu_delay_max uint64
293+ Cpu_delay_min uint64
292 Blkio_count uint64
294 Blkio_count uint64
293 Blkio_delay_total uint64
295 Blkio_delay_total uint64
296+ Blkio_delay_max uint64
297+ Blkio_delay_min uint64
294 Swapin_count uint64
298 Swapin_count uint64
295 Swapin_delay_total uint64
299 Swapin_delay_total uint64
300+ Swapin_delay_max uint64
301+ Swapin_delay_min uint64
296 Cpu_run_real_total uint64
302 Cpu_run_real_total uint64
297 Cpu_run_virtual_total uint64
303 Cpu_run_virtual_total uint64
298 Ac_comm [32]uint8
304 Ac_comm [32]uint8
@@ -327,19 +333,29 @@ type Taskstats struct {
327 Cpu_scaled_run_real_total uint64
333 Cpu_scaled_run_real_total uint64
328 Freepages_count uint64
334 Freepages_count uint64
329 Freepages_delay_total uint64
335 Freepages_delay_total uint64
336+ Freepages_delay_max uint64
337+ Freepages_delay_min uint64
330 Thrashing_count uint64
338 Thrashing_count uint64
331 Thrashing_delay_total uint64
339 Thrashing_delay_total uint64
340+ Thrashing_delay_max uint64
341+ Thrashing_delay_min uint64
332 Ac_btime64 uint64
342 Ac_btime64 uint64
333 Compact_count uint64
343 Compact_count uint64
334 Compact_delay_total uint64
344 Compact_delay_total uint64
345+ Compact_delay_max uint64
346+ Compact_delay_min uint64
335 Ac_tgid uint32
347 Ac_tgid uint32
336 Ac_tgetime uint64
348 Ac_tgetime uint64
337 Ac_exe_dev uint64
349 Ac_exe_dev uint64
338 Ac_exe_inode uint64
350 Ac_exe_inode uint64
339 Wpcopy_count uint64
351 Wpcopy_count uint64
340 Wpcopy_delay_total uint64
352 Wpcopy_delay_total uint64
353+ Wpcopy_delay_max uint64
354+ Wpcopy_delay_min uint64
341 Irq_count uint64
355 Irq_count uint64
342 Irq_delay_total uint64
356 Irq_delay_total uint64
357+ Irq_delay_max uint64
358+ Irq_delay_min uint64
343}
359}
344
360
345type cpuMask uint64
361type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go+16
@@ -289,10 +289,16 @@ type Taskstats struct {
289 Ac_nice uint8
289 Ac_nice uint8
290 Cpu_count uint64
290 Cpu_count uint64
291 Cpu_delay_total uint64
291 Cpu_delay_total uint64
292+ Cpu_delay_max uint64
293+ Cpu_delay_min uint64
292 Blkio_count uint64
294 Blkio_count uint64
293 Blkio_delay_total uint64
295 Blkio_delay_total uint64
296+ Blkio_delay_max uint64
297+ Blkio_delay_min uint64
294 Swapin_count uint64
298 Swapin_count uint64
295 Swapin_delay_total uint64
299 Swapin_delay_total uint64
300+ Swapin_delay_max uint64
301+ Swapin_delay_min uint64
296 Cpu_run_real_total uint64
302 Cpu_run_real_total uint64
297 Cpu_run_virtual_total uint64
303 Cpu_run_virtual_total uint64
298 Ac_comm [32]uint8
304 Ac_comm [32]uint8
@@ -327,19 +333,29 @@ type Taskstats struct {
327 Cpu_scaled_run_real_total uint64
333 Cpu_scaled_run_real_total uint64
328 Freepages_count uint64
334 Freepages_count uint64
329 Freepages_delay_total uint64
335 Freepages_delay_total uint64
336+ Freepages_delay_max uint64
337+ Freepages_delay_min uint64
330 Thrashing_count uint64
338 Thrashing_count uint64
331 Thrashing_delay_total uint64
339 Thrashing_delay_total uint64
340+ Thrashing_delay_max uint64
341+ Thrashing_delay_min uint64
332 Ac_btime64 uint64
342 Ac_btime64 uint64
333 Compact_count uint64
343 Compact_count uint64
334 Compact_delay_total uint64
344 Compact_delay_total uint64
345+ Compact_delay_max uint64
346+ Compact_delay_min uint64
335 Ac_tgid uint32
347 Ac_tgid uint32
336 Ac_tgetime uint64
348 Ac_tgetime uint64
337 Ac_exe_dev uint64
349 Ac_exe_dev uint64
338 Ac_exe_inode uint64
350 Ac_exe_inode uint64
339 Wpcopy_count uint64
351 Wpcopy_count uint64
340 Wpcopy_delay_total uint64
352 Wpcopy_delay_total uint64
353+ Wpcopy_delay_max uint64
354+ Wpcopy_delay_min uint64
341 Irq_count uint64
355 Irq_count uint64
342 Irq_delay_total uint64
356 Irq_delay_total uint64
357+ Irq_delay_max uint64
358+ Irq_delay_min uint64
343}
359}
344
360
345type cpuMask uint64
361type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go+16
@@ -307,10 +307,16 @@ type Taskstats struct {
307 Ac_nice uint8
307 Ac_nice uint8
308 Cpu_count uint64
308 Cpu_count uint64
309 Cpu_delay_total uint64
309 Cpu_delay_total uint64
310+ Cpu_delay_max uint64
311+ Cpu_delay_min uint64
310 Blkio_count uint64
312 Blkio_count uint64
311 Blkio_delay_total uint64
313 Blkio_delay_total uint64
314+ Blkio_delay_max uint64
315+ Blkio_delay_min uint64
312 Swapin_count uint64
316 Swapin_count uint64
313 Swapin_delay_total uint64
317 Swapin_delay_total uint64
318+ Swapin_delay_max uint64
319+ Swapin_delay_min uint64
314 Cpu_run_real_total uint64
320 Cpu_run_real_total uint64
315 Cpu_run_virtual_total uint64
321 Cpu_run_virtual_total uint64
316 Ac_comm [32]uint8
322 Ac_comm [32]uint8
@@ -345,19 +351,29 @@ type Taskstats struct {
345 Cpu_scaled_run_real_total uint64
351 Cpu_scaled_run_real_total uint64
346 Freepages_count uint64
352 Freepages_count uint64
347 Freepages_delay_total uint64
353 Freepages_delay_total uint64
354+ Freepages_delay_max uint64
355+ Freepages_delay_min uint64
348 Thrashing_count uint64
356 Thrashing_count uint64
349 Thrashing_delay_total uint64
357 Thrashing_delay_total uint64
358+ Thrashing_delay_max uint64
359+ Thrashing_delay_min uint64
350 Ac_btime64 uint64
360 Ac_btime64 uint64
351 Compact_count uint64
361 Compact_count uint64
352 Compact_delay_total uint64
362 Compact_delay_total uint64
363+ Compact_delay_max uint64
364+ Compact_delay_min uint64
353 Ac_tgid uint32
365 Ac_tgid uint32
354 Ac_tgetime uint64
366 Ac_tgetime uint64
355 Ac_exe_dev uint64
367 Ac_exe_dev uint64
356 Ac_exe_inode uint64
368 Ac_exe_inode uint64
357 Wpcopy_count uint64
369 Wpcopy_count uint64
358 Wpcopy_delay_total uint64
370 Wpcopy_delay_total uint64
371+ Wpcopy_delay_max uint64
372+ Wpcopy_delay_min uint64
359 Irq_count uint64
373 Irq_count uint64
360 Irq_delay_total uint64
374 Irq_delay_total uint64
375+ Irq_delay_max uint64
376+ Irq_delay_min uint64
361}
377}
362
378
363type cpuMask uint64
379type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go+16
@@ -302,10 +302,16 @@ type Taskstats struct {
302 Ac_nice uint8
302 Ac_nice uint8
303 Cpu_count uint64
303 Cpu_count uint64
304 Cpu_delay_total uint64
304 Cpu_delay_total uint64
305+ Cpu_delay_max uint64
306+ Cpu_delay_min uint64
305 Blkio_count uint64
307 Blkio_count uint64
306 Blkio_delay_total uint64
308 Blkio_delay_total uint64
309+ Blkio_delay_max uint64
310+ Blkio_delay_min uint64
307 Swapin_count uint64
311 Swapin_count uint64
308 Swapin_delay_total uint64
312 Swapin_delay_total uint64
313+ Swapin_delay_max uint64
314+ Swapin_delay_min uint64
309 Cpu_run_real_total uint64
315 Cpu_run_real_total uint64
310 Cpu_run_virtual_total uint64
316 Cpu_run_virtual_total uint64
311 Ac_comm [32]int8
317 Ac_comm [32]int8
@@ -340,19 +346,29 @@ type Taskstats struct {
340 Cpu_scaled_run_real_total uint64
346 Cpu_scaled_run_real_total uint64
341 Freepages_count uint64
347 Freepages_count uint64
342 Freepages_delay_total uint64
348 Freepages_delay_total uint64
349+ Freepages_delay_max uint64
350+ Freepages_delay_min uint64
343 Thrashing_count uint64
351 Thrashing_count uint64
344 Thrashing_delay_total uint64
352 Thrashing_delay_total uint64
353+ Thrashing_delay_max uint64
354+ Thrashing_delay_min uint64
345 Ac_btime64 uint64
355 Ac_btime64 uint64
346 Compact_count uint64
356 Compact_count uint64
347 Compact_delay_total uint64
357 Compact_delay_total uint64
358+ Compact_delay_max uint64
359+ Compact_delay_min uint64
348 Ac_tgid uint32
360 Ac_tgid uint32
349 Ac_tgetime uint64
361 Ac_tgetime uint64
350 Ac_exe_dev uint64
362 Ac_exe_dev uint64
351 Ac_exe_inode uint64
363 Ac_exe_inode uint64
352 Wpcopy_count uint64
364 Wpcopy_count uint64
353 Wpcopy_delay_total uint64
365 Wpcopy_delay_total uint64
366+ Wpcopy_delay_max uint64
367+ Wpcopy_delay_min uint64
354 Irq_count uint64
368 Irq_count uint64
355 Irq_delay_total uint64
369 Irq_delay_total uint64
370+ Irq_delay_max uint64
371+ Irq_delay_min uint64
356}
372}
357
373
358type cpuMask uint64
374type cpuMask uint64
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go+16
@@ -284,10 +284,16 @@ type Taskstats struct {
284 Ac_nice uint8
284 Ac_nice uint8
285 Cpu_count uint64
285 Cpu_count uint64
286 Cpu_delay_total uint64
286 Cpu_delay_total uint64
287+ Cpu_delay_max uint64
288+ Cpu_delay_min uint64
287 Blkio_count uint64
289 Blkio_count uint64
288 Blkio_delay_total uint64
290 Blkio_delay_total uint64
291+ Blkio_delay_max uint64
292+ Blkio_delay_min uint64
289 Swapin_count uint64
293 Swapin_count uint64
290 Swapin_delay_total uint64
294 Swapin_delay_total uint64
295+ Swapin_delay_max uint64
296+ Swapin_delay_min uint64
291 Cpu_run_real_total uint64
297 Cpu_run_real_total uint64
292 Cpu_run_virtual_total uint64
298 Cpu_run_virtual_total uint64
293 Ac_comm [32]int8
299 Ac_comm [32]int8
@@ -322,19 +328,29 @@ type Taskstats struct {
322 Cpu_scaled_run_real_total uint64
328 Cpu_scaled_run_real_total uint64
323 Freepages_count uint64
329 Freepages_count uint64
324 Freepages_delay_total uint64
330 Freepages_delay_total uint64
331+ Freepages_delay_max uint64
332+ Freepages_delay_min uint64
325 Thrashing_count uint64
333 Thrashing_count uint64
326 Thrashing_delay_total uint64
334 Thrashing_delay_total uint64
335+ Thrashing_delay_max uint64
336+ Thrashing_delay_min uint64
327 Ac_btime64 uint64
337 Ac_btime64 uint64
328 Compact_count uint64
338 Compact_count uint64
329 Compact_delay_total uint64
339 Compact_delay_total uint64
340+ Compact_delay_max uint64
341+ Compact_delay_min uint64
330 Ac_tgid uint32
342 Ac_tgid uint32
331 Ac_tgetime uint64
343 Ac_tgetime uint64
332 Ac_exe_dev uint64
344 Ac_exe_dev uint64
333 Ac_exe_inode uint64
345 Ac_exe_inode uint64
334 Wpcopy_count uint64
346 Wpcopy_count uint64
335 Wpcopy_delay_total uint64
347 Wpcopy_delay_total uint64
348+ Wpcopy_delay_max uint64
349+ Wpcopy_delay_min uint64
336 Irq_count uint64
350 Irq_count uint64
337 Irq_delay_total uint64
351 Irq_delay_total uint64
352+ Irq_delay_max uint64
353+ Irq_delay_min uint64
338}
354}
339
355
340type cpuMask uint64
356type cpuMask uint64
vendor/modules.txt+7−8
@@ -229,7 +229,6 @@ github.com/aymanbagabas/go-osc52/v2
229## explicit; go 1.23
229## explicit; go 1.23
230github.com/aymanbagabas/go-udiff
230github.com/aymanbagabas/go-udiff
231github.com/aymanbagabas/go-udiff/lcs
231github.com/aymanbagabas/go-udiff/lcs
232−github.com/aymanbagabas/go-udiff/myers
233# github.com/aymerick/douceur v0.2.0
232# github.com/aymerick/douceur v0.2.0
234## explicit
233## explicit
235github.com/aymerick/douceur/css
234github.com/aymerick/douceur/css
@@ -254,7 +253,7 @@ github.com/charmbracelet/bubbles/v2/spinner
254github.com/charmbracelet/bubbles/v2/textarea
253github.com/charmbracelet/bubbles/v2/textarea
255github.com/charmbracelet/bubbles/v2/textinput
254github.com/charmbracelet/bubbles/v2/textinput
256github.com/charmbracelet/bubbles/v2/viewport
255github.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
258## explicit; go 1.24.0
257## explicit; go 1.24.0
259github.com/charmbracelet/bubbletea/v2
258github.com/charmbracelet/bubbletea/v2
260# github.com/charmbracelet/colorprofile v0.3.1
259# github.com/charmbracelet/colorprofile v0.3.1
@@ -269,7 +268,7 @@ github.com/charmbracelet/glamour/v2
269github.com/charmbracelet/glamour/v2/ansi
268github.com/charmbracelet/glamour/v2/ansi
270github.com/charmbracelet/glamour/v2/internal/autolink
269github.com/charmbracelet/glamour/v2/internal/autolink
271github.com/charmbracelet/glamour/v2/styles
270github.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
273## explicit; go 1.24.2
272## explicit; go 1.24.2
274github.com/charmbracelet/lipgloss/v2
273github.com/charmbracelet/lipgloss/v2
275github.com/charmbracelet/lipgloss/v2/table
274github.com/charmbracelet/lipgloss/v2/table
@@ -277,7 +276,7 @@ github.com/charmbracelet/lipgloss/v2/tree
277# github.com/charmbracelet/log/v2 v2.0.0-20250226163916-c379e29ff706
276# github.com/charmbracelet/log/v2 v2.0.0-20250226163916-c379e29ff706
278## explicit; go 1.19
277## explicit; go 1.19
279github.com/charmbracelet/log/v2
278github.com/charmbracelet/log/v2
280−# github.com/charmbracelet/ultraviolet v0.0.0-20250708152637-0fe0235c8db9
279+# github.com/charmbracelet/ultraviolet v0.0.0-20250716141307-2fae2b322afb
281## explicit; go 1.24.0
280## explicit; go 1.24.0
282github.com/charmbracelet/ultraviolet
281github.com/charmbracelet/ultraviolet
283# github.com/charmbracelet/x/ansi v0.9.3
282# github.com/charmbracelet/x/ansi v0.9.3
@@ -682,10 +681,10 @@ golang.org/x/net/idna
682golang.org/x/net/internal/httpcommon
681golang.org/x/net/internal/httpcommon
683golang.org/x/net/internal/timeseries
682golang.org/x/net/internal/timeseries
684golang.org/x/net/trace
683golang.org/x/net/trace
685−# golang.org/x/sync v0.15.0
684+# golang.org/x/sync v0.16.0
686## explicit; go 1.23.0
685## explicit; go 1.23.0
687golang.org/x/sync/errgroup
686golang.org/x/sync/errgroup
688−# golang.org/x/sys v0.33.0
687+# golang.org/x/sys v0.34.0
689## explicit; go 1.23.0
688## explicit; go 1.23.0
690golang.org/x/sys/cpu
689golang.org/x/sys/cpu
691golang.org/x/sys/plan9
690golang.org/x/sys/plan9
@@ -838,5 +837,5 @@ mvdan.cc/sh/v3/fileutil
838mvdan.cc/sh/v3/interp
837mvdan.cc/sh/v3/interp
839mvdan.cc/sh/v3/pattern
838mvdan.cc/sh/v3/pattern
840mvdan.cc/sh/v3/syntax
839mvdan.cc/sh/v3/syntax
841−# github.com/charmbracelet/bubbletea/v2 => github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250710185017-3c0ffd25e595
840+# github.com/charmbracelet/bubbletea/v2 => github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250716142813-5d1379f56ba2
842−# github.com/charmbracelet/lipgloss/v2 => github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250710185058-03664cb9cecb
841+# github.com/charmbracelet/lipgloss/v2 => github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250716143013-48f34cb75679