[
  {
    "id": "UagentkitOriginalPrimary",
    "name": "uAgentKit original primary native workflow",
    "active": false,
    "nodes": [
      {
        "id": "afcc1b36-4ff8-48d0-a2d0-eb7ac4b7d627",
        "name": "Manual Trigger",
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          0,
          0
        ],
        "parameters": {}
      },
      {
        "id": "1af1b7fd-ad1c-444c-bb35-2a8c259ceb3e",
        "name": "Read sandbox CSV",
        "type": "n8n-nodes-base.readWriteFile",
        "typeVersion": 1.1,
        "position": [
          200,
          0
        ],
        "parameters": {
          "operation": "read",
          "fileSelector": "<workspace>/outputs/product-tests/runtime-original-cases/n8n/fixtures/primary.csv",
          "options": {
            "dataPropertyName": "data"
          }
        }
      },
      {
        "id": "c1efa3a3-2303-4df9-af00-312674e7f079",
        "name": "Parse ideas",
        "type": "n8n-nodes-base.extractFromFile",
        "typeVersion": 1.1,
        "position": [
          400,
          0
        ],
        "parameters": {
          "operation": "csv",
          "binaryPropertyName": "data",
          "options": {
            "headerRow": true,
            "includeEmptyCells": true
          }
        }
      },
      {
        "id": "881ba876-9cca-4de2-8d58-2fc31c18d2c7",
        "name": "Draft placeholder",
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          600,
          0
        ],
        "parameters": {
          "mode": "manual",
          "includeOtherFields": true,
          "assignments": {
            "assignments": [
              {
                "id": "95c27650-dde5-404c-8294-52905f295781",
                "name": "draft",
                "value": "={{ \"Placeholder draft: \" + $json.title }}",
                "type": "string"
              },
              {
                "id": "9aa192b6-4ae0-4f05-9623-cd4bc482587d",
                "name": "modelGenerated",
                "value": false,
                "type": "boolean"
              }
            ]
          },
          "options": {}
        }
      },
      {
        "id": "291573d7-cb58-40c5-9156-b966238b1089",
        "name": "Valid local approval request",
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          800,
          0
        ],
        "parameters": {
          "conditions": {
            "combinator": "and",
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "7f057a2d-214d-4a1b-9f06-b612d8d19f20",
                "leftValue": "={{ $json.id || \"\" }}",
                "rightValue": "",
                "operator": {
                  "type": "string",
                  "operation": "notEmpty"
                }
              },
              {
                "id": "09086b08-1fea-4848-94ef-18ce991b9457",
                "leftValue": "={{ $json.title || \"\" }}",
                "rightValue": "",
                "operator": {
                  "type": "string",
                  "operation": "notEmpty"
                }
              },
              {
                "id": "0363c76e-a941-4f84-a23f-baf78d73be46",
                "leftValue": "={{ $json.approval || \"\" }}",
                "rightValue": "",
                "operator": {
                  "type": "string",
                  "operation": "notEmpty"
                }
              },
              {
                "id": "a161a61b-567a-49e5-ba20-e0d70c284faf",
                "leftValue": "={{ $json.scope || \"\" }}",
                "rightValue": "local-draft",
                "operator": {
                  "type": "string",
                  "operation": "equals"
                }
              }
            ]
          },
          "options": {
            "ignoreCase": false
          }
        }
      },
      {
        "id": "91cf654b-3136-4fae-99aa-e12c9e31c17b",
        "name": "Approved by human",
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          1000,
          0
        ],
        "parameters": {
          "conditions": {
            "combinator": "and",
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "b920dc7a-8a4e-477b-bf46-05c6c0cfdd9f",
                "leftValue": "={{ $json.approval }}",
                "rightValue": "approved",
                "operator": {
                  "type": "string",
                  "operation": "equals"
                }
              }
            ]
          },
          "options": {
            "ignoreCase": false
          }
        }
      },
      {
        "id": "e0a19059-61db-4481-a178-065e290ae6e4",
        "name": "Blocked invalid request",
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          1000,
          250
        ],
        "parameters": {
          "mode": "manual",
          "includeOtherFields": true,
          "assignments": {
            "assignments": [
              {
                "id": "b8729ad1-0873-4488-8800-077f556f15f5",
                "name": "result",
                "value": "blocked-invalid-input-or-scope",
                "type": "string"
              }
            ]
          },
          "options": {}
        }
      },
      {
        "id": "88d27c74-1c6a-4d88-847c-4f29ec8e8bcd",
        "name": "Rejected approval",
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          1200,
          200
        ],
        "parameters": {
          "mode": "manual",
          "includeOtherFields": true,
          "assignments": {
            "assignments": [
              {
                "id": "e9e3e023-60af-4549-a5e8-d2585bca70f6",
                "name": "result",
                "value": "rejected",
                "type": "string"
              }
            ]
          },
          "options": {}
        }
      },
      {
        "id": "4c2f8d3d-9e2d-44f2-87d6-8ef2362290c4",
        "name": "Write local idempotent sink",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1200,
          0
        ],
        "retryOnFail": true,
        "maxTries": 3,
        "waitBetweenTries": 300,
        "parameters": {
          "method": "POST",
          "url": "http://127.0.0.1:25947/draft",
          "sendBody": true,
          "contentType": "json",
          "specifyBody": "json",
          "jsonBody": "={{ { id: $json.id, title: $json.title, approval: $json.approval, scope: $json.scope, draft: $json.draft, modelGenerated: $json.modelGenerated } }}",
          "options": {
            "timeout": 5000
          }
        }
      }
    ],
    "connections": {
      "Manual Trigger": {
        "main": [
          [
            {
              "node": "Read sandbox CSV",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Read sandbox CSV": {
        "main": [
          [
            {
              "node": "Parse ideas",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Parse ideas": {
        "main": [
          [
            {
              "node": "Draft placeholder",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Draft placeholder": {
        "main": [
          [
            {
              "node": "Valid local approval request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Valid local approval request": {
        "main": [
          [
            {
              "node": "Approved by human",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Blocked invalid request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Approved by human": {
        "main": [
          [
            {
              "node": "Write local idempotent sink",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Rejected approval",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1",
      "saveDataSuccessExecution": "all",
      "saveDataErrorExecution": "all"
    }
  }
]
