singul

package
v0.0.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2026 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeIntentAndCorrectApp added in v0.0.23

func AnalyzeIntentAndCorrectApp(ctx context.Context, query string, fields []shuffle.Valuereplace) string

AnalyzeIntentAndCorrectApp uses LLM to identify the app from URL/query LLM identifies app freely, then we search for it (user's apps or Algolia) Returns app name or empty string if HTTP is correct

func AuthenticateAppCli

func AuthenticateAppCli(appname string) error

func FindMatchingActionFromURL added in v0.0.24

func FindMatchingActionFromURL(ctx context.Context, app shuffle.WorkflowApp, method string, urlStr string) ([]string, string, error)

Finds the original action based on the URL and Method used in a custom_action

func GetActionAIResponseWrapper

func GetActionAIResponseWrapper(ctx context.Context, input shuffle.QueryInput) ([]byte, error)

func GetActionFromLabel

func GetActionFromLabel(ctx context.Context, app shuffle.WorkflowApp, label string, fixLabels bool, fields []shuffle.Valuereplace, count int) (shuffle.WorkflowAppAction, shuffle.AppCategory, []string)

func GetAppOpenapi

func GetAppOpenapi(appname string) (openapi3.Swagger, error)

func GetLocalAuth

func GetLocalAuth() ([]shuffle.AppAuthenticationStorage, error)

func GetOrgspecificParameters

func GetOrgspecificParameters(ctx context.Context, fields []shuffle.Valuereplace, org shuffle.Org, action shuffle.WorkflowAppAction, originalActionName string) shuffle.WorkflowAppAction

func GetTranslatedHttpAction added in v0.0.19

func GetTranslatedHttpAction(app shuffle.WorkflowApp, action shuffle.WorkflowAppAction) shuffle.WorkflowAppAction

Translates and action IF custom_action is available Uses OpenAPI spec to do so

func GetUpdatedHttpValue added in v0.0.18

func GetUpdatedHttpValue(value shuffle.CategoryAction) shuffle.CategoryAction

Auto-parser of incoming data if not handle-able otherwise

func HandleSingulStartnode added in v0.0.16

func HandleSingulStartnode(execution shuffle.WorkflowExecution, action shuffle.Action, urls []string) (shuffle.Action, []string)

Controls action mapping

func IdentifyCustomAction added in v0.0.24

func IdentifyCustomAction(ctx context.Context, app shuffle.WorkflowApp, actionName string, actionLabel string, inputFields []shuffle.Valuereplace, actionParams []shuffle.WorkflowAppActionParameter) (string, []string)

func LocalizeAppscript

func LocalizeAppscript(appname string) (string, error)

func RunAction

func RunAction(ctx context.Context, value shuffle.CategoryAction, retries ...int) (string, error)

func RunActionWrapper

func RunActionWrapper(ctx context.Context, user shuffle.User, value shuffle.CategoryAction, resp http.ResponseWriter, request *http.Request) ([]byte, error)

func RunCategoryAction

func RunCategoryAction(resp http.ResponseWriter, request *http.Request)

1. Check the category, if it has the label in it 2. Get the app (openapi & app config) 3. Check if the label exists for the app in any action 4. Do the translation~ (workflow or direct) 5. Run app action/workflow 6. Return result from the app

func SetupRequirements

func SetupRequirements(requirementsPath string) error

func Setupvenv

func Setupvenv(appscriptFolder string) (string, error)

func StoreTranslationOutput

func StoreTranslationOutput(user shuffle.User, fieldHash string, parsedParameterMap map[string]interface{}, inputFieldMap map[string]interface{})

Types

type FakeResponseWriter

type FakeResponseWriter struct {
	HeaderMap   http.Header
	Body        bytes.Buffer
	StatusCode  int
	WroteHeader bool
}

For handling the function without changing ALL the resp.X functions

func NewFakeResponseWriter

func NewFakeResponseWriter() *FakeResponseWriter

func (*FakeResponseWriter) Header

func (f *FakeResponseWriter) Header() http.Header

func (*FakeResponseWriter) Write

func (f *FakeResponseWriter) Write(b []byte) (int, error)

func (*FakeResponseWriter) WriteHeader

func (f *FakeResponseWriter) WriteHeader(statusCode int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL