You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
systemMessage:=fmt.Sprintf("Output a valid HTTP body to %s in %s. Only add required fields. Output ONLY JSON without explainers.", newName, action.AppName)
951
969
userMessage:=""
952
970
953
-
log.Printf("\n\nBODY CREATE SYSTEM MESSAGE: %s\n\n", systemMessage)
971
+
ifdebug {
972
+
log.Printf("\n\n[DEBUG] BODY CREATE SYSTEM MESSAGE: %s\n\n", systemMessage)
log.Printf("[INFO][%s] Running agent decision action '%s' with app '%s'. This is ran with Singul.", execution.ExecutionId, decision.Action, decision.Tool)
2047
2047
2048
2048
baseUrl:="https://shuffler.io"
2049
2049
ifos.Getenv("BASE_URL") !="" {
@@ -2070,6 +2070,10 @@ func RunAgentDecisionSingulActionHandler(execution WorkflowExecution, decision A
2070
2070
SkipWorkflow: true,
2071
2071
}
2072
2072
2073
+
ifstrings.ToLower(decision.Action) =="api" {
2074
+
parsedAction.Action="custom_action"
2075
+
}
2076
+
2073
2077
marshalledAction, err:=json.Marshal(parsedAction)
2074
2078
iferr!=nil {
2075
2079
log.Printf("[ERROR][%s] Failed marshalling action in agent decision: %s", execution.ExecutionId, err)
log.Printf("[ERROR] Nonce size is larger than parsed data. Returning as if this is valid.")
18243
+
//log.Printf("[ERROR] Nonce size is larger than parsed data in decryption. Returning as if this is valid. This should _never_ happen, but typically only happens IF the source data is invalid (e.g. 1/20 keys)")
18244
+
//if debug {
18245
+
// log.Printf("Returned: '%s'. Len %d vs %d", string(parsedData), nonceSize, len(parsedData))
18246
+
//}
18247
+
18241
18248
return data, nil
18242
18249
}
18243
18250
@@ -19831,9 +19838,12 @@ func PrepareSingleAction(ctx context.Context, user User, appId string, body []by
19831
19838
}
19832
19839
19833
19840
// This is NOT a good solution, but a good bypass
19834
-
if app.Authentication.Required {
19841
+
if app.Authentication.Required || len(action.AuthenticationId) > 0 {
19842
+
19835
19843
if len(action.AuthenticationId) > 0 {
19836
-
//log.Printf("\n\n[INFO] Found auth ID for single action: %s\n\n", action.AuthenticationId)
19844
+
if debug {
19845
+
log.Printf("[INFO][%s] Found auth ID for single action: %s", workflowExecution.ExecutionId, action.AuthenticationId)
19846
+
}
19837
19847
19838
19848
// FIXME: How do we decide what fields to replace?
19839
19849
// The problem now is that some auth fields are being set and others maybe are not
@@ -19911,7 +19921,7 @@ func PrepareSingleAction(ctx context.Context, user User, appId string, body []by
19911
19921
}
19912
19922
19913
19923
if runValidationAction {
19914
-
log.Printf("[INFO] Running validation action for %s for org %s (%s)", app.Name, user.ActiveOrg.Name, user.ActiveOrg.Id)
19924
+
log.Printf("\n\n[INFO] SHOULD BE Running validation action for %s for org %s (%s)\n\n", app.Name, user.ActiveOrg.Name, user.ActiveOrg.Id)
19915
19925
19916
19926
// Find the action tagged to be used for validation:
19917
19927
// 1. Find the action in the app
@@ -19925,10 +19935,9 @@ func PrepareSingleAction(ctx context.Context, user User, appId string, body []by
19925
19935
//}
19926
19936
}
19927
19937
19928
-
newParams := []WorkflowAppActionParameter{}
19929
19938
19930
19939
// Auth is handled in PrepareWorkflowExec, so this may not be needed
0 commit comments