fix: add involves edge from task to agent:nomos at creation
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled
ci / web (push) Has been cancelled
Desktop App / Build Linux (amd64) (push) Has been cancelled
Desktop App / Attach to Release (push) Has been cancelled

Plus sync vendor directory for Docker build compatibility.
This commit is contained in:
2026-08-11 22:03:12 +02:00
parent 7d6a3320d4
commit febc153b7f
3384 changed files with 945212 additions and 2 deletions

View File

@@ -0,0 +1,82 @@
//go:build aix || dragonfly || freebsd || (js && wasm) || nacl || linux || netbsd || openbsd || solaris
package userdirs
import (
"bufio"
"io"
"os"
"strings"
"github.com/adrg/xdg/internal/pathutil"
)
// ParseConfigFile parses the user directories config file at the
// specified location.
func ParseConfigFile(name string) (*Directories, error) {
f, err := os.Open(name)
if err != nil {
return nil, err
}
defer f.Close()
return ParseConfig(f)
}
// ParseConfig parses the user directories config file contained in
// the provided reader.
func ParseConfig(r io.Reader) (*Directories, error) {
dirs := &Directories{}
fieldsMap := map[string]*string{
EnvDesktopDir: &dirs.Desktop,
EnvDownloadDir: &dirs.Download,
EnvDocumentsDir: &dirs.Documents,
EnvMusicDir: &dirs.Music,
EnvPicturesDir: &dirs.Pictures,
EnvVideosDir: &dirs.Videos,
EnvTemplatesDir: &dirs.Templates,
EnvPublicShareDir: &dirs.PublicShare,
}
scanner := bufio.NewScanner(r)
for scanner.Scan() {
line := strings.TrimSpace(scanner.Text())
if len(line) == 0 || line[0] == '#' {
continue
}
if !strings.HasPrefix(line, "XDG_") {
continue
}
parts := strings.Split(line, "=")
if len(parts) < 2 {
continue
}
// Parse key.
field, ok := fieldsMap[strings.TrimSpace(parts[0])]
if !ok {
continue
}
// Parse value.
runes := []rune(strings.TrimSpace(parts[1]))
lenRunes := len(runes)
if lenRunes <= 2 || runes[0] != '"' {
continue
}
for i := 1; i < lenRunes; i++ {
if runes[i] == '"' {
*field = pathutil.ExpandHome(string(runes[1:i]))
break
}
}
}
if err := scanner.Err(); err != nil {
return nil, err
}
return dirs, nil
}

View File

@@ -0,0 +1,40 @@
package userdirs
// XDG user directories environment variables.
const (
EnvDesktopDir = "XDG_DESKTOP_DIR"
EnvDownloadDir = "XDG_DOWNLOAD_DIR"
EnvDocumentsDir = "XDG_DOCUMENTS_DIR"
EnvMusicDir = "XDG_MUSIC_DIR"
EnvPicturesDir = "XDG_PICTURES_DIR"
EnvVideosDir = "XDG_VIDEOS_DIR"
EnvTemplatesDir = "XDG_TEMPLATES_DIR"
EnvPublicShareDir = "XDG_PUBLICSHARE_DIR"
)
// Directories defines the locations of well known user directories.
type Directories struct {
// Desktop defines the location of the user's desktop directory.
Desktop string
// Download defines a suitable location for user downloaded files.
Download string
// Documents defines a suitable location for user document files.
Documents string
// Music defines a suitable location for user audio files.
Music string
// Pictures defines a suitable location for user image files.
Pictures string
// VideosDir defines a suitable location for user video files.
Videos string
// Templates defines a suitable location for user template files.
Templates string
// PublicShare defines a suitable location for user shared files.
PublicShare string
}