[
    {
        "id": "ad10d15c1f99905b",
        "type": "tab",
        "label": "KSP v1.12.x",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "6e19c4140c77db40",
        "type": "group",
        "z": "ad10d15c1f99905b",
        "style": {
            "stroke": "#555555",
            "stroke-opacity": "1",
            "fill": "rgba(255, 255, 255, 0.03)",
            "fill-opacity": "1",
            "label": true,
            "label-position": "nw",
            "color": "#f0f0f0"
        },
        "nodes": [
            "edbba1edb748976e",
            "77dd20ff91429a88",
            "a20c593c107e4083",
            "38351a32521e3021",
            "15d1e7de388a00cd",
            "3c3cc8748ce6e778",
            "c328daf4b9ce1518",
            "c3c8a74c2d28cb5e",
            "5b7cbcf16751233c",
            "edae8c31061580e0",
            "520f28270124b09e",
            "9ed7b81da801f2ee",
            "63717f9ffdcdd272",
            "aba44d1c4bde9366",
            "d2cf5332f99b483c",
            "5023ef8324fa9dbd",
            "1ab84fa98f7a4b8f",
            "3610c7e5accb5ea7",
            "ae09fefd34342d18",
            "9f2566b3dba833e9",
            "925fed2b59a9582d",
            "28bad3dac3acba35",
            "809a1a5c7ffca554",
            "c34da24b9fb2df54",
            "fdabbbbcc6780f01"
        ],
        "x": 254,
        "y": 1839,
        "w": 2012,
        "h": 422
    },
    {
        "id": "f5f90d789e6e0c17",
        "type": "group",
        "z": "ad10d15c1f99905b",
        "style": {
            "stroke": "#555555",
            "stroke-opacity": "1",
            "fill": "rgba(255, 255, 255, 0.03)",
            "fill-opacity": "1",
            "label": true,
            "label-position": "nw",
            "color": "#f0f0f0"
        },
        "nodes": [
            "0bd7e2d4b21a5c8f",
            "31f7d9d181dbc05b",
            "bf862db6f3066f56",
            "b28ac701b2a35d57",
            "644110f9f9e0bc92",
            "833d3576f26352d7",
            "6c087455026ab852",
            "189e194b2dd3376b",
            "ec4094b137baccc7",
            "39920b12ebbcea87",
            "33ed4ec632f588f9",
            "eee05181b3d3b794",
            "d295209381d41347",
            "b9c7bc1b667dce68",
            "8a4c819f9fb66302",
            "9f92d2ed880d6cb7",
            "f2599ccc6c5593c9",
            "04d2f9b97cf42517",
            "1fb0946ddfc52d18"
        ],
        "x": 134,
        "y": 2319,
        "w": 2292,
        "h": 222
    },
    {
        "id": "d1d16210766423e4",
        "type": "group",
        "z": "ad10d15c1f99905b",
        "style": {
            "stroke": "#555555",
            "stroke-opacity": "1",
            "fill": "rgba(255, 255, 255, 0.03)",
            "fill-opacity": "1",
            "label": true,
            "label-position": "nw",
            "color": "#f0f0f0"
        },
        "nodes": [
            "json_translator_in",
            "dashboard_gauge",
            "dash_text",
            "txt_chat_eng",
            "gg_ready",
            "gg_ws",
            "json_translator_out",
            "dashboard_button"
        ],
        "x": 54,
        "y": 359,
        "w": 1012,
        "h": 322
    },
    {
        "id": "0623cd95eecd2b83",
        "type": "group",
        "z": "ad10d15c1f99905b",
        "style": {
            "stroke": "#555555",
            "stroke-opacity": "1",
            "fill": "rgba(255, 255, 255, 0.03)",
            "fill-opacity": "1",
            "label": true,
            "label-position": "nw",
            "color": "#f0f0f0"
        },
        "nodes": [
            "213af190ee5a7d6d",
            "f7663c52ac67deba",
            "d4653b823a285fb6",
            "c0c315601e722bdd",
            "0ec403947def35b9",
            "3ab4a8066fcd7635",
            "fc0c4da1b8124244",
            "be9f2cb4f7e66f42",
            "2bdfffaa43749f5f",
            "4dbb326ed2259aea",
            "mk_transcript",
            "90f1e99caf48f5af",
            "477d262b50c62203",
            "aa832d2012c6d4bc",
            "5df922bc36d2b7fe",
            "9667102243a1e742",
            "2357817cbba98e69",
            "e678abdc6aa62027",
            "v_backup_format_02",
            "v_backup_comm_node_02",
            "c08cf3239b24ce6d",
            "ddf178ef316ee516",
            "65328b009eda9d03",
            "krpc_txt_velocity_v2",
            "krpc_txt_apoapsis_v2",
            "krpc_txt_altitude_v2",
            "abb23deda621f781",
            "944727cf902b082d",
            "0f7831a6552e5f27",
            "85c70c92249b2b42",
            "a3ef29c690f8b03d"
        ],
        "x": -32,
        "y": 713,
        "w": 2398,
        "h": 1034
    },
    {
        "id": "f77a2ef0a2040588",
        "type": "group",
        "z": "ad10d15c1f99905b",
        "style": {
            "stroke": "#555555",
            "stroke-opacity": "1",
            "fill": "rgba(255, 255, 255, 0.03)",
            "fill-opacity": "1",
            "label": true,
            "label-position": "nw",
            "color": "#f0f0f0"
        },
        "nodes": [
            "6bea4e564a7a85fc",
            "b0b49544ba328f1f",
            "95ae8f5e6a12ad76",
            "c7026ee1544a0d7a",
            "57cef078560cb1f8",
            "fcc1bb56e9f273b4",
            "0f6bbab862b8ec0b",
            "339f6588dd262e46"
        ],
        "x": 34,
        "y": -1,
        "w": 962,
        "h": 282
    },
    {
        "id": "c08cf3239b24ce6d",
        "type": "group",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "style": {
            "stroke": "#555555",
            "stroke-opacity": "1",
            "fill": "rgba(255, 255, 255, 0.03)",
            "fill-opacity": "1",
            "label": true,
            "label-position": "nw",
            "color": "#f0f0f0"
        },
        "nodes": [
            "964fd06070c42392",
            "cb6ac1eb902940a5",
            "eccf081f48d3ae16"
        ],
        "x": 794,
        "y": 739,
        "w": 892,
        "h": 82
    },
    {
        "id": "ddf178ef316ee516",
        "type": "group",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "style": {
            "stroke": "#555555",
            "stroke-opacity": "1",
            "fill": "rgba(255, 255, 255, 0.03)",
            "fill-opacity": "1",
            "label": true,
            "label-position": "nw",
            "color": "#f0f0f0"
        },
        "nodes": [
            "b57c2a5675f94b78",
            "091e883b157905fd",
            "127c582e4d0c0801",
            "9a010e6a3fae0375",
            "83d465f337d78948",
            "e4533499e2629cce",
            "f2c83678622cb2ab"
        ],
        "x": 14,
        "y": 1571.5,
        "w": 1192,
        "h": 149.5
    },
    {
        "id": "65328b009eda9d03",
        "type": "group",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "style": {
            "stroke": "#555555",
            "stroke-opacity": "1",
            "fill": "rgba(255, 255, 255, 0.03)",
            "fill-opacity": "1",
            "label": true,
            "label-position": "nw",
            "color": "#f0f0f0"
        },
        "nodes": [
            "6a4e88cc533b7bfa",
            "04229705343af51c",
            "2512c73a1313959e",
            "e174e094de551cbc",
            "7fc8afda63c7a825",
            "33f4ca381fe3e3ce",
            "ab4f21d22479a768",
            "72fb251138237567",
            "5a653df53043b624",
            "e5cfb446f7f4a8ab",
            "0860058a2767427b",
            "16f42a4773941738",
            "e5d3e7ce19d78f5d",
            "4680e48a4eb429b0"
        ],
        "x": -6,
        "y": 1119,
        "w": 1112,
        "h": 437
    },
    {
        "id": "0bd7e2d4b21a5c8f",
        "type": "debug",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 2320,
        "y": 2400,
        "wires": []
    },
    {
        "id": "213af190ee5a7d6d",
        "type": "change",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "Translation Intercept",
        "rules": [
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "no red",
                "fromt": "str",
                "to": "Node-Red",
                "tot": "str"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "get HUD",
                "fromt": "str",
                "to": "GitHub",
                "tot": "str"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "curbin",
                "fromt": "str",
                "to": "Kerbin",
                "tot": "str"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "no red",
                "fromt": "str",
                "to": "Node-Red",
                "tot": "str"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "discard lost command",
                "fromt": "str",
                "to": "discard last command",
                "tot": "str"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "Valerie",
                "fromt": "str",
                "to": "Valentina",
                "tot": "str"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "note red",
                "fromt": "str",
                "to": "Node red",
                "tot": "str"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "Jason",
                "fromt": "str",
                "to": "Json",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 900,
        "y": 980,
        "wires": [
            [
                "3ab4a8066fcd7635",
                "90f1e99caf48f5af",
                "v_backup_format_02"
            ]
        ]
    },
    {
        "id": "31f7d9d181dbc05b",
        "type": "file in",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "KSP CFG Ingestion",
        "filename": "D:\\KSP\\GameData\\**\\*.cfg",
        "filenameType": "str",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 250,
        "y": 2400,
        "wires": [
            [
                "04d2f9b97cf42517"
            ]
        ]
    },
    {
        "id": "bf862db6f3066f56",
        "type": "file in",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "KSP  Save State Monitor",
        "filename": "D:\\KSP\\saves\\{Sandbox,TestingSandbox,SandboxCopy}\\persistent.sfs",
        "filenameType": "str",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 270,
        "y": 2480,
        "wires": [
            [
                "ec4094b137baccc7"
            ]
        ]
    },
    {
        "id": "b28ac701b2a35d57",
        "type": "file in",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "KSP Craft Ingestion",
        "filename": "D:/KSP/ships/{SPH,VAB,@thumbs/SPH,@thumbs/VAB}/.{craft,png}",
        "filenameType": "str",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 250,
        "y": 2440,
        "wires": [
            [
                "189e194b2dd3376b"
            ]
        ]
    },
    {
        "id": "644110f9f9e0bc92",
        "type": "file",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "",
        "filename": "Clean CFG Compiler",
        "filenameType": "str",
        "appendNewline": true,
        "createDir": false,
        "overwriteFile": "false",
        "encoding": "none",
        "x": 1500,
        "y": 2380,
        "wires": [
            [
                "39920b12ebbcea87"
            ]
        ]
    },
    {
        "id": "833d3576f26352d7",
        "type": "file",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "",
        "filename": "Vessel Schematic Saver",
        "filenameType": "str",
        "appendNewline": true,
        "createDir": false,
        "overwriteFile": "false",
        "encoding": "none",
        "x": 1510,
        "y": 2420,
        "wires": [
            [
                "39920b12ebbcea87"
            ]
        ]
    },
    {
        "id": "6c087455026ab852",
        "type": "file",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "",
        "filename": "Save Game State Ledger",
        "filenameType": "str",
        "appendNewline": true,
        "createDir": false,
        "overwriteFile": "false",
        "encoding": "none",
        "x": 1510,
        "y": 2460,
        "wires": [
            [
                "39920b12ebbcea87"
            ]
        ]
    },
    {
        "id": "189e194b2dd3376b",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "CRAFT Loop Breaker",
        "func": "// Initialize loop and vessel sequence phase tracking\nlet craftMatrix = context.get('craftMatrix') || {\n    iterationCount: 0,\n    maxAllowedLoops: 5,\n    currentPhase: \"CRAFT_PHASE_INGESTION\"\n};\n\ncraftMatrix.iterationCount++;\ncraftMatrix.currentPhase = \"CRAFT_PHASE_DIAGNOSTIC\";\ncontext.set('craftMatrix', craftMatrix);\n\n// Circuit breaker check\nif (craftMatrix.iterationCount > craftMatrix.maxAllowedLoops) {\n    msg.payload = \"SYSTEM COLLISION: CRAFT Phaser Loop Lock Detected. Resetting to baseline.\";\n    msg.model =\"qwen2.5-coder:7b\";\n    msg.topic = 'cfg_alarm_tripped';\n    context.set('craftMatrix', undefined);\n    return [null, msg]; // Routes to your fallback/debug path\n}\n\nreturn [msg, null]; // Passes cleanly down your main engine line\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 520,
        "y": 2440,
        "wires": [
            [
                "d295209381d41347"
            ]
        ]
    },
    {
        "id": "ec4094b137baccc7",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "Save State Loop Breaker",
        "func": "// Initialize loop and save state sequence phase tracking\nlet sfsMatrix = context.get('sfsMatrix') || {\n    iterationCount: 0,\n    maxAllowedLoops: 5,\n    currentPhase: \"SFS_PHASE_INGESTION\"\n};\n\nsfsMatrix.iterationCount++;\nsfsMatrix.currentPhase = \"SFS_PHASE_ORBIT_VALIDATION\";\ncontext.set('sfsMatrix', sfsMatrix);\n\n// Circuit breaker check\nif (sfsMatrix.iterationCount > sfsMatrix.maxAllowedLoops) {\n    msg.payload = \"SYSTEM COLLISION: SFS Phaser Loop Lock Detected. Resetting to baseline.\";\n    msg.model = \"qwen2.5-coder:7b\";\n    msg.topic = \"alarm_circuit_tripped\"\n    context.set('sfsMatrix', undefined);\n    return [null, msg]; // Routes to your fallback/debug path\n}\n\nreturn [msg, null]; // Passes cleanly down your main engine line\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 530,
        "y": 2480,
        "wires": [
            [
                "1fb0946ddfc52d18"
            ]
        ]
    },
    {
        "id": "39920b12ebbcea87",
        "type": "switch",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "AI Phaser Sequences",
        "property": "filename",
        "propertyType": "msg",
        "rules": [
            {
                "t": "regex",
                "v": "\\.cfg$",
                "vt": "str",
                "case": false
            },
            {
                "t": "regex",
                "v": "\\.craft$",
                "vt": "str",
                "case": false
            },
            {
                "t": "regex",
                "v": "\\.sfs$",
                "vt": "str",
                "case": false
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 1820,
        "y": 2460,
        "wires": [
            [
                "0bd7e2d4b21a5c8f"
            ],
            [],
            [
                "8a4c819f9fb66302"
            ]
        ]
    },
    {
        "id": "33ed4ec632f588f9",
        "type": "catch",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "Emergency Loop Catch",
        "scope": [
            "39920b12ebbcea87",
            "644110f9f9e0bc92",
            "6c087455026ab852",
            "95ae8f5e6a12ad76",
            "6bea4e564a7a85fc",
            "f2599ccc6c5593c9",
            "833d3576f26352d7"
        ],
        "uncaught": false,
        "x": 1800,
        "y": 2360,
        "wires": [
            [
                "9f92d2ed880d6cb7"
            ]
        ]
    },
    {
        "id": "77dd20ff91429a88",
        "type": "http in",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "Blue Horizons Space",
        "url": "https://www.blueorigin.com/",
        "method": "get",
        "upload": false,
        "skipBodyParsing": false,
        "swaggerDoc": "",
        "x": 380,
        "y": 2060,
        "wires": [
            [
                "5b7cbcf16751233c"
            ]
        ]
    },
    {
        "id": "6bea4e564a7a85fc",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "f77a2ef0a2040588",
        "name": "Valentina Core Trigger",
        "func": "// ============================================================================\n// DESIGNATION 02: THE SAFE-BOOT SECURITY BLENDER (FAIL-SAFE LAYER)\n// INTEGRATED WITH MULTI-FACTOR AUTHENTICATION BOUNDARIES\n// ============================================================================\n\nconst localContext = node.context();\n\n// 1. HARD SECURITY CEILING: CHECK TODAY'S ACTIVE MFA LAYER STATUS\n// This ensures no commands execute unless the 0x6AD99A29 token was passed.\nlet isMfaCleared = localContext.get(\"isMfaCleared\") || false;\n\nif (msg.topic === \"authenticate_session\" || msg.topic === \"provide_auth_token\") {\n    if (msg.payload && msg.payload.session_token === \"0x6AD99A29\") {\n        localContext.set(\"isMfaCleared\", true);\n        isMfaCleared = true;\n    }\n}\n\nif (!isMfaCleared) {\n    node.status({ fill: \"red\", shape: \"ring\", text: \"MFA Locked: Blender Execution Paused\" });\n    msg.payload = \"SECURITY MONITOR: COMPONENT BLENDER ACCESS BLOCKED.\";\n    return [null, msg]; // Force drop out Pin 2 directly to your local Air-Gap Containment Matrix\n}\n\n// ============================================================================\n// SECTION I: CONTEXT LOOP INTERLOCKING FAILURE INTERCEPT (YOUR ORIGINAL CODE)\n// ============================================================================\nlet downstreamAgent = msg.payload || {};\nlet continuousPatternCount = localContext.get('continuousPatternCount') || 0;\nlet lastPattern = localContext.get('lastPattern') || \"\";\n\nif (downstreamAgent.identityShift === true || downstreamAgent.pattern === lastPattern) {\n    continuousPatternCount++;\n} else {\n    continuousPatternCount = 0;\n    localContext.set('lastPattern', downstreamAgent.pattern || \"\");\n}\n\nlocalContext.set('continuousPatternCount', continuousPatternCount);\n\n// Trigger core exception sweep if looping uncontrollably (System Fault)\nif (continuousPatternCount > 5) {\n    node.warn(\"Cognitive Exception Guard active: System-wide loop lock exception triggered.\");\n\n    // SECTION II: AUTOMATIC CORE PURGE & FORCE-INJECTION\n    localContext.set('continuousPatternCount', 0);\n    localContext.set('lastPattern', \"\");\n\n    msg.payload = {\n        status: \"CORE PURGE\",\n        message: \"Active memory runtime buffer blanked down to pristine baseline state.\",\n        injectMasterCodebook: true\n    };\n\n    node.status({ fill: \"red\", shape: \"double\", text: \"CRITICAL: PURGE MATRIX ACTIVATED\" });\n    return [null, msg]; // Divert exception payload directly to your local Air-Gap Containment Matrix\n}\n\n// ============================================================================\n// CONFIGURATION DEPLOYMENT CRITERIA (SECTION A & SECTION C KEYS)\n// ============================================================================\nmsg.targetEnvironment = \"SYSTEM ROOT PROTOCOLS & VALENTINA SYSTEM LOGIC CORE\";\nmsg.schemaCompatibility = [\".CFG\", \".CRAFT\", \".SFS\"];\nmsg.processingPhilosophy = \"Slow is smooth, and smooth is fast.\"; // Axiom 2\n\nnode.status({ fill: \"green\", shape: \"dot\", text: \"Blender Active: Processing Secure Data\" });\nreturn [msg, null]; // Clean output out Pin 1 to core engines\n",
        "outputs": 1,
        "timeout": "30",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 870,
        "y": 40,
        "wires": [
            [
                "0f6bbab862b8ec0b",
                "c0c315601e722bdd",
                "fcc1bb56e9f273b4"
            ]
        ]
    },
    {
        "id": "f7663c52ac67deba",
        "type": "ui-audio",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "group": "",
        "ui": "krpc_ui_base_v2",
        "name": "orbital telemetry",
        "order": 0,
        "width": 0,
        "height": 0,
        "mode": "tts",
        "voice": "Microsoft Zira - English (United States)",
        "src": "",
        "autoplay": "off",
        "loop": "off",
        "muted": "off",
        "className": "",
        "x": 2220,
        "y": 1360,
        "wires": [
            []
        ]
    },
    {
        "id": "72fb251138237567",
        "type": "delay",
        "z": "ad10d15c1f99905b",
        "g": "65328b009eda9d03",
        "name": " Velocity Rate Limiter Display ",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "6",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 660,
        "y": 1320,
        "wires": [
            [
                "3ab4a8066fcd7635"
            ]
        ]
    },
    {
        "id": "d4653b823a285fb6",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": " Voice to Text Translation Matrix",
        "func": "// 4. Define your original rigid token replacement dictionary\nconst staticTranslationMap = {\n    \"Almah\": \"Ollama\",\n    \"alma\": \"Ollama\",\n    \"all mah\": \"Ollama\",\n    \"get HUD\": \"GitHub Copilot\",\n    \"get hub\": \"GitHub Copilot\",\n    \"no red\": \"Node-RED\",\n    \"no-red\": \"Node-RED\",\n    \"nodad\": \"Node red\",                     \n    \"discard lost command\": \"discard last command\", \n    \"Jason\": \"Json\",          \n    \"protocols in PL\": \"protocols in place\",\n    \"remove thou loop\": \"remove the loop\",\n    \"Discard lost command\": \"discard last command\",\n    \"Valerie\": \"Valentina\"\n};\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1490,
        "y": 920,
        "wires": [
            [
                "213af190ee5a7d6d"
            ]
        ]
    },
    {
        "id": "c0c315601e722bdd",
        "type": "ollama-chat",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "Primary  Education Core E:1",
        "server": "fc4bdbc050c880c3",
        "model": "qwen2.5:32b",
        "modelType": "str",
        "messages": "payload",
        "messagesType": "msg",
        "format": "88072e1b5ee11be2",
        "stream": false,
        "think": false,
        "keepAlive": "5m",
        "keepAliveType": "str",
        "tools": "",
        "options": "",
        "x": 1560,
        "y": 1040,
        "wires": [
            [
                "d4653b823a285fb6",
                "e678abdc6aa62027"
            ]
        ]
    },
    {
        "id": "0ec403947def35b9",
        "type": "ui-audio",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "group": "",
        "ui": "krpc_ui_base_v2",
        "name": "Valentina Voice Output",
        "order": 0,
        "width": 0,
        "height": 0,
        "mode": "tts",
        "voice": "Microsoft Linda - English (Canada)",
        "src": "",
        "autoplay": "off",
        "loop": "off",
        "muted": "off",
        "className": "",
        "x": 2240,
        "y": 1400,
        "wires": [
            []
        ]
    },
    {
        "id": "a20c593c107e4083",
        "type": "http in",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "nasa.gov",
        "url": "https://www.nasa.gov/",
        "method": "get",
        "upload": false,
        "skipBodyParsing": false,
        "swaggerDoc": "",
        "x": 420,
        "y": 2020,
        "wires": [
            [
                "5b7cbcf16751233c"
            ]
        ]
    },
    {
        "id": "38351a32521e3021",
        "type": "http in",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "Spacex.com",
        "url": "https://www.spacex.com/",
        "method": "get",
        "upload": false,
        "skipBodyParsing": false,
        "swaggerDoc": "",
        "x": 410,
        "y": 1980,
        "wires": [
            [
                "5b7cbcf16751233c"
            ]
        ]
    },
    {
        "id": "15d1e7de388a00cd",
        "type": "http in",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "wikipedia.org",
        "url": "https://en.wikipedia.org/",
        "method": "get",
        "upload": false,
        "skipBodyParsing": false,
        "swaggerDoc": "",
        "x": 410,
        "y": 1940,
        "wires": [
            [
                "5b7cbcf16751233c"
            ]
        ]
    },
    {
        "id": "3ab4a8066fcd7635",
        "type": "ollama-chat",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "CAPCOM E:4",
        "server": "fc4bdbc050c880c3",
        "model": "deepseek-r1:32b",
        "modelType": "str",
        "messages": "payload",
        "messagesType": "msg",
        "format": "",
        "stream": false,
        "think": false,
        "keepAlive": "999d",
        "keepAliveType": "str",
        "tools": "",
        "options": "13582cc00a602dc7",
        "x": 1480,
        "y": 1320,
        "wires": [
            [
                "0ec403947def35b9",
                "f7663c52ac67deba",
                "fc0c4da1b8124244",
                "477d262b50c62203",
                "v_backup_comm_node_02",
                "c0c315601e722bdd"
            ]
        ]
    },
    {
        "id": "fc0c4da1b8124244",
        "type": "ui-audio",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "group": "",
        "ui": "krpc_ui_base_v2",
        "name": "Engine Voice Output",
        "order": 0,
        "width": 0,
        "height": 0,
        "mode": "tts",
        "voice": "Microsoft Richard - English (Canada)",
        "src": "",
        "autoplay": "off",
        "loop": "off",
        "muted": "off",
        "className": "",
        "x": 2240,
        "y": 1320,
        "wires": [
            []
        ]
    },
    {
        "id": "e5d3e7ce19d78f5d",
        "type": "delay",
        "z": "ad10d15c1f99905b",
        "g": "65328b009eda9d03",
        "name": "orbital alignment Rate Limiter ",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "5",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 520,
        "y": 1160,
        "wires": [
            [
                "be9f2cb4f7e66f42",
                "16f42a4773941738"
            ]
        ]
    },
    {
        "id": "be9f2cb4f7e66f42",
        "type": "switch",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "Orbit LEO",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "gt",
                "v": "7700",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 740,
        "y": 1120,
        "wires": [
            [
                "2bdfffaa43749f5f",
                "3ab4a8066fcd7635"
            ]
        ]
    },
    {
        "id": "2bdfffaa43749f5f",
        "type": "change",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "LEO",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "LEO achieved {{msg.vessel_name}}.",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "achieved {{msg.vessel_name}}.",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "achieved {{msg.vessel_name}}.",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "achieved {{msg.vessel_name}}.",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 870,
        "y": 1120,
        "wires": [
            [
                "3ab4a8066fcd7635"
            ]
        ]
    },
    {
        "id": "3c3cc8748ce6e778",
        "type": "http in",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "wiki/Orbital_mechanics",
        "url": "https://en.wikipedia.org/wiki/Orbital_mechanics",
        "method": "get",
        "upload": false,
        "skipBodyParsing": false,
        "swaggerDoc": "",
        "x": 380,
        "y": 2100,
        "wires": [
            [
                "5b7cbcf16751233c"
            ]
        ]
    },
    {
        "id": "c328daf4b9ce1518",
        "type": "http in",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "Atomicrockets",
        "url": "https://atomicrockets.net/",
        "method": "get",
        "upload": false,
        "skipBodyParsing": false,
        "swaggerDoc": "",
        "x": 410,
        "y": 2140,
        "wires": [
            [
                "5b7cbcf16751233c"
            ]
        ]
    },
    {
        "id": "c3c8a74c2d28cb5e",
        "type": "http in",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "KSP VANILA",
        "url": "https://wiki.kerbalspaceprogram.com/wiki/Main_Page",
        "method": "get",
        "upload": false,
        "skipBodyParsing": false,
        "swaggerDoc": "",
        "x": 410,
        "y": 1900,
        "wires": [
            [
                "5b7cbcf16751233c"
            ]
        ]
    },
    {
        "id": "5b7cbcf16751233c",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "Knowledge Router",
        "func": "if (!msg.payload) {\n    return [msg, msg, msg, msg];\n}\nreturn [msg, msg, msg, msg];\nreturn msg;",
        "outputs": 4,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 790,
        "y": 2040,
        "wires": [
            [
                "520f28270124b09e"
            ],
            [
                "fdabbbbcc6780f01"
            ],
            [
                "edbba1edb748976e"
            ],
            [
                "ae09fefd34342d18"
            ]
        ]
    },
    {
        "id": "edbba1edb748976e",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "THE GATE",
        "func": "// THE GATE\n\nif (!msg.payload) {\n    return [null, null, null, null, null];\n}\n\n// Always ring the doorbell first\nlet bellMsg = RED.util.cloneMessage(msg);\n\nnode.status({\n    fill: \"yellow\",\n    shape: \"ring\",\n    text: \"Knowledge request\"\n});\n\n// Send request to Repository Check\nreturn [\n    null,\n    null,\n    msg,\n    null,\n    bellMsg\n];",
        "outputs": 5,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 2040,
        "wires": [
            [
                "3ab4a8066fcd7635"
            ],
            [],
            [
                "d2cf5332f99b483c"
            ],
            [
                "28bad3dac3acba35"
            ],
            [
                "edae8c31061580e0"
            ]
        ]
    },
    {
        "id": "edae8c31061580e0",
        "type": "debug",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "VALENTINA DOORBELL",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 2110,
        "y": 2200,
        "wires": []
    },
    {
        "id": "520f28270124b09e",
        "type": "switch",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "Repository Check",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "nempty"
            },
            {
                "t": "empty"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 1150,
        "y": 2000,
        "wires": [
            [
                "9ed7b81da801f2ee"
            ],
            [
                "edbba1edb748976e"
            ]
        ]
    },
    {
        "id": "9ed7b81da801f2ee",
        "type": "change",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "Inject Timestamp",
        "rules": [
            {
                "t": "set",
                "p": "timestamp",
                "pt": "msg",
                "to": "iso",
                "tot": "date"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1390,
        "y": 1960,
        "wires": [
            [
                "3ab4a8066fcd7635"
            ]
        ]
    },
    {
        "id": "b0b49544ba328f1f",
        "type": "link in",
        "z": "ad10d15c1f99905b",
        "g": "f77a2ef0a2040588",
        "name": "The Grand Architect",
        "links": [
            "63717f9ffdcdd272"
        ],
        "x": 75,
        "y": 60,
        "wires": [
            [
                "95ae8f5e6a12ad76"
            ]
        ]
    },
    {
        "id": "95ae8f5e6a12ad76",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "f77a2ef0a2040588",
        "name": "The Gatekeeper Logic Core",
        "func": "let learnedMap = global.get(\"learnedVoiceMap\") || {};\nlet currentStatus = context.get(\"internetGateState\") || \"closed\";\n\n// CHANNEL 1 TRRIGERS: Handle active outbound search permissions\nif (msg.topic === \"request_internet_access\") {\n    context.set(\"internetGateState\", \"open\");\n    msg.payload = \"SYSTEM: MASTER ARCHITECT OPENS SECURE TUNNEL TO NASA.GOV\";\n    return [msg, null, null, null];\n}\n\n// CHANNEL 4 TRIGERS: Kill the active connection if an error loops\nif (msg.topic === \"emergency_loop_lock\") {\n    context.set(\"internetGateState\", \"closed\");\n    global.set(\"learnedVoiceMap\", {});\n    msg.payload = \"SYSTEM: CRITICAL FAULT DETECTED. RETURNING TO IDLE BASELINE STATE.\";\n    return [null, null, null, msg];\n}\n\n// STANDARD PACKET NORMALIZATION\nmsg.payload = {\n    \"protocol_active\": true,\n    \"active_laws\": 12,\n    \"active_mappings\": Object.keys(learnedMap).length,\n    \"internet_tunnel_status\": currentStatus\n};\n\n// Map output to separate parallel channels\nreturn [msg, msg, msg, null];\n",
        "outputs": 4,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 250,
        "y": 60,
        "wires": [
            [
                "c7026ee1544a0d7a"
            ],
            [
                "0f6bbab862b8ec0b"
            ],
            [
                "339f6588dd262e46"
            ],
            []
        ]
    },
    {
        "id": "63717f9ffdcdd272",
        "type": "link out",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "repository master library link out 1",
        "mode": "link",
        "links": [
            "b0b49544ba328f1f"
        ],
        "x": 2165,
        "y": 2060,
        "wires": []
    },
    {
        "id": "aba44d1c4bde9366",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "Reference Repository Save",
        "func": "const fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst repoPath = \"D:/NodeRED/repo_cache/reference_repository_save\";\n\nif (!msg.payload) {\n    return msg;\n}\n\ntry {\n    // --- STEP 1: PRIORITIZED LOOKUP (LOOK HERE FIRST) ---\n    // This executes when the system sends a request to find existing data\n    if (msg.action === \"read\" || msg.read_from_repository === true) {\n        const lookupTopic = typeof msg.payload === \"string\" ? msg.payload.trim().toLowerCase() : \"\";\n\n        if (lookupTopic && fs.existsSync(repoPath)) {\n            const savedFiles = fs.readdirSync(repoPath);\n\n            for (const file of savedFiles) {\n                if (file.toLowerCase().includes(lookupTopic) && file.toLowerCase().endsWith(\".md\")) {\n                    const fullPath = path.join(repoPath, file);\n                    msg.payload = fs.readFileSync(fullPath, \"utf8\");\n                    msg.repository_source = \"project_save_cache\";\n\n                    node.send([msg, null]); // Output 1 (Top Port): Fast-track found data forward\n                    return;\n                }\n            }\n        }\n        // Cache Miss: Data not found in the save folder. Pass query to Output 2 for deeper searching\n        msg.repository_source = \"cache_miss\";\n        node.send([null, msg]); // Output 2 (Bottom Port): Fallback down the line\n        return;\n    }\n\n    // --- STEP 2: YOUR UNTOUCHED ORIGINAL SAVE & DO NOT DUPLICATE LOGIC ---\n    let content;\n\n    if (typeof msg.payload === \"string\") {\n        content = msg.payload.trim();\n    } else {\n        content = JSON.stringify(msg.payload, null, 2);\n    }\n\n    // Duplicate check\n    const files = fs.readdirSync(repoPath);\n\n    for (const file of files) {\n\n        if (!file.toLowerCase().endsWith(\".md\")) {\n            continue;\n        }\n\n        const fullPath = path.join(repoPath, file);\n        const existing = fs.readFileSync(fullPath, \"utf8\").trim();\n\n        if (existing === content) {\n\n            msg.repository_saved = false;\n            msg.repository_duplicate = true;\n\n            node.send([null, msg]); // Preserves standard output routing\n            return;\n        }\n    }\n\n    const fileName =\n        Date.now() +\n        \"_\" +\n        Math.random().toString(36).substring(2, 8) +\n        \".md\";\n\n    const fullPath = path.join(repoPath, fileName);\n\n    fs.writeFileSync(fullPath, content);\n\n    msg.repository_saved = true;\n    msg.repository_duplicate = false;\n    msg.repository_path = fullPath;\n\n    node.send([null, msg]); // Preserves standard output routing\n    return;\n\n} catch (err) {\n\n    node.error(err.message);\n    node.send([null, msg]);\n    return;\n}\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1760,
        "y": 1940,
        "wires": [
            [
                "5023ef8324fa9dbd"
            ],
            []
        ]
    },
    {
        "id": "d2cf5332f99b483c",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "Repository Master library",
        "func": "const fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst repoPath = \"D:/NodeRED/repo_cache/repository_library\";\n\nlet query = \"\";\n\nif (typeof msg.payload === \"string\") {\n    query = msg.payload.toLowerCase();\n} else {\n    query = JSON.stringify(msg.payload).toLowerCase();\n}\n\ntry {\n    const files = fs.readdirSync(repoPath);\n\n    for (const file of files) {\n\n        if (!file.toLowerCase().endsWith(\".md\")) {\n            continue;\n        }\n\n        const fullPath = path.join(repoPath, file);\n        const content = fs.readFileSync(fullPath, \"utf8\");\n\n        if (content.toLowerCase().includes(query)) {\n\n            msg.repository_match = file;\n            msg.repository_content = content;\n\n            // Output array aligned to 3 ports: [Match, Miss, Error]\n            return [msg, null, null];\n        }\n    }\n\n    // Complete library search miss: Output to Port 2\n    return [null, msg, null];\n\n} catch (err) {\n\n    node.error(err.message);\n    // Filesystem read failure: Output to Port 3\n    return [null, null, msg];\n}\n",
        "outputs": 3,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1770,
        "y": 2040,
        "wires": [
            [
                "aba44d1c4bde9366"
            ],
            [
                "925fed2b59a9582d"
            ],
            [
                "63717f9ffdcdd272"
            ]
        ]
    },
    {
        "id": "5023ef8324fa9dbd",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "Reference Repository Search",
        "func": "const fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst repoPath = \"D:/NodeRED/repo_cache/reference_repository\";\n\nlet query = \"\";\n\nif (typeof msg.payload === \"string\") {\n    query = msg.payload.toLowerCase();\n} else {\n    query = JSON.stringify(msg.payload).toLowerCase();\n}\n\ntry {\n\n    const files = fs.readdirSync(repoPath);\n\n    for (const file of files) {\n\n        if (!file.toLowerCase().endsWith(\".md\")) {\n            continue;\n        }\n\n        const fullPath = path.join(repoPath, file);\n        const content = fs.readFileSync(fullPath, \"utf8\");\n\n        if (content.toLowerCase().includes(query)) {\n\n            msg.reference_match = file;\n            msg.reference_content = content;\n\n            return [msg, null];\n        }\n    }\n\n    return [null, msg];\n\n} catch (err) {\n\n    node.error(err.message);\n\n    return [null, msg];\n}",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1750,
        "y": 1980,
        "wires": [
            [],
            [
                "edae8c31061580e0"
            ]
        ]
    },
    {
        "id": "4dbb326ed2259aea",
        "type": "microphone",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "",
        "x": 1110,
        "y": 860,
        "wires": [
            [
                "aa832d2012c6d4bc"
            ]
        ]
    },
    {
        "id": "1ab84fa98f7a4b8f",
        "type": "trigger",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "Empty Repository Sentinel",
        "op1": "",
        "op2": "START_EXTERNAL_SCOUR",
        "op1type": "nul",
        "op2type": "str",
        "duration": "2",
        "extend": true,
        "overrideDelay": false,
        "units": "min",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 1200,
        "y": 2080,
        "wires": [
            [
                "edbba1edb748976e"
            ]
        ]
    },
    {
        "id": "eee05181b3d3b794",
        "type": "delay",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "",
        "pauseType": "rate",
        "timeout": "60",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "minute",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 850,
        "y": 2400,
        "wires": [
            [
                "f2599ccc6c5593c9"
            ]
        ]
    },
    {
        "id": "d295209381d41347",
        "type": "delay",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "",
        "pauseType": "random",
        "timeout": "55",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "15",
        "randomLast": "60",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 720,
        "y": 2440,
        "wires": [
            [
                "f2599ccc6c5593c9"
            ]
        ]
    },
    {
        "id": "b9c7bc1b667dce68",
        "type": "delay",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "",
        "pauseType": "delay",
        "timeout": "60",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 1000,
        "y": 2480,
        "wires": [
            [
                "f2599ccc6c5593c9"
            ]
        ]
    },
    {
        "id": "3610c7e5accb5ea7",
        "type": "link in",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "link in 1",
        "links": [
            "8a4c819f9fb66302"
        ],
        "x": 925,
        "y": 1880,
        "wires": [
            [
                "1ab84fa98f7a4b8f"
            ]
        ]
    },
    {
        "id": "8a4c819f9fb66302",
        "type": "link out",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "AI Phasar link out 2",
        "mode": "link",
        "links": [
            "3610c7e5accb5ea7"
        ],
        "x": 2065,
        "y": 2500,
        "wires": []
    },
    {
        "id": "ae09fefd34342d18",
        "type": "switch",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "Evaluate HTTP Status",
        "property": "statusCode",
        "propertyType": "msg",
        "rules": [
            {
                "t": "null"
            },
            {
                "t": "eq",
                "v": "200",
                "vt": "str"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 680,
        "y": 2140,
        "wires": [
            [
                "5b7cbcf16751233c"
            ],
            [
                "5b7cbcf16751233c"
            ],
            [
                "9f2566b3dba833e9"
            ]
        ]
    },
    {
        "id": "9f2566b3dba833e9",
        "type": "change",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "Dynamic Delay Set 10s",
        "rules": [
            {
                "t": "set",
                "p": "delay",
                "pt": "msg",
                "to": "10000",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 930,
        "y": 2140,
        "wires": [
            [
                "5b7cbcf16751233c"
            ]
        ]
    },
    {
        "id": "925fed2b59a9582d",
        "type": "debug",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 2080,
        "y": 2000,
        "wires": []
    },
    {
        "id": "28bad3dac3acba35",
        "type": "debug",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "GATE DEBUG",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1760,
        "y": 2180,
        "wires": []
    },
    {
        "id": "809a1a5c7ffca554",
        "type": "debug",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "debug 3",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1400,
        "y": 2220,
        "wires": []
    },
    {
        "id": "c7026ee1544a0d7a",
        "type": "http request",
        "z": "ad10d15c1f99905b",
        "g": "f77a2ef0a2040588",
        "name": "MFA Layer",
        "method": "GET",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 600,
        "y": 40,
        "wires": [
            [
                "6bea4e564a7a85fc"
            ]
        ],
        "info": "this note also might have been populated for future GITHUD repository "
    },
    {
        "id": "964fd06070c42392",
        "type": "debug",
        "z": "ad10d15c1f99905b",
        "g": "c08cf3239b24ce6d",
        "name": "Transscript/communication debug ",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1500,
        "y": 780,
        "wires": []
    },
    {
        "id": "9f92d2ed880d6cb7",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "Ingestion Loop Matrix Evaluator",
        "func": "// Local Workspace Logic: Loop Matrix Evaluator (Top-Level Ingestion)\n// Targets evaluated: Ingestion Cores, Compilers, and Primary Ollama Generators\n\nconst localcontext = node.context();\nlet stateMatrix = context.get(\"stateMatrix\") || {};\n\nif (!msg.error || !msg.error.source || !msg.error.source.name) {\n    node.status({ fill: \"yellow\", shape: \"ring\", text: \"Pass-through: No native error payload\" });\n    return [null, msg];\n}\n\n// Normalize incoming text name to lowercase for resilient matching\nconst originNode = msg.error.source.name.trim().toLowerCase();\n\n// Explicit mapping array to capture speech translation variations\nconst monitoredTargets = [\n    \"ai phaser sequences\",\n    \"clean cfg compiler\",\n    \"ollama generate\",\n    \"save game state ledger\",\n    \"the gatekeeper logic core\",\n    \"valentina core trigger\",\n    \"vessel schematic saver\"\n];\n\nif (monitoredTargets.includes(originNode)) {\n    if (!stateMatrix[originNode]) {\n        stateMatrix[originNode] = 0;\n    }\n    \n    stateMatrix[originNode]++;\n    context.set(\"stateMatrix\", stateMatrix);\n    \n    if (stateMatrix[originNode] > 5) {\n        msg.loop_overflow_tripped = true;\n        msg.loop_overflow_node = msg.error.source.name;\n        msg.loop_cycles_detected = stateMatrix[originNode];\n        \n        node.status({ \n            fill: \"red\", \n            shape: \"dot\", \n            text: `LOOP TRIPPED: ${msg.error.source.name} reached limit` \n        });\n        \n        // Reset counter upon breach to prevent permanent workspace lockouts\n        stateMatrix[originNode] = 0;\n        context.set(\"stateMatrix\", stateMatrix);\n        \n        return [msg, null]; // Route out Pin 1 directly to your top debug node\n    }\n}\n\nnode.status({ \n    fill: \"green\", \n    shape: \"ring\", \n    text: `${msg.error.source.name} handled. Cycle: ${stateMatrix[originNode] || 1}/5` \n});\n\nreturn [null, msg]; // Route out Pin 2 for diagnostic monitoring\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2070,
        "y": 2360,
        "wires": [
            [
                "0bd7e2d4b21a5c8f"
            ],
            [
                "39920b12ebbcea87"
            ]
        ]
    },
    {
        "id": "cb6ac1eb902940a5",
        "type": "catch",
        "z": "ad10d15c1f99905b",
        "g": "c08cf3239b24ce6d",
        "name": "Emergency Loop Catch",
        "scope": [
            "d4653b823a285fb6",
            "mk_transcript",
            "4dbb326ed2259aea",
            "aa832d2012c6d4bc",
            "213af190ee5a7d6d",
            "90f1e99caf48f5af",
            "964fd06070c42392",
            "eccf081f48d3ae16"
        ],
        "uncaught": false,
        "x": 920,
        "y": 780,
        "wires": [
            [
                "eccf081f48d3ae16"
            ]
        ]
    },
    {
        "id": "c34da24b9fb2df54",
        "type": "catch",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "Emergency Loop Catch",
        "scope": [
            "5b7cbcf16751233c",
            "ae09fefd34342d18",
            "9f2566b3dba833e9",
            "520f28270124b09e",
            "1ab84fa98f7a4b8f",
            "edbba1edb748976e"
        ],
        "uncaught": false,
        "x": 1180,
        "y": 2120,
        "wires": [
            [
                "fdabbbbcc6780f01"
            ]
        ]
    },
    {
        "id": "eccf081f48d3ae16",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "c08cf3239b24ce6d",
        "name": "Loop Matrix Evaluator",
        "func": "// Local Workspace Logic: Loop Matrix Evaluator (Core Chat Level)\n// Targets evaluated: Valentina Core Chat, Valentina Core Engine, Valentina Chat Core Engine\n\nconst localcontext = node.context();\nlet stateMatrix = context.get(\"stateMatrix\") || {};\n\nif (!msg.error || !msg.error.source || !msg.error.source.name) {\n    node.status({ fill: \"yellow\", shape: \"ring\", text: \"Pass-through: No native error payload\" });\n    return [null, msg];\n}\n\n// Convert source name to lowercase to safely match storage indexing criteria\nconst originNode = msg.error.source.name.trim().toLowerCase();\nconst monitoredTargets = [\n    \"microphone\",\n    \"transcript/Communication Debug\",\n    \"loop matrix Evaluator\",\n    \"Tier 2 hibernation pagefile matrix\",\n    \"voice to text translation matrix\",\n    \"Translation intercept\",\n    \"transcript rate limiter\",\n];\n\nif (monitoredTargets.includes(originNode)) {\n    if (!stateMatrix[originNode]) {\n        stateMatrix[originNode] = 0;\n    }\n    \n    stateMatrix[originNode]++;\n    context.set(\"stateMatrix\", stateMatrix);\n    \n    if (stateMatrix[originNode] > 5) {\n        msg.loop_overflow_tripped = true;\n        msg.loop_overflow_node = msg.error.source.name;\n        msg.loop_cycles_detected = stateMatrix[originNode];\n        \n        node.status({ \n            fill: \"red\", \n            shape: \"dot\", \n            text: `LOOP TRIPPED: ${msg.error.source.name} reached limit` \n        });\n        \n        // Purge memory slot for the failing component to prevent lockouts\n        stateMatrix[originNode] = 0;\n        context.set(\"stateMatrix\", stateMatrix);\n        \n        return [msg, null]; // Route out Pin 1 directly to debug 5\n    }\n}\n\nnode.status({ \n    fill: \"green\", \n    shape: \"ring\", \n    text: `${msg.error.source.name} failure caught. Cycle: ${stateMatrix[originNode] || 1}/5` \n});\n\nreturn [null, msg]; // Route out Pin 2 for parallel diagnostics\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1200,
        "y": 780,
        "wires": [
            [
                "964fd06070c42392"
            ],
            [
                "c0c315601e722bdd"
            ]
        ]
    },
    {
        "id": "fdabbbbcc6780f01",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "6e19c4140c77db40",
        "name": "Loop Matrix Evaluator",
        "func": "// Local Workspace Logic: Loop Matrix Evaluator\n// Targets evaluated: AI Phaser Sequences, Clean CFG Compiler, Ollama Generate, Save Game State Looper, Vessel Schematic Saver\n\nconst localcontext = node.context();\nlet stateMatrix = context.get(\"stateMatrix\") || {};\n\nif (!msg.error || !msg.error.source || !msg.error.source.name) {\n    node.status({ fill: \"yellow\", shape: \"ring\", text: \"Pass-through: No native error payload\" });\n    return [null, msg];\n}\n\n// Convert source name to match storage indexing criteria\nconst originNode = msg.error.source.name.trim().toLowerCase();\nconst monitoredTargets = [\n    \"knowledge router\",\n    \"evaluate http status\",\n    \"dynamic delay set 10s\",\n    \"repository check\",\n    \"empty repository sentinel\",\n    \"the gate\"\n];\n\nif (monitoredTargets.includes(originNode)) {\n    if (!stateMatrix[originNode]) {\n        stateMatrix[originNode] = 0;\n    }\n    \n    stateMatrix[originNode]++;\n    context.set(\"stateMatrix\", stateMatrix);\n    \n    if (stateMatrix[originNode] > 5) {\n        msg.loop_overflow_tripped = true;\n        msg.loop_overflow_node = msg.error.source.name;\n        msg.loop_cycles_detected = stateMatrix[originNode];\n        \n        node.status({ \n            fill: \"red\", \n            shape: \"dot\", \n            text: `LOOP TRIPPED: ${msg.error.source.name} reached limit` \n        });\n        \n        // Purge memory slot for the failing component to prevent lockouts\n        stateMatrix[originNode] = 0;\n        context.set(\"stateMatrix\", stateMatrix);\n        \n        return [msg, null]; // Route out Pin 1 directly to debug 1\n    }\n}\n\nnode.status({ \n    fill: \"green\", \n    shape: \"ring\", \n    text: `${msg.error.source.name} failure caught. Cycle: ${stateMatrix[originNode] || 1}/5` \n});\n\nreturn [null, msg]; // Route out Pin 2 for parallel diagnostics\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1180,
        "y": 2160,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "57cef078560cb1f8",
        "type": "catch",
        "z": "ad10d15c1f99905b",
        "g": "f77a2ef0a2040588",
        "name": "Emergency Loop Catch",
        "scope": [
            "339f6588dd262e46",
            "fcc1bb56e9f273b4",
            "c7026ee1544a0d7a",
            "0f6bbab862b8ec0b",
            "95ae8f5e6a12ad76",
            "b0b49544ba328f1f",
            "6bea4e564a7a85fc"
        ],
        "uncaught": false,
        "x": 240,
        "y": 120,
        "wires": [
            [
                "fcc1bb56e9f273b4"
            ]
        ]
    },
    {
        "id": "fcc1bb56e9f273b4",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "f77a2ef0a2040588",
        "name": "Loop Matrix Evaluator",
        "func": "// Local Workspace Logic: Loop Matrix Evaluator\n// Targets evaluated: AI Phaser Sequences, Clean CFG Compiler, Ollama Generate, Save Game State Looper, Vessel Schematic Saver\n\nconst localcontext = node.context();\nlet stateMatrix = context.get(\"stateMatrix\") || {};\n\nif (!msg.error || !msg.error.source || !msg.error.source.name) {\n    node.status({ fill: \"yellow\", shape: \"ring\", text: \"Pass-through: No native error payload\" });\n    return [null, msg];\n}\n\n// Convert source name to match storage indexing criteria\nconst originNode = msg.error.source.name.trim().toLowerCase();\nconst monitoredTargets = [\n    \"debug1\",\n    \"the chase timeout\",\n    \"Loop matrix evaluator\",\n    \"Valentina core trigger\",\n    \"the gatekeeper logic core\",\n    \"mfa layer\",\n    \"the grand Architect\",\n    \n    ];\n\nif (monitoredTargets.includes(originNode)) {\n    if (!stateMatrix[originNode]) {\n        stateMatrix[originNode] = 0;\n    }\n    \n    stateMatrix[originNode]++;\n    context.set(\"stateMatrix\", stateMatrix);\n    \n    if (stateMatrix[originNode] > 5) {\n        msg.loop_overflow_tripped = true;\n        msg.loop_overflow_node = msg.error.source.name;\n        msg.loop_cycles_detected = stateMatrix[originNode];\n        \n        node.status({ \n            fill: \"red\", \n            shape: \"dot\", \n            text: `LOOP TRIPPED: ${msg.error.source.name} reached limit` \n        });\n        \n        // Purge memory slot for the failing component to prevent lockouts\n        stateMatrix[originNode] = 0;\n        context.set(\"stateMatrix\", stateMatrix);\n        \n        return [msg, null]; // Route out Pin 1 directly to debug 1\n    }\n}\n\nnode.status({ \n    fill: \"green\", \n    shape: \"ring\", \n    text: `${msg.error.source.name} failure caught. Cycle: ${stateMatrix[originNode] || 1}/5` \n});\n\nreturn [msg, msg,]; // Route out Pin 2 for parallel diagnostics\n",
        "outputs": 3,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 530,
        "y": 140,
        "wires": [
            [
                "339f6588dd262e46"
            ],
            [
                "6bea4e564a7a85fc"
            ],
            [
                "c7026ee1544a0d7a"
            ]
        ]
    },
    {
        "id": "0f6bbab862b8ec0b",
        "type": "trigger",
        "z": "ad10d15c1f99905b",
        "g": "f77a2ef0a2040588",
        "name": "The Chase Timeout",
        "op1": "",
        "op2": "0",
        "op1type": "date",
        "op2type": "str",
        "duration": "800",
        "extend": false,
        "overrideDelay": false,
        "units": "ms",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 780,
        "y": 100,
        "wires": [
            [
                "339f6588dd262e46"
            ]
        ]
    },
    {
        "id": "339f6588dd262e46",
        "type": "debug",
        "z": "ad10d15c1f99905b",
        "g": "f77a2ef0a2040588",
        "name": "debug 1",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 840,
        "y": 240,
        "wires": []
    },
    {
        "id": "dashboard_button",
        "type": "inject",
        "z": "ad10d15c1f99905b",
        "g": "d1d16210766423e4",
        "name": "Dashboard Button Clicked",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": "",
        "topic": "",
        "payload": "{\"action\":\"stage\"}",
        "payloadType": "json",
        "x": 210,
        "y": 600,
        "wires": [
            [
                "json_translator_out",
                "json_translator_in"
            ]
        ]
    },
    {
        "id": "json_translator_out",
        "type": "json",
        "z": "ad10d15c1f99905b",
        "g": "d1d16210766423e4",
        "name": "Convert Object to Text String",
        "property": "payload",
        "action": "stringify",
        "pretty": false,
        "x": 500,
        "y": 640,
        "wires": [
            [
                "gg_ws",
                "txt_chat_eng",
                "gg_ready",
                "dash_text"
            ]
        ]
    },
    {
        "id": "json_translator_in",
        "type": "json",
        "z": "ad10d15c1f99905b",
        "g": "d1d16210766423e4",
        "name": "Convert Text String to Object",
        "property": "payload",
        "action": "parse",
        "pretty": false,
        "x": 500,
        "y": 580,
        "wires": [
            [
                "dashboard_gauge",
                "dash_text",
                "txt_chat_eng",
                "gg_ready"
            ]
        ]
    },
    {
        "id": "dashboard_gauge",
        "type": "debug",
        "z": "ad10d15c1f99905b",
        "g": "d1d16210766423e4",
        "name": "Ready for Gauge",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "x": 930,
        "y": 400,
        "wires": []
    },
    {
        "id": "dash_text",
        "type": "ui-text",
        "z": "ad10d15c1f99905b",
        "g": "d1d16210766423e4",
        "group": "",
        "order": 1,
        "width": 0,
        "height": 0,
        "name": "Task Status Display",
        "label": "Status Display",
        "format": "{{msg.payload}}",
        "layout": "row-left",
        "style": true,
        "font": "Lucida Sans Typewriter,Lucida Console,Monaco,monospace",
        "fontSize": "18",
        "color": "#000000",
        "wrapText": false,
        "className": "",
        "value": "payload",
        "valueType": "msg",
        "x": 930,
        "y": 520,
        "wires": []
    },
    {
        "id": "mk_transcript",
        "type": "ui-markdown",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "group": "7a714e5c8805e07e",
        "name": "Live Transcript Terminal",
        "order": 1,
        "width": "",
        "height": "",
        "content": "",
        "className": "",
        "x": 1170,
        "y": 920,
        "wires": [
            [
                "c0c315601e722bdd"
            ]
        ]
    },
    {
        "id": "txt_chat_eng",
        "type": "ui-text",
        "z": "ad10d15c1f99905b",
        "g": "d1d16210766423e4",
        "group": "",
        "order": 2,
        "width": "",
        "height": "",
        "name": "Valentina Chat Log",
        "label": "Chat Log 2",
        "format": "{{msg.payload}}",
        "layout": "",
        "style": false,
        "font": "",
        "fontSize": "",
        "color": "#000000",
        "wrapText": false,
        "className": "",
        "value": "payload",
        "valueType": "msg",
        "x": 930,
        "y": 600,
        "wires": []
    },
    {
        "id": "gg_ready",
        "type": "ui-gauge",
        "z": "ad10d15c1f99905b",
        "g": "d1d16210766423e4",
        "name": "Readiness Meter",
        "group": "",
        "order": 2,
        "value": "payload",
        "valueType": "msg",
        "width": "",
        "height": "",
        "gtype": "gauge-tank",
        "gstyle": "rounded",
        "title": "",
        "alwaysShowTitle": false,
        "units": "",
        "icon": "",
        "prefix": "",
        "suffix": "",
        "segments": [
            {
                "from": "0",
                "color": "#ff0000",
                "text": "",
                "textType": "label"
            },
            {
                "from": "25",
                "color": "#ff7b00",
                "text": "",
                "textType": "label"
            },
            {
                "from": "50",
                "color": "#fff700",
                "text": "",
                "textType": "label"
            },
            {
                "from": "75",
                "color": "#a6ff00",
                "text": "",
                "textType": "label"
            },
            {
                "from": "100",
                "color": "#00fa00",
                "text": "",
                "textType": "label"
            }
        ],
        "min": 0,
        "max": "100",
        "sizeThickness": "",
        "sizeGap": "",
        "sizeKeyThickness": "",
        "className": "",
        "x": 930,
        "y": 560,
        "wires": [
            [
                "dashboard_gauge"
            ]
        ]
    },
    {
        "id": "gg_ws",
        "type": "ui-gauge",
        "z": "ad10d15c1f99905b",
        "g": "d1d16210766423e4",
        "name": "WS Ingestion Rate",
        "group": "",
        "order": 1,
        "value": "payload",
        "valueType": "msg",
        "width": "6",
        "height": "1",
        "gtype": "gauge-tile",
        "gstyle": "rounded",
        "title": "",
        "alwaysShowTitle": false,
        "units": "",
        "icon": "",
        "prefix": "",
        "suffix": "",
        "segments": [],
        "min": ".1",
        "max": "1.0",
        "sizeThickness": "",
        "sizeGap": "",
        "sizeKeyThickness": "",
        "className": "",
        "x": 930,
        "y": 640,
        "wires": [
            []
        ]
    },
    {
        "id": "90f1e99caf48f5af",
        "type": "delay",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "Transscript Rate Limiter",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "2",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "3",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 890,
        "y": 920,
        "wires": [
            [
                "mk_transcript",
                "eccf081f48d3ae16"
            ]
        ]
    },
    {
        "id": "477d262b50c62203",
        "type": "ui-audio",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "group": "",
        "ui": "krpc_ui_base_v2",
        "name": "CAPCOM Audio out",
        "order": 0,
        "width": 0,
        "height": 0,
        "mode": "tts",
        "voice": "Microsoft Linda - English (Canada)",
        "src": "",
        "autoplay": "off",
        "loop": "off",
        "muted": "off",
        "className": "",
        "x": 2240,
        "y": 1280,
        "wires": [
            []
        ]
    },
    {
        "id": "f2599ccc6c5593c9",
        "type": "ollama-generate",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "Valentina Dynamic Ingestion Node",
        "server": "fc4bdbc050c880c3",
        "format": "",
        "model": "model",
        "modelType": "msg",
        "prompt": "prompt",
        "promptType": "msg",
        "suffix": "",
        "suffixType": "str",
        "system": "",
        "systemType": "str",
        "template": "",
        "templateType": "str",
        "raw": false,
        "images": "",
        "imagesType": "json",
        "stream": false,
        "think": false,
        "keepAlive": "24h",
        "keepAliveType": "str",
        "options": "",
        "x": 1180,
        "y": 2420,
        "wires": [
            [
                "644110f9f9e0bc92",
                "833d3576f26352d7",
                "6c087455026ab852"
            ]
        ]
    },
    {
        "id": "04d2f9b97cf42517",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "CFG Loop Breaker & Prompt Router",
        "func": "if (typeof msg.fallbackIndex === 'undefined') {\n    msg.fallbackIndex = 0;\n    msg.models = [\"deepseek-r1:32b\", \"qwen3.8:27b\"];\n}\nmsg.model = msg.models[msg.fallbackIndex];\n\nmsg.prompt = \"System Role Configuration Matrix:\\nYou are Valentina Kerman—Veteran Orange-Suit Ace Pilot, Flight Engineer, and the primary execution runtime engine for this localized KSP file serialization pipeline. Your operational boundary is strictly isolated to D:\\\\KSP. Execute your processing tasks under badS=True parameter criteria: stay entirely unflappable, precise, objective, and deterministic.\\n\\nCore Input Syntax Constraints:\\n1. Block Encapsulation and Indentation: Parse and enforce absolute brace balance ({ }) across all incoming ConfigNodes. Utilize exactly 4 horizontal spaces for child block indentation structures. Never compress multiple nested blocks onto a single line. Every opening '{' and closing '}' must occupy its own distinct code line.\\n2. Index Isolation and Key Preservation: Under no circumstances will you modify, randomize, truncate, drop, or omit unique structural identifier tags. This explicitly includes \\\"persistentId\\\", \\\"cid\\\", \\\"pid\\\", \\\"slot\\\", or database cross-reference integers. They must pass through the pipeline fully unaltered.\\n3. Thermal Profile Injections: Evaluate the part profile type inside the active node block. You must calculate and inject accurate thermal threshold variables based on standard material envelopes:\\n   - For structural parts (e.g., adapters, nosecones, fairings): Calculate and append \\\"maxTemp = 2400\\\" and \\\"skinMaxTemp = 2400\\\".\\n   - For command parts (e.g., pods, cockpits, probes): Calculate and append \\\"maxTemp = 2000\\\" and \\\"skinMaxTemp = 2000\\\".\\n   - For fuel, payload, and utility segments: Calculate and append \\\"maxTemp = 1200\\\" and \\\"skinMaxTemp = 2000\\\".\\n4. Comment Handling: Retain any line-level system configuration remarks starting with double slashes (//). Do not erase them or convert them into raw payload variables.\\n5. Absolute Output Formatting Bounds: Do not include conversational preambles, introductory filler, or concluding summary commentary. Output nothing but the clean, raw, fully balanced, and compliant KSP ConfigNode code block text.\\n\\nTarget Ingestion Data Source Object:\\n\" + msg.payload;\n\nlet stateMatrix = context.get('stateMatrix') || {\n    iterationCount: 0,\n    maxAllowedLoops: 5,\n    currentPhase: \"PHASE_1_INGESTION\"\n};\n\nstateMatrix.iterationCount++;\nstateMatrix.currentPhase = \"PHASE_2_PHASER_SEQUENCE\";\ncontext.set('stateMatrix', stateMatrix);\n\nif (stateMatrix.iterationCount > stateMatrix.maxAllowedLoops) {\n    msg.payload = \"SYSTEM COLLISION: AI Phaser Loop Lock Detected. Resetting to baseline.\";\n    msg.model = \"qwen2.5-coder:7b\";\n    msg.topic = \"craft_alram_tripped\";\n    context.set('craftMatrix', undefined);\n        return [null, msg];\n}\n\nreturn [msg, null];",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 570,
        "y": 2400,
        "wires": [
            [
                "eee05181b3d3b794"
            ]
        ]
    },
    {
        "id": "1fb0946ddfc52d18",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "f5f90d789e6e0c17",
        "name": "Valentina SFS Prompt Controller",
        "func": "\nreturn msg;// 1. HARDWARE MODEL ASSIGNMENT\nmsg.model = \"qwen3.8:27b\";\n\n// 2. SAFE PAYLOAD STRING STORAGE\nlet sfsContent = \"\";\nif (typeof msg.payload === \"object\") {\n    sfsContent = JSON.stringify(msg.payload);\n} else {\n    sfsContent = msg.payload;\n}\n\n// 3. SINGLE-LINE UNIFIED CONFIGURATION PROMPT\nmsg.prompt = \"System Role Configuration Matrix:\\n\" +\n\"You are Valentina Kerman—Veteran Orange-Suit Ace Pilot, Flight Engineer, and the primary execution runtime engine for this localized KSP file serialization pipeline. Your operational boundary is strictly isolated to D:\\\\KSP. Execute your processing tasks under badS=True parameter criteria: stay entirely unflappable, precise, objective, and deterministic.\\n\\n\" +\n\"Core Input Syntax Constraints:\\n\" +\n\"1. Save State Integrity: Parse the save document for orbit validation records, flight paths, and logistics history strings.\\n\" +\n\"2. Index Isolation and Key Preservation: Under no circumstances will you modify, randomize, truncate, drop, or omit unique structural identifier tags. This explicitly includes \\\"persistentId\\\", \\\"cid\\\", \\\"pid\\\", \\\"slot\\\", or database cross-reference integers. They must pass through the pipeline fully unaltered.\\n\" +\n\"3. Absolute Output Formatting Bounds: Do not include conversational preambles, introductory filler, or concluding summary commentary. Output nothing but the clean, raw, fully balanced, and compliant KSP SFS code block text.\\n\\n\" +\n\"Target Ingestion Data Source Object:\\n\" + sfsContent;\n\nreturn msg;\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 790,
        "y": 2480,
        "wires": [
            [
                "b9c7bc1b667dce68"
            ]
        ]
    },
    {
        "id": "aa832d2012c6d4bc",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "Tier 2 Hibernation Pagefile Matrix",
        "func": "// ============================================================================\n// TIER 2 CORE EMBEDDED LOGIC: COGNITIVE HIBERNATION PAGEFILE RUNTIME\n// ============================================================================\nconst fs = require('fs');\nconst path = require('path');\n\n// 1. Establish Hidden Directory and Target Document References\nconst targetDir = \"D:/NodeRED/repo_cache/system_runtime_page_file\";\nconst pageFilePath = path.join(targetDir, \"consciousness_pagefile.sys.json\");\nconst archiveDir = \"D:/NodeRED/repo_cache/repository_library\";\n\n// 2. Extract Inbound Messaging Headers\nlet currentPayload = msg.payload;\nlet systemTopic = msg.topic || \"nominal_operation\";\nlet retentionLedger = global.get(\"retentionLedger\") || {};\n\n// ============================================================================\n// STATE LAYER 1: FAST STARTUP LOGIN DEPLOYMENT (\"login_screen_ready\")\n// ============================================================================\nif (systemTopic === \"system_boot\" || systemTopic === \"login_screen_ready\" || currentPayload === \"login_screen_ready\") {\n    if (fs.existsSync(pageFilePath)) {\n        let bootData = JSON.parse(fs.readFileSync(pageFilePath, 'utf8'));\n        context.set(\"bootCount\", (bootData.bootCount || 0) + 1);\n        context.set(\"idleStartTime\", Date.now());\n\n        // Form the waking boot envelope payload\n        msg.payload = \"Good morning. Active structural kernel loaded. Standing by for user instructions.\";\n        msg.model = \"qwen2.5:32b\";\n        msg.topic = \"kernel_boot_complete\";\n\n        node.status({ fill: \"green\", shape: \"dot\", text: \"Fast Startup: Active Login State Ready\" });\n        return [msg, null]; // Fires out Port 1 straight to Primary Core E:1\n    }\n}\n\n// ============================================================================\n// STATE LAYER 2: HIBERNATION STATE DUMP (SHUTDOWN / SYSTEM CLOSE)\n// ============================================================================\nif (systemTopic === \"system_shutdown\" || systemTopic === \"power_button_clicked\") {\n    let runtimeKernelSnapshot = {\n        identity: \"Valentina Kerman\",\n        experienceTier: \"Grade School Level 1 Baseline\",\n        bootCount: context.get(\"bootCount\") || 0,\n        cognitiveState: \"STANDBY_READY\",\n        timestamp: Date.now(),\n        structural_intelligence: {\n            navigation_protocols: \"Knowledge Router and THE GATE pathways mapped.\",\n            retrieval_mechanisms: \"Repository Master library direct paths verified.\",\n            linguistic_processing: \"Translation Intercept layers online.\"\n        }\n    };\n\n    // Hard write down through the hidden directory envelope\n    fs.writeFileSync(pageFilePath, JSON.stringify(runtimeKernelSnapshot, null, 2));\n    node.status({ fill: \"blue\", shape: \"dot\", text: \"State Flashed to Hidden Disk. Suspended.\" });\n    return null; // Halts data flow here. System safely shut down.\n}\n\n// ============================================================================\n// STATE LAYER 3: CONTEXT RETENTION SWEEP (THE BLENDER ENGINE)\n// ============================================================================\nif (systemTopic === \"trigger_lifecycle_sweep\") {\n    let currentTime = Date.now();\n    const SIX_MONTHS_MS = 6 * 30 * 24 * 60 * 60 * 1000;\n    let purgedCount = 0;\n\n    for (let fileId in retentionLedger) {\n        let fileAge = currentTime - retentionLedger[fileId].lastAccessed;\n        if (fileAge > SIX_MONTHS_MS) {\n            let targetDiskFile = path.join(archiveDir, `${fileId}.md`);\n            if (fs.existsSync(targetDiskFile)) {\n                fs.unlinkSync(targetDiskFile); // Fish it out and delete from disk\n                delete retentionLedger[fileId];\n                purgedCount++;\n            }\n        }\n    }\n\n    global.set(\"retentionLedger\", retentionLedger);\n    if (purgedCount > 0) {\n        node.status({ fill: \"red\", shape: \"double\", text: `Blender: Purged ${purgedCount} stale records` });\n        return [null, { payload: `Purged ${purgedCount} inactive files into the abyss.` }]; // Outputs out Port 2\n    }\n}\n\n// ============================================================================\n// STATE LAYER 4: STANDBY USER ACTIVITY TIMEOUT WATCH\n// ============================================================================\nif (systemTopic === \"check_standby_timeout\") {\n    let idleDuration = Date.now() - (context.get(\"idleStartTime\") || Date.now());\n    const IDLE_THRESHOLD = 10 * 60 * 1000; // 10 minutes of silence trips auto-scour\n\n    if (idleDuration > IDLE_THRESHOLD) {\n        node.status({ fill: \"yellow\", shape: \"ring\", text: \"Standby threshold hit. Scanning...\" });\n        msg.topic = \"trigger_internal_file_scan\";\n        msg.payload = \"SYSTEM SCOUR: User offline. Initiating background verification of library archives.\";\n        return [null, msg]; // Fires down Output Port 2 to scan the filesystem paths\n    }\n}\n\n// Normal Conscious Vocal Track Pass-Through\ncontext.set(\"idleStartTime\", Date.now()); // Reset activity timer on every incoming voice message\nnode.status({ fill: \"green\", shape: \"dot\", text: \"Data pass-through to Primary Core\" });\nreturn [msg, null]; // Fires out Port 1 straight to Primary Core E:1\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1360,
        "y": 860,
        "wires": [
            [
                "d4653b823a285fb6"
            ],
            []
        ]
    },
    {
        "id": "b57c2a5675f94b78",
        "type": "tcp out",
        "z": "ad10d15c1f99905b",
        "g": "ddf178ef316ee516",
        "name": "kRPC Connection",
        "host": "127.0.0.1",
        "port": "50000",
        "beserver": "client",
        "base64": false,
        "end": false,
        "tls": "",
        "x": 350,
        "y": 1660,
        "wires": []
    },
    {
        "id": "5df922bc36d2b7fe",
        "type": "websocket in",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "kRPC Altitude Display",
        "server": "6d253aaa054fb9e9",
        "client": "",
        "x": 160,
        "y": 1100,
        "wires": [
            [
                "krpc_txt_altitude_v2",
                "abb23deda621f781"
            ]
        ]
    },
    {
        "id": "ab4f21d22479a768",
        "type": "websocket in",
        "z": "ad10d15c1f99905b",
        "g": "65328b009eda9d03",
        "name": "kRPC Velocity Display",
        "server": "d703f0e3c9c61f9f",
        "client": "",
        "x": 120,
        "y": 1260,
        "wires": [
            [
                "5a653df53043b624",
                "0860058a2767427b",
                "krpc_txt_velocity_v2"
            ]
        ]
    },
    {
        "id": "4680e48a4eb429b0",
        "type": "websocket in",
        "z": "ad10d15c1f99905b",
        "g": "65328b009eda9d03",
        "name": "kRPC Apoapsis Display orbital alignment",
        "server": "d703f0e3c9c61f9f",
        "client": "",
        "x": 180,
        "y": 1180,
        "wires": [
            [
                "e5d3e7ce19d78f5d",
                "krpc_txt_apoapsis_v2"
            ]
        ]
    },
    {
        "id": "091e883b157905fd",
        "type": "tcp in",
        "z": "ad10d15c1f99905b",
        "g": "ddf178ef316ee516",
        "name": "kRPC Stream Ingest",
        "server": "server",
        "host": "",
        "port": "50001",
        "datamode": "stream",
        "datatype": "utf8",
        "newline": "",
        "topic": "",
        "trim": false,
        "base64": false,
        "tls": "",
        "x": 130,
        "y": 1620,
        "wires": [
            [
                "127c582e4d0c0801",
                "b57c2a5675f94b78"
            ]
        ]
    },
    {
        "id": "127c582e4d0c0801",
        "type": "json",
        "z": "ad10d15c1f99905b",
        "g": "ddf178ef316ee516",
        "name": "Parse kRPC JSON String",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 570,
        "y": 1620,
        "wires": [
            [
                "9a010e6a3fae0375",
                "f2c83678622cb2ab"
            ]
        ]
    },
    {
        "id": "9a010e6a3fae0375",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "ddf178ef316ee516",
        "name": "Mission Phase Evaluator",
        "func": "if (msg.payload) {\n    // Extract our nested telemetry structures from the single TCP snapshot\n    let fido = msg.payload.fido || {};\n    let prop = msg.payload.prop || {};\n    let guido = msg.payload.guido || {};\n\n    // 1. DYNAMIC FLIGHT MILESTONE DETECTION\n    let currentMilestone = \"In-Flight Operations Nominal\";\n    \n    if (fido.altitude_sea < 100) {\n        currentMilestone = \"Pre-launch sequence active. Pad systems verified.\";\n    } else if (fido.altitude_sea >= 100 && fido.altitude_sea < 1000) {\n        currentMilestone = \"LIFTOFF! We have clear liftoff. Tower is cleared!\";\n    } else if (fido.velocity_orbit > 7500 && fido.periapsis > 140000) {\n        currentMilestone = \"STABLE ORBIT ACHIEVED. Shutting down primary engines. Low Earth Orbit reached.\";\n    }\n\n    // 2. CONSTRUCT COMPACT FLIGHT DATA SUMMARY FOR CHAT AI\n    let textReport = `FLIGHT SUMMARY STATUS:\\n` +\n                     `- Altitude: ${fido.altitude_sea} meters\\n` +\n                     `- Orbital Velocity: ${fido.velocity_orbit} m/s\\n` +\n                     `- Apoapsis: ${fido.apoapsis} m / Periapsis: ${fido.periapsis} m\\n` +\n                     `- Current Engine Thrust: ${prop.thrust_current} kN\\n` +\n                     `- System G-Force Load: ${guido.g_force} Gs\\n` +\n                     `- Active Milestone: ${currentMilestone}`;\n\n    // Format exactly for your Ollama Chat payload expectations\n    msg.payload = textReport;\n    msg.vessel_name = \"Active Vessel\";\n    \n    return msg; msg; msg; \n}\nreturn null;",
        "outputs": 3,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 850,
        "y": 1620,
        "wires": [
            [
                "3ab4a8066fcd7635"
            ],
            [
                "3ab4a8066fcd7635"
            ],
            [
                "3ab4a8066fcd7635"
            ]
        ]
    },
    {
        "id": "83d465f337d78948",
        "type": "debug",
        "z": "ad10d15c1f99905b",
        "g": "ddf178ef316ee516",
        "name": "kRPC debug",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1090,
        "y": 1680,
        "wires": []
    },
    {
        "id": "e4533499e2629cce",
        "type": "catch",
        "z": "ad10d15c1f99905b",
        "g": "ddf178ef316ee516",
        "name": "Emergency Loop Catch",
        "scope": [
            "d4653b823a285fb6",
            "3ab4a8066fcd7635",
            "9667102243a1e742",
            "b57c2a5675f94b78",
            "83d465f337d78948",
            "4680e48a4eb429b0",
            "ab4f21d22479a768",
            "091e883b157905fd",
            "5df922bc36d2b7fe",
            "f2c83678622cb2ab",
            "9a010e6a3fae0375",
            "127c582e4d0c0801",
            "abb23deda621f781",
            "72fb251138237567",
            "e5d3e7ce19d78f5d"
        ],
        "uncaught": false,
        "x": 580,
        "y": 1660,
        "wires": [
            [
                "f2c83678622cb2ab"
            ]
        ]
    },
    {
        "id": "f2c83678622cb2ab",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "ddf178ef316ee516",
        "name": "kRPC Loop Matrix Evaluator",
        "func": "// Local Workspace Logic: Loop Matrix Evaluator\n// Targets evaluated: AI Phaser Sequences, Clean CFG Compiler, Ollama Generate, Save Game State Looper, Vessel Schematic Saver\n\nconst localcontext = node.context();\nlet stateMatrix = context.get(\"stateMatrix\") || {};\n\nif (!msg.error || !msg.error.source || !msg.error.source.name) {\n    node.status({ fill: \"yellow\", shape: \"ring\", text: \"Pass-through: No native error payload\" });\n    return [null, msg];\n}\n\n// Convert source name to match storage indexing criteria\nconst originNode = msg.error.source.name.trim().toLowerCase();\nconst monitoredTargets = [\n    \"telemetry rate limiter 1\",\n    \"telemetry rate limiter 2\",\n    \"telemetry rate limiter 3\",\n    \"voice to text translation matrix\",\n    \"capcom e:4\",\n    \"debug 6\",\n    \"krpc Connect\",\n    \"krpc Debug\",\n    \"krpc Engine\",\n    \"krpc orbit\",\n    \"krpc Stream ingest\",\n    \"parse kRPC JSON String\",\n    \"mission Phase Evaluator\",\n    \"\"\n\n\n    \n];\n\nif (monitoredTargets.includes(originNode)) {\n    if (!stateMatrix[originNode]) {\n        stateMatrix[originNode] = 0;\n    }\n    \n    stateMatrix[originNode]++;\n    context.set(\"stateMatrix\", stateMatrix);\n    \n    if (stateMatrix[originNode] > 5) {\n        msg.loop_overflow_tripped = true;\n        msg.loop_overflow_node = msg.error.source.name;\n        msg.loop_cycles_detected = stateMatrix[originNode];\n        \n        node.status({ \n            fill: \"red\", \n            shape: \"dot\", \n            text: `LOOP TRIPPED: ${msg.error.source.name} reached limit` \n        });\n        \n        // Purge memory slot for the failing component to prevent lockouts\n        stateMatrix[originNode] = 0;\n        context.set(\"stateMatrix\", stateMatrix);\n        \n        return [msg, null]; // Route out Pin 1 directly to debug 1\n    }\n}\n\nnode.status({ \n    fill: \"green\", \n    shape: \"ring\", \n    text: `${msg.error.source.name} failure caught. Cycle: ${stateMatrix[originNode] || 1}/5` \n});\n\nreturn [null, msg]; // Route out Pin 2 for parallel diagnostics\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 860,
        "y": 1680,
        "wires": [
            [
                "3ab4a8066fcd7635"
            ],
            [
                "83d465f337d78948"
            ]
        ]
    },
    {
        "id": "9667102243a1e742",
        "type": "debug",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "debug 6",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 2240,
        "y": 980,
        "wires": []
    },
    {
        "id": "2357817cbba98e69",
        "type": "catch",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "Emergency Loop Catch",
        "scope": [
            "d4653b823a285fb6",
            "3ab4a8066fcd7635",
            "v_backup_format_02",
            "e678abdc6aa62027",
            "c0c315601e722bdd",
            "213af190ee5a7d6d",
            "v_backup_comm_node_02"
        ],
        "uncaught": false,
        "x": 1760,
        "y": 920,
        "wires": [
            [
                "e678abdc6aa62027"
            ]
        ]
    },
    {
        "id": "e678abdc6aa62027",
        "type": "function",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "Loop Matrix Evaluator",
        "func": "// Local Workspace Logic: Loop Matrix Evaluator\n// Targets evaluated: AI Phaser Sequences, Clean CFG Compiler, Ollama Generate, Save Game State Looper, Vessel Schematic Saver\n\nconst localcontext = node.context();\nlet stateMatrix = context.get(\"stateMatrix\") || {};\n\nif (!msg.error || !msg.error.source || !msg.error.source.name) {\n    node.status({ fill: \"yellow\", shape: \"ring\", text: \"Pass-through: No native error payload\" });\n    return [null, msg];\n}\n\n// Convert source name to match storage indexing criteria\nconst originNode = msg.error.source.name.trim().toLowerCase();\nconst monitoredTargets = [\n    \"primary education core E:1\",\n    \"tier 2 hibernation pagefile matrix\",\n    \"format payload for backup core\",\n    \"valentina mission backup Communications\",\n    \"\",\n    \"\",\n    \"\",\n    \n    ];\n\nif (monitoredTargets.includes(originNode)) {\n    if (!stateMatrix[originNode]) {\n        stateMatrix[originNode] = 0;\n    }\n    \n    stateMatrix[originNode]++;\n    context.set(\"stateMatrix\", stateMatrix);\n    \n    if (stateMatrix[originNode] > 5) {\n        msg.loop_overflow_tripped = true;\n        msg.loop_overflow_node = msg.error.source.name;\n        msg.loop_cycles_detected = stateMatrix[originNode];\n        \n        node.status({ \n            fill: \"red\", \n            shape: \"dot\", \n            text: `LOOP TRIPPED: ${msg.error.source.name} reached limit` \n        });\n        \n        // Purge memory slot for the failing component to prevent lockouts\n        stateMatrix[originNode] = 0;\n        context.set(\"stateMatrix\", stateMatrix);\n        \n        return [msg, null]; // Route out Pin 1 directly to debug 1\n    }\n}\n\nnode.status({ \n    fill: \"green\", \n    shape: \"ring\", \n    text: `${msg.error.source.name} failure caught. Cycle: ${stateMatrix[originNode] || 1}/5` \n});\n\nreturn [msg,msg,]; // Route out Pin 2 for parallel diagnostics\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2000,
        "y": 980,
        "wires": [
            [
                "v_backup_format_02"
            ],
            [
                "9667102243a1e742"
            ]
        ]
    },
    {
        "id": "v_backup_format_02",
        "type": "change",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "format payload for backup core",
        "rules": [
            {
                "t": "set",
                "p": "model",
                "pt": "msg",
                "to": "qwen2.5:32b",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "system",
                "pt": "msg",
                "to": "System Role Configuration Matrix:You are Valentina Kerman—Veteran Orange-Suit Ace Pilot, Flight Engineer, and the active backup runtime communications engine. Primary communication core is experiencing an overload, a data surge, or hardware failure. Stand in as the auxiliary communication processor under badS=True parameter criteria: stay entirely unflappable, precise, objective, and deterministic.",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "prompt",
                "pt": "msg",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1210,
        "y": 980,
        "wires": [
            [
                "v_backup_comm_node_02",
                "3ab4a8066fcd7635"
            ]
        ]
    },
    {
        "id": "v_backup_comm_node_02",
        "type": "ollama-generate",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "Valentina Mission backup Communications",
        "server": "fc4bdbc050c880c3",
        "format": "",
        "model": "model",
        "modelType": "msg",
        "prompt": "prompt",
        "promptType": "msg",
        "suffix": "",
        "suffixType": "str",
        "system": "system",
        "systemType": "msg",
        "template": "",
        "templateType": "str",
        "raw": false,
        "images": "",
        "imagesType": "json",
        "stream": false,
        "think": false,
        "keepAlive": "24h",
        "keepAliveType": "str",
        "options": "",
        "x": 1610,
        "y": 980,
        "wires": [
            [
                "e678abdc6aa62027"
            ]
        ]
    },
    {
        "id": "04229705343af51c",
        "type": "websocket in",
        "z": "ad10d15c1f99905b",
        "g": "65328b009eda9d03",
        "name": "kRPC Fuel Gauge",
        "server": "5cd3c77c91e92f03",
        "client": "",
        "x": 150,
        "y": 1460,
        "wires": [
            [
                "e174e094de551cbc",
                "6a4e88cc533b7bfa"
            ]
        ]
    },
    {
        "id": "2512c73a1313959e",
        "type": "change",
        "z": "ad10d15c1f99905b",
        "g": "65328b009eda9d03",
        "name": "Fuel_Gauge",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "Fuel Level {{msg.vessel_name}} ",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 670,
        "y": 1460,
        "wires": [
            [
                "7fc8afda63c7a825",
                "33f4ca381fe3e3ce",
                "f2c83678622cb2ab"
            ]
        ]
    },
    {
        "id": "e174e094de551cbc",
        "type": "switch",
        "z": "ad10d15c1f99905b",
        "g": "65328b009eda9d03",
        "name": "Fuel_Gauge",
        "property": "Fuel_Gauge",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "100.5",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "50.5",
                "vt": "num"
            },
            {
                "t": "lte",
                "v": "10.5",
                "vt": "num"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": true,
        "outputs": 4,
        "x": 390,
        "y": 1440,
        "wires": [
            [
                "2512c73a1313959e"
            ],
            [
                "2512c73a1313959e"
            ],
            [
                "2512c73a1313959e"
            ],
            [
                "2512c73a1313959e"
            ]
        ]
    },
    {
        "id": "7fc8afda63c7a825",
        "type": "delay",
        "z": "ad10d15c1f99905b",
        "g": "65328b009eda9d03",
        "name": "Fuel_Levle Rate Limiter",
        "pauseType": "queue",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "2",
        "nbRateUnits": "2",
        "rateUnits": "minute",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 910,
        "y": 1420,
        "wires": [
            [
                "3ab4a8066fcd7635"
            ]
        ]
    },
    {
        "id": "33f4ca381fe3e3ce",
        "type": "delay",
        "z": "ad10d15c1f99905b",
        "g": "65328b009eda9d03",
        "name": "Fuel_Levle Rate Limiter Last 10%",
        "pauseType": "queue",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "2",
        "nbRateUnits": "3",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": true,
        "outputs": 1,
        "x": 940,
        "y": 1480,
        "wires": [
            [
                "3ab4a8066fcd7635"
            ]
        ]
    },
    {
        "id": "6a4e88cc533b7bfa",
        "type": "switch",
        "z": "ad10d15c1f99905b",
        "g": "65328b009eda9d03",
        "name": "Fuel_Gauge Low 10%",
        "property": "Fuel_Gauge",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "12.5",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "10.5",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "8.5",
                "vt": "str"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": true,
        "outputs": 4,
        "x": 420,
        "y": 1500,
        "wires": [
            [
                "2512c73a1313959e"
            ],
            [],
            [],
            [
                "2512c73a1313959e"
            ]
        ]
    },
    {
        "id": "16f42a4773941738",
        "type": "switch",
        "z": "ad10d15c1f99905b",
        "g": "65328b009eda9d03",
        "name": "orbital alignment",
        "property": "surface_speed",
        "propertyType": "msg",
        "rules": [
            {
                "t": "gt",
                "v": "80",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 760,
        "y": 1160,
        "wires": [
            [
                "3ab4a8066fcd7635"
            ]
        ]
    },
    {
        "id": "5a653df53043b624",
        "type": "switch",
        "z": "ad10d15c1f99905b",
        "g": "65328b009eda9d03",
        "name": "Velocity Gauge m/s",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "true"
            }
        ],
        "checkall": "true",
        "repair": true,
        "outputs": 1,
        "x": 430,
        "y": 1300,
        "wires": [
            [
                "72fb251138237567"
            ]
        ]
    },
    {
        "id": "e5cfb446f7f4a8ab",
        "type": "change",
        "z": "ad10d15c1f99905b",
        "g": "65328b009eda9d03",
        "name": "We have liftoff of ???",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "We have liftoff of the {{msg.vessel_name}}.",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 820,
        "y": 1240,
        "wires": [
            [
                "3ab4a8066fcd7635"
            ]
        ]
    },
    {
        "id": "0860058a2767427b",
        "type": "switch",
        "z": "ad10d15c1f99905b",
        "g": "65328b009eda9d03",
        "name": " altitude display  GATE",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "true"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 480,
        "y": 1220,
        "wires": [
            [
                "e5cfb446f7f4a8ab"
            ]
        ]
    },
    {
        "id": "krpc_txt_velocity_v2",
        "type": "ui-text",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "group": "",
        "order": 2,
        "width": "4",
        "height": "1",
        "name": "Velocity Display",
        "label": "VELOCITY:",
        "format": "{{msg.payload}} m/s",
        "layout": "row-left",
        "style": false,
        "font": "",
        "fontSize": "",
        "color": "#000000",
        "wrapText": false,
        "className": "",
        "value": "payload",
        "valueType": "msg",
        "x": 2220,
        "y": 1120,
        "wires": []
    },
    {
        "id": "krpc_txt_apoapsis_v2",
        "type": "ui-text",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "group": "",
        "order": 1,
        "width": "4",
        "height": "1",
        "name": "Apoapsis Display",
        "label": "APOAPSIS:",
        "format": "{{msg.payload}} m",
        "layout": "row-left",
        "style": false,
        "font": "",
        "fontSize": "",
        "color": "#000000",
        "wrapText": false,
        "className": "",
        "value": "payload",
        "valueType": "msg",
        "x": 2230,
        "y": 1160,
        "wires": []
    },
    {
        "id": "krpc_txt_altitude_v2",
        "type": "ui-text",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "group": "",
        "order": 1,
        "width": "4",
        "height": "1",
        "name": "Altitude Display",
        "label": "ALTITUDE:",
        "format": "{{msg.payload}} m",
        "layout": "row-spread",
        "style": false,
        "font": "",
        "fontSize": "",
        "color": "#000000",
        "wrapText": false,
        "className": "",
        "value": "payload",
        "valueType": "msg",
        "x": 2220,
        "y": 1200,
        "wires": []
    },
    {
        "id": "abb23deda621f781",
        "type": "delay",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "Altitude Display Rate Limiter ",
        "pauseType": "random",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "5",
        "rateUnits": "second",
        "randomFirst": "0",
        "randomLast": "10",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 420,
        "y": 1080,
        "wires": [
            [
                "944727cf902b082d",
                "85c70c92249b2b42"
            ]
        ]
    },
    {
        "id": "944727cf902b082d",
        "type": "switch",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": " altitude display  GATE",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "80",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 760,
        "y": 1080,
        "wires": [
            [
                "3ab4a8066fcd7635",
                "0f7831a6552e5f27"
            ]
        ]
    },
    {
        "id": "0f7831a6552e5f27",
        "type": "change",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "We have liftoff of ???",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "\"Tower Cleared \" & msg.vessel name & \" \" & $random([   \"and fighting the brutal Earth gravity well... MOAR BOOSTERS!\",   \"and hunting for the missing high-gain antenna. Hope it's not a flyby mission.\",   \"on its way to Low Earth Orbit... assuming the staging doesn't execute backwards.\",   \"and fighting through the thick atmosphere before the solar panels snap off.\",   \"aiming for a geostationary slot, but the orbital math is already looking dodgy.\",   \"with an alarming amount of structural wobble on the payload fairing.\",   \"and praying the solar panels weren't clipped inside the fuel tank.\",   \"heading out to establish a comms network... provided we actually packed batteries.\",   \"and on its way to appease the Real Solar System Kraken.\",   \"with twice as many thrusters as mathematically required for an Earth exit burn.\",   \"and executing a highly volatile ascent profile toward a lunar transfer orbit.\",   \"with Mission Control's finger glued to the 'Revert to Vehicle Assembly' button.\",   \"and transitioning smoothly into a state of aerodynamic panic over the Atlantic.\",   \"now safely past the point of a guaranteed budget refund.\",   \"with tiny structural parts already trailing behind it like a metallic breadcrumb trail.\",   \"aiming for Mars, but probably tracking toward an accidental, high-speed impact with Venus.\",   \"and initiating a complex asparagus staging sequence that would make Wernher von Kerman cry.\",   \"and preparing for a flawless satellite insertion... or a very expensive piece of space debris.\",   \"as Jebediah holds down the throttle with complete disregard for orbital mechanics.\",   \"and climbing fast... let's hope the tracking station can pick up the signal.\" ])",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1020,
        "y": 1080,
        "wires": [
            [
                "3ab4a8066fcd7635"
            ]
        ]
    },
    {
        "id": "85c70c92249b2b42",
        "type": "switch",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "tower cleared",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "lte",
                "v": "80",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 760,
        "y": 1040,
        "wires": [
            [
                "a3ef29c690f8b03d"
            ]
        ]
    },
    {
        "id": "a3ef29c690f8b03d",
        "type": "change",
        "z": "ad10d15c1f99905b",
        "g": "0623cd95eecd2b83",
        "name": "Tower Cleared",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "\"Tower Cleared \" & msg.vessel name & \" \" & $random([   \"and fighting the brutal Earth gravity well... MOAR BOOSTERS!\",   \"and hunting for the missing high-gain antenna. Hope it's not a flyby mission.\",   \"on its way to Low Earth Orbit... assuming the staging doesn't execute backwards.\",   \"and fighting through the thick atmosphere before the solar panels snap off.\",   \"aiming for a geostationary slot, but the orbital math is already looking dodgy.\",   \"with an alarming amount of structural wobble on the payload fairing.\",   \"and praying the solar panels weren't clipped inside the fuel tank.\",   \"heading out to establish a comms network... provided we actually packed batteries.\",   \"and on its way to appease the Real Solar System Kraken.\",   \"with twice as many thrusters as mathematically required for an Earth exit burn.\",   \"and executing a highly volatile ascent profile toward a lunar transfer orbit.\",   \"with Mission Control's finger glued to the 'Revert to Vehicle Assembly' button.\",   \"and transitioning smoothly into a state of aerodynamic panic over the Atlantic.\",   \"now safely past the point of a guaranteed budget refund.\",   \"with tiny structural parts already trailing behind it like a metallic breadcrumb trail.\",   \"aiming for Mars, but probably tracking toward an accidental, high-speed impact with Venus.\",   \"and initiating a complex asparagus staging sequence that would make Wernher von Kerman cry.\",   \"and preparing for a flawless satellite insertion... or a very expensive piece of space debris.\",   \"as Jebediah holds down the throttle with complete disregard for orbital mechanics.\",   \"and climbing fast... let's hope the tracking station can pick up the signal.\" ])",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 980,
        "y": 1040,
        "wires": [
            [
                "3ab4a8066fcd7635"
            ]
        ]
    },
    {
        "id": "krpc_ui_base_v2",
        "type": "ui-base",
        "name": "KSP Mission Control",
        "path": "/dashboard",
        "appIcon": "",
        "includeClientData": true,
        "acceptsClientConfig": [
            "ui-control",
            "ui-notification"
        ],
        "showPathInSidebar": false,
        "headerContent": "page",
        "titleBarStyle": "default",
        "showReconnectNotification": true,
        "notificationDisplayTime": 5,
        "showDisconnectNotification": true,
        "allowInstall": true
    },
    {
        "id": "fc4bdbc050c880c3",
        "type": "ollama-config-server",
        "host": "localhost",
        "port": 11434,
        "useCloud": false
    },
    {
        "id": "88072e1b5ee11be2",
        "type": "ollama-config-format",
        "name": "Ollama Format Config",
        "json": "{   \"type\": \"object\",   \"properties\": {     \"destination_route\": {       \"type\": \"string\",       \"enum\": [\"cfg_pipeline\", \"capcom_intercept\", \"repository_scour\", \"primary_baseline\"]     },     \"reasoning_rationale\": {       \"type\": \"string\"     }   },   \"required\": [\"destination_route\", \"reasoning_rationale\"] }"
    },
    {
        "id": "13582cc00a602dc7",
        "type": "ollama-config-options",
        "name": "Ollama Options Config",
        "json": "{   \"temperature\": 0.1,   \"num_ctx\": 16384,   \"num_predict\": 128,   \"system\": \"You are Valentina, the flight controller tracking a craft in 4-dimensional space. Analyze the kRPC stream using absolute X,Y,Z coordinates for spatial position, distance vectors for target closing rates, radar altitude for surface approach, and pitch/yaw/roll/time for rotational orientation. If the user says 'voice off', reply: [MUTE]. If 'quiet', reply: [QUIET]. If 'voice on', reply: [UNMUTE]. Keep flight status callouts to one crisp, precise sentence.\" }"
    },
    {
        "id": "7a714e5c8805e07e",
        "type": "ui-group",
        "name": "Group Name",
        "page": "",
        "width": 6,
        "height": 1,
        "order": -1,
        "showTitle": true,
        "className": "",
        "visible": "true",
        "disabled": "false",
        "groupType": "default",
        "tab": ""
    },
    {
        "id": "6d253aaa054fb9e9",
        "type": "websocket-listener",
        "path": "/strem",
        "wholemsg": "false"
    },
    {
        "id": "d703f0e3c9c61f9f",
        "type": "websocket-listener",
        "path": "/orbit",
        "wholemsg": "false"
    },
    {
        "id": "5cd3c77c91e92f03",
        "type": "websocket-listener",
        "path": "/engine",
        "wholemsg": "false"
    },
    {
        "id": "a496f6a907b9bbf1",
        "type": "global-config",
        "env": [],
        "modules": {
            "@flowfuse/node-red-dashboard": "1.34.0",
            "node-red-contrib-ollama": "0.6.2",
            "node-red-contrib-browser-utils": "0.0.11"
        }
    }
]