agentic-flow 2.0.1-alpha.68 → 2.0.1-alpha.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,71 @@
1
+ #!/bin/bash
2
+ # Agentic Flow Intelligence Status Line
3
+ # Shows real-time learning metrics from SONA + HNSW + ReasoningBank
4
+
5
+ INTEL_FILE=".agentic-flow/intelligence.json"
6
+ INTEL_DB=".agentic-flow/intelligence.db"
7
+
8
+ # Default values
9
+ PATTERNS=0
10
+ MEMORIES=0
11
+ ROUTES=0
12
+ TRAJECTORIES=0
13
+ LEARNING_RATE=10
14
+ EPSILON=10
15
+
16
+ # Get current git branch
17
+ GIT_BRANCH=""
18
+ if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
19
+ GIT_BRANCH=$(git branch --show-current 2>/dev/null || echo "")
20
+ fi
21
+
22
+ # Read intelligence metrics
23
+ if [ -f "$INTEL_FILE" ]; then
24
+ PATTERNS=$(jq -r '.patterns | length // 0' "$INTEL_FILE" 2>/dev/null || echo "0")
25
+ MEMORIES=$(jq -r '.memories | length // 0' "$INTEL_FILE" 2>/dev/null || echo "0")
26
+ ROUTES=$(jq -r '.metrics.totalRoutes // 0' "$INTEL_FILE" 2>/dev/null || echo "0")
27
+ TRAJECTORIES=$(jq -r '.trajectories | length // 0' "$INTEL_FILE" 2>/dev/null || echo "0")
28
+
29
+ # Get learning parameters
30
+ LR=$(jq -r '.config.learningRate // 0.1' "$INTEL_FILE" 2>/dev/null || echo "0.1")
31
+ EPS=$(jq -r '.config.epsilon // 0.1' "$INTEL_FILE" 2>/dev/null || echo "0.1")
32
+ [ -z "$LR" ] || [ "$LR" = "null" ] && LR="0.1"
33
+ [ -z "$EPS" ] || [ "$EPS" = "null" ] && EPS="0.1"
34
+ LEARNING_RATE=$(awk "BEGIN {printf \"%.0f\", $LR * 100}" 2>/dev/null || echo "10")
35
+ EPSILON=$(awk "BEGIN {printf \"%.0f\", $EPS * 100}" 2>/dev/null || echo "10")
36
+
37
+ # Get active count
38
+ ACTIVE=$(jq -r '[.trajectories // {} | to_entries[] | select(.value.status == "active")] | length' "$INTEL_FILE" 2>/dev/null || echo "0")
39
+ fi
40
+
41
+ # Attention mechanism status (check which are enabled)
42
+ NEURAL="●Neural"
43
+ DAG="◐DAG"
44
+ GRAPH="○Graph"
45
+ SSM="●SSM"
46
+
47
+ # Check DB for vector count
48
+ VECTOR_COUNT=0
49
+ if [ -f "$INTEL_DB" ]; then
50
+ VECTOR_COUNT=$(sqlite3 "$INTEL_DB" "SELECT COUNT(*) FROM vectors;" 2>/dev/null || echo "0")
51
+ fi
52
+
53
+ # Build output
54
+ OUTPUT=""
55
+
56
+ # Line 1: Model + Project + Branch
57
+ OUTPUT="Opus 4.5 in agentic-flow"
58
+ if [ -n "$GIT_BRANCH" ]; then
59
+ OUTPUT="${OUTPUT} on ⎇ ${GIT_BRANCH}"
60
+ fi
61
+
62
+ # Line 2: Agentic Flow metrics
63
+ OUTPUT="${OUTPUT}\n🧠 Agentic Flow ◆ ${PATTERNS} patterns ⬡ ${MEMORIES} mem ↝${ROUTES} #${TRAJECTORIES}"
64
+
65
+ # Line 3: Agent routing/learning metrics
66
+ OUTPUT="${OUTPUT}\n🎯 Agent Routing q-learning lr:${LEARNING_RATE}% ε:${EPSILON}%"
67
+
68
+ # Line 4: Swarm coordination mechanisms
69
+ OUTPUT="${OUTPUT}\n⚡ Swarm: ●Neural ◐DAG ○Graph ●SSM"
70
+
71
+ printf "%b\n" "$OUTPUT"