#!/bin/bash
export LC_ALL=C.UTF-8
python3 - <<'PY'
import json, sqlite3
c = sqlite3.connect('/tmp/n8n_exec.db')
row = c.execute("select name,nodes from workflow_entity where active=1").fetchone()
name, nodes_json = row[0], row[1]
nodes = json.loads(nodes_json)
print("workflow:", name)
for n in nodes:
    t = n.get('type','')
    if 'vectorStoreQdrant' in t or 'toolVectorStore' in t or t.endswith('agent'):
        print(f"\n=== {n.get('name')}  ({t})")
        print(json.dumps(n.get('parameters',{}), ensure_ascii=False, indent=1)[:1400])
        if n.get('typeVersion'):
            print("  typeVersion:", n['typeVersion'])
PY
