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,5 @@
# errs
Package errs provides a simple way to create new error types for go using go generation.
Just add new error type in error.go and run `go generate` and you are done.

View File

@@ -0,0 +1,445 @@
package errs
import (
"fmt"
)
type wailsError struct {
cause error
msg string
errorType ErrorType
}
func (w *wailsError) Cause() error { return w.cause }
func (w *wailsError) Error() string {
errMsg := fmt.Sprintf("%s: %s", w.errorType, w.msg)
if w.cause != nil {
return fmt.Sprintf("%s: %s", errMsg, w.cause.Error())
}
return errMsg
}
func (w *wailsError) Msg() string { return w.msg }
func (w *wailsError) ErrorType() ErrorType { return w.errorType }
func (w *wailsError) Unwrap() error { return w.cause }
func NewInvalidWindowCallErrorf(message string, args ...any) error {
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: nil,
msg: msg,
errorType: InvalidWindowCallError,
}
}
func WrapInvalidWindowCallErrorf(err error, message string, args ...any) error {
if err == nil {
return nil
}
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: err,
msg: msg,
errorType: InvalidWindowCallError,
}
}
func IsInvalidWindowCallError(err error) bool {
return Is(err, InvalidWindowCallError)
}
func HasInvalidWindowCallError(err error) bool {
return Has(err, InvalidWindowCallError)
}
func NewInvalidApplicationCallErrorf(message string, args ...any) error {
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: nil,
msg: msg,
errorType: InvalidApplicationCallError,
}
}
func WrapInvalidApplicationCallErrorf(err error, message string, args ...any) error {
if err == nil {
return nil
}
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: err,
msg: msg,
errorType: InvalidApplicationCallError,
}
}
func IsInvalidApplicationCallError(err error) bool {
return Is(err, InvalidApplicationCallError)
}
func HasInvalidApplicationCallError(err error) bool {
return Has(err, InvalidApplicationCallError)
}
func NewInvalidBrowserCallErrorf(message string, args ...any) error {
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: nil,
msg: msg,
errorType: InvalidBrowserCallError,
}
}
func WrapInvalidBrowserCallErrorf(err error, message string, args ...any) error {
if err == nil {
return nil
}
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: err,
msg: msg,
errorType: InvalidBrowserCallError,
}
}
func IsInvalidBrowserCallError(err error) bool {
return Is(err, InvalidBrowserCallError)
}
func HasInvalidBrowserCallError(err error) bool {
return Has(err, InvalidBrowserCallError)
}
func NewInvalidSystemCallErrorf(message string, args ...any) error {
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: nil,
msg: msg,
errorType: InvalidSystemCallError,
}
}
func WrapInvalidSystemCallErrorf(err error, message string, args ...any) error {
if err == nil {
return nil
}
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: err,
msg: msg,
errorType: InvalidSystemCallError,
}
}
func IsInvalidSystemCallError(err error) bool {
return Is(err, InvalidSystemCallError)
}
func HasInvalidSystemCallError(err error) bool {
return Has(err, InvalidSystemCallError)
}
func NewInvalidScreensCallErrorf(message string, args ...any) error {
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: nil,
msg: msg,
errorType: InvalidScreensCallError,
}
}
func WrapInvalidScreensCallErrorf(err error, message string, args ...any) error {
if err == nil {
return nil
}
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: err,
msg: msg,
errorType: InvalidScreensCallError,
}
}
func IsInvalidScreensCallError(err error) bool {
return Is(err, InvalidScreensCallError)
}
func HasInvalidScreensCallError(err error) bool {
return Has(err, InvalidScreensCallError)
}
func NewInvalidDialogCallErrorf(message string, args ...any) error {
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: nil,
msg: msg,
errorType: InvalidDialogCallError,
}
}
func WrapInvalidDialogCallErrorf(err error, message string, args ...any) error {
if err == nil {
return nil
}
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: err,
msg: msg,
errorType: InvalidDialogCallError,
}
}
func IsInvalidDialogCallError(err error) bool {
return Is(err, InvalidDialogCallError)
}
func HasInvalidDialogCallError(err error) bool {
return Has(err, InvalidDialogCallError)
}
func NewInvalidContextMenuCallErrorf(message string, args ...any) error {
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: nil,
msg: msg,
errorType: InvalidContextMenuCallError,
}
}
func WrapInvalidContextMenuCallErrorf(err error, message string, args ...any) error {
if err == nil {
return nil
}
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: err,
msg: msg,
errorType: InvalidContextMenuCallError,
}
}
func IsInvalidContextMenuCallError(err error) bool {
return Is(err, InvalidContextMenuCallError)
}
func HasInvalidContextMenuCallError(err error) bool {
return Has(err, InvalidContextMenuCallError)
}
func NewInvalidClipboardCallErrorf(message string, args ...any) error {
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: nil,
msg: msg,
errorType: InvalidClipboardCallError,
}
}
func WrapInvalidClipboardCallErrorf(err error, message string, args ...any) error {
if err == nil {
return nil
}
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: err,
msg: msg,
errorType: InvalidClipboardCallError,
}
}
func IsInvalidClipboardCallError(err error) bool {
return Is(err, InvalidClipboardCallError)
}
func HasInvalidClipboardCallError(err error) bool {
return Has(err, InvalidClipboardCallError)
}
func NewInvalidBindingCallErrorf(message string, args ...any) error {
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: nil,
msg: msg,
errorType: InvalidBindingCallError,
}
}
func WrapInvalidBindingCallErrorf(err error, message string, args ...any) error {
if err == nil {
return nil
}
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: err,
msg: msg,
errorType: InvalidBindingCallError,
}
}
func IsInvalidBindingCallError(err error) bool {
return Is(err, InvalidBindingCallError)
}
func HasInvalidBindingCallError(err error) bool {
return Has(err, InvalidBindingCallError)
}
func NewBindingCallFailedErrorf(message string, args ...any) error {
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: nil,
msg: msg,
errorType: BindingCallFailedError,
}
}
func WrapBindingCallFailedErrorf(err error, message string, args ...any) error {
if err == nil {
return nil
}
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: err,
msg: msg,
errorType: BindingCallFailedError,
}
}
func IsBindingCallFailedError(err error) bool {
return Is(err, BindingCallFailedError)
}
func HasBindingCallFailedError(err error) bool {
return Has(err, BindingCallFailedError)
}
func NewInvalidEventsCallErrorf(message string, args ...any) error {
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: nil,
msg: msg,
errorType: InvalidEventsCallError,
}
}
func WrapInvalidEventsCallErrorf(err error, message string, args ...any) error {
if err == nil {
return nil
}
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: err,
msg: msg,
errorType: InvalidEventsCallError,
}
}
func IsInvalidEventsCallError(err error) bool {
return Is(err, InvalidEventsCallError)
}
func HasInvalidEventsCallError(err error) bool {
return Has(err, InvalidEventsCallError)
}
func NewInvalidRuntimeCallErrorf(message string, args ...any) error {
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: nil,
msg: msg,
errorType: InvalidRuntimeCallError,
}
}
func WrapInvalidRuntimeCallErrorf(err error, message string, args ...any) error {
if err == nil {
return nil
}
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: err,
msg: msg,
errorType: InvalidRuntimeCallError,
}
}
func IsInvalidRuntimeCallError(err error) bool {
return Is(err, InvalidRuntimeCallError)
}
func HasInvalidRuntimeCallError(err error) bool {
return Has(err, InvalidRuntimeCallError)
}
func NewInvalidIOSCallErrorf(message string, args ...any) error {
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: nil,
msg: msg,
errorType: InvalidIOSCallError,
}
}
func WrapInvalidIOSCallErrorf(err error, message string, args ...any) error {
if err == nil {
return nil
}
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: err,
msg: msg,
errorType: InvalidIOSCallError,
}
}
func IsInvalidIOSCallError(err error) bool {
return Is(err, InvalidIOSCallError)
}
func HasInvalidIOSCallError(err error) bool {
return Has(err, InvalidIOSCallError)
}
func NewInvalidAndroidCallErrorf(message string, args ...any) error {
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: nil,
msg: msg,
errorType: InvalidAndroidCallError,
}
}
func WrapInvalidAndroidCallErrorf(err error, message string, args ...any) error {
if err == nil {
return nil
}
msg := fmt.Sprintf(message, args...)
return &wailsError{
cause: err,
msg: msg,
errorType: InvalidAndroidCallError,
}
}
func IsInvalidAndroidCallError(err error) bool {
return Is(err, InvalidAndroidCallError)
}
func HasInvalidAndroidCallError(err error) bool {
return Has(err, InvalidAndroidCallError)
}

28
vendor/github.com/wailsapp/wails/v3/pkg/errs/errors.go generated vendored Normal file
View File

@@ -0,0 +1,28 @@
//go:generate go run codegen/error_functions/main.go
package errs
type ErrorType string
type WailsError interface {
Cause() error
Error() string
Msg() string
ErrorType() ErrorType
}
const (
InvalidWindowCallError ErrorType = "Invalid window call"
InvalidApplicationCallError ErrorType = "Invalid application call"
InvalidBrowserCallError ErrorType = "Invalid browser call"
InvalidSystemCallError ErrorType = "Invalid system call"
InvalidScreensCallError ErrorType = "Invalid screens call"
InvalidDialogCallError ErrorType = "Invalid dialog call"
InvalidContextMenuCallError ErrorType = "Invalid context menu call"
InvalidClipboardCallError ErrorType = "Invalid clipboard call"
InvalidBindingCallError ErrorType = "Invalid binding call"
BindingCallFailedError ErrorType = "Binding call failed"
InvalidEventsCallError ErrorType = "Invalid events call"
InvalidRuntimeCallError ErrorType = "Invalid runtime call"
InvalidIOSCallError ErrorType = "Invalid iOS call"
InvalidAndroidCallError ErrorType = "Invalid Android call"
)

60
vendor/github.com/wailsapp/wails/v3/pkg/errs/utils.go generated vendored Normal file
View File

@@ -0,0 +1,60 @@
//go:generate go run codegen/error_functions/main.go
package errs
import (
"errors"
)
func Is(err error, errorType ErrorType) bool {
if err == nil {
return false
}
var general WailsError
ok := errors.As(err, &general)
if !ok {
return false
}
return general.ErrorType() == errorType
}
func Cause(err error) error {
if err == nil {
return nil
}
type causer interface {
Cause() error
}
if cause, ok := err.(causer); ok {
if causeErr := cause.Cause(); causeErr != nil {
return causeErr
}
}
if unwrapErr := errors.Unwrap(err); unwrapErr != nil {
return unwrapErr
}
return err
}
func Has(err error, errorType ErrorType) bool {
if err == nil {
return false
}
for {
if Is(err, errorType) {
return true
}
cause := Cause(err)
if errors.Is(cause, err) || cause == nil {
break
}
err = cause
}
return false
}