Skip to content

Commit cd946fc

Browse files
authored
feat: Interactive TUI mode with session persistence (v0.4.0-beta)
Major release with interactive TUI enhancements including session persistence, cancellation support, and real-time activity logging.
1 parent 9137e0b commit cd946fc

74 files changed

Lines changed: 8802 additions & 300 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,47 @@ jobs:
166166
env:
167167
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
168168

169+
publish-crates:
170+
name: Publish to crates.io
171+
needs: create-release
172+
runs-on: ubuntu-latest
173+
if: startsWith(github.ref, 'refs/tags/')
174+
175+
steps:
176+
- name: Checkout code
177+
uses: actions/checkout@v4
178+
179+
- name: Install Rust
180+
uses: dtolnay/rust-toolchain@stable
181+
182+
- name: Publish crates in dependency order
183+
env:
184+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
185+
run: |
186+
# Crates in dependency order (leaf dependencies first)
187+
CRATES=(
188+
"aof-core"
189+
"aof-mcp"
190+
"aof-llm"
191+
"aof-memory"
192+
"aof-tools"
193+
"aof-runtime"
194+
"aof-triggers"
195+
"aofctl"
196+
)
197+
198+
# Wait time between publishes to allow crates.io index to update
199+
WAIT_SECONDS=30
200+
201+
for crate in "${CRATES[@]}"; do
202+
echo "📦 Publishing $crate..."
203+
cargo publish -p "$crate" --no-verify || true
204+
echo "⏳ Waiting ${WAIT_SECONDS}s for crates.io index to update..."
205+
sleep $WAIT_SECONDS
206+
done
207+
208+
echo "✅ All crates published!"
209+
169210
deploy-install-script:
170211
name: Deploy install.sh to web
171212
needs: create-release

CHANGELOG.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,74 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.4.0-beta] - 2026-01-23
11+
12+
### Added
13+
- **Interactive TUI Mode** - Full-featured terminal user interface for agent conversations
14+
- Launch with `aofctl run agent <config.yaml>` (no `--input` flag)
15+
- Chat panel with syntax-highlighted conversation history
16+
- Activity log showing real-time agent events (thinking, analyzing, tool use, LLM calls)
17+
- Context gauge displaying token usage and execution time
18+
- Help overlay with keyboard shortcuts (press `?`)
19+
- LazyGit-inspired styling with clear visual hierarchy
20+
21+
- **Agent Cancellation** - Stop running agents with ESC key
22+
- Graceful cancellation using tokio CancellationToken
23+
- Clean abort of LLM calls and tool executions
24+
- Status indicator shows "Cancelling..." during abort
25+
26+
- **Session Persistence** - Conversation history saved automatically
27+
- Sessions stored in `~/.aof/sessions/<agent-name>/`
28+
- Includes complete message history, token usage, activity logs
29+
- JSON format for easy inspection and backup
30+
31+
- **Session Resume** - Continue previous conversations
32+
- `--resume` flag to continue latest session: `aofctl run agent config.yaml --resume`
33+
- `--session <id>` flag to resume specific session
34+
- Restored sessions show previous context to the agent
35+
36+
- **Session Management Commands**
37+
- `aofctl get sessions` - List all saved sessions across agents
38+
- `aofctl get sessions <agent>` - List sessions for specific agent
39+
- Output shows session ID, agent, model, message count, tokens, age
40+
- Supports `-o json` and `-o yaml` output formats
41+
42+
- **Activity Event System** - Real-time agent activity tracking
43+
- New `ActivityEvent` enum in aof-core with event types:
44+
- Thinking, Analyzing, LlmCall, ToolUse, ToolComplete, Warning, Error
45+
- `ActivitySender` for emitting events from runtime
46+
- `ActivityReceiver` for consuming events in TUI
47+
48+
### Changed
49+
- TUI keyboard shortcuts updated:
50+
- `ESC` now cancels running agent (was: do nothing)
51+
- `Ctrl+S` saves session manually
52+
- `Ctrl+L` clears chat and starts new session
53+
- `Shift+↑/↓` scrolls chat history
54+
- `PageUp/Down` scrolls 5 lines
55+
56+
### Documentation
57+
- Updated getting-started guide with interactive mode examples
58+
- Added TUI keyboard shortcuts to CLI reference
59+
- Added session management documentation
60+
- Updated aofctl reference with --resume and --session flags
61+
62+
## [0.3.2-beta] - 2026-01-02
63+
64+
### Added
65+
- Built-in command handler support via `agent: builtin` in trigger command bindings
66+
- Use `agent: builtin` for `/help`, `/agent`, `/fleet` to get interactive menus
67+
- Interactive menus include fleet/agent selection buttons (Telegram/Slack)
68+
- Keeps built-in UI handlers separate from LLM-routed commands
69+
- Stale message filtering for webhook handlers
70+
- Messages older than 60 seconds are silently dropped
71+
- Prevents processing of queued messages when daemon restarts
72+
- Configurable via `max_message_age_secs` in handler config
73+
- `cargo install aofctl` support via crates.io publishing
74+
- All AOF crates now published to crates.io
75+
- Automated publishing on tagged releases
76+
- New documentation: Built-in Commands Guide (`docs/guides/builtin-commands.md`)
77+
1078
### Fixed
1179
- `aofctl serve` now produces visible startup output
1280
- Changed from tracing (default level: error) to println for critical startup messages
@@ -16,6 +84,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1684
- Intermediate acknowledgment messages ("Thinking...", "Processing...") are skipped for Git platforms
1785
- Only the final response is posted, keeping PR threads clean
1886
- Slack/Telegram/Discord still show real-time progress indicators
87+
- Improved `library://` URI path resolution for agent library
1988

2089
## [0.3.1-beta] - 2025-12-26
2190

Cargo.toml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@ members = [
1515
]
1616

1717
[workspace.package]
18-
version = "0.3.1-beta"
18+
version = "0.4.0-beta"
1919
edition = "2021"
2020
rust-version = "1.75"
2121
license = "Apache-2.0"
22-
repository = "https://github.com/yourusername/aof"
23-
authors = ["Your Name <you@example.com>"]
22+
repository = "https://github.com/agenticdevops/aof"
23+
authors = ["Gourav Shah <gjs@opsflow.sh>"]
24+
keywords = ["ai", "agents", "llm", "devops", "kubernetes"]
25+
categories = ["command-line-utilities", "development-tools"]
26+
homepage = "https://aof.sh"
27+
documentation = "https://docs.aof.sh"
2428

2529
[workspace.dependencies]
2630
# Async runtime
@@ -72,14 +76,14 @@ rand = "0.8"
7276
# Regex
7377
regex = "1.10"
7478

75-
# Internal workspace dependencies
76-
aof-core = { path = "crates/aof-core" }
77-
aof-mcp = { path = "crates/aof-mcp" }
78-
aof-llm = { path = "crates/aof-llm" }
79-
aof-runtime = { path = "crates/aof-runtime" }
80-
aof-memory = { path = "crates/aof-memory" }
81-
aof-triggers = { path = "crates/aof-triggers" }
82-
aof-tools = { path = "crates/aof-tools" }
79+
# Internal workspace dependencies (path for local dev, version for crates.io)
80+
aof-core = { path = "crates/aof-core", version = "0.3.2-beta" }
81+
aof-mcp = { path = "crates/aof-mcp", version = "0.3.2-beta" }
82+
aof-llm = { path = "crates/aof-llm", version = "0.3.2-beta" }
83+
aof-runtime = { path = "crates/aof-runtime", version = "0.3.2-beta" }
84+
aof-memory = { path = "crates/aof-memory", version = "0.3.2-beta" }
85+
aof-triggers = { path = "crates/aof-triggers", version = "0.3.2-beta" }
86+
aof-tools = { path = "crates/aof-tools", version = "0.3.2-beta" }
8387

8488
# File utilities
8589
glob = "0.3"

ROADMAP.md

Lines changed: 93 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ AOF is designed as a **modular, pluggable framework** where components are reusa
1919
│ │ WhatsApp │ │ Agent │ │ Discord │ │
2020
│ │ Telegram │ │ Conditional │ │ HTTP │ │
2121
│ │ GitHub │ │ Parallel │ │ Email │ │
22-
│ │ HTTP │ │ Join │ │ File │ │
23-
│ │ Schedule │ │ Wait │ │ ... │ │
24-
│ │ PagerDuty │ │ Approval │ └────────────┘ │
25-
│ │ Kafka │ │ Loop │ │
26-
│ │ ... │ │ ... │ │
22+
│ │ Jira │ │ Join │ │ File │ │
23+
│ │ HTTP │ │ Wait │ │ ... │ │
24+
│ │ Schedule │ │ Approval │ └────────────┘ │
25+
│ │ PagerDuty │ │ Loop │ │
26+
│ │ Opsgenie │ │ ... │ │
2727
│ └─────────────┘ └──────────────┘ │
2828
│ │
2929
│ AGENTS MEMORY TOOLS │
@@ -33,6 +33,8 @@ AOF is designed as a **modular, pluggable framework** where components are reusa
3333
│ │ Context │ │ SQLite │ │ FileSystem │ │
3434
│ │ Tools │ │ Redis │ │ MCP │ │
3535
│ └─────────────┘ └──────────────┘ │ kubectl │ │
36+
│ │ Grafana │ │
37+
│ │ Datadog │ │
3638
│ └────────────┘ │
3739
├─────────────────────────────────────────────────────────────────┤
3840
│ ORCHESTRATION │
@@ -72,7 +74,7 @@ trait NodeExecutor {
7274

7375
---
7476

75-
## Current Release: v0.1.15
77+
## Current Release: v0.3.2-beta
7678

7779
### Implemented Features
7880

@@ -85,21 +87,41 @@ trait NodeExecutor {
8587
| Built-in tools (Shell, HTTP, FileSystem) | ✅ Complete | |
8688
| AgentFleet multi-agent coordination | ✅ Complete | |
8789
| AgentFlow workflow orchestration | ✅ Complete | v1 schema with nodes/connections |
90+
| Agent Library (30 pre-built agents) | ✅ Complete | K8s, Observability, Incident, CI/CD, Security, Cloud |
8891

8992
#### Trigger Types
90-
| Trigger | Status | Priority | Notes |
91-
|---------|--------|----------|-------|
92-
| Slack | ✅ Complete | - | app_mention, message, slash_command |
93-
| HTTP/Webhook | ✅ Complete | - | POST/GET with variable access |
94-
| Schedule (Cron) | ✅ Complete | - | With timezone support |
95-
| Manual (CLI) | ✅ Complete | - | `aofctl run` |
96-
| Discord | ⚠️ Partial | P2 | message_create events only |
97-
| Telegram | 🔄 Planned | P1 | [Issue #24](https://github.com/agenticdevops/aof/issues/24) |
98-
| WhatsApp | 🔄 Planned | P1 | [Issue #23](https://github.com/agenticdevops/aof/issues/23) |
99-
| GitHub | 🔄 Planned | P1 | [Issue #25](https://github.com/agenticdevops/aof/issues/25) |
100-
| PagerDuty | 🔄 Planned | P3 | [Issue #26](https://github.com/agenticdevops/aof/issues/26) |
101-
| Kafka | 🔄 Planned | P3 | Issue TBD |
102-
| SQS | 🔄 Planned | P3 | Issue TBD |
93+
| Trigger | Status | Notes |
94+
|---------|--------|-------|
95+
| Slack | ✅ Complete | app_mention, message, slash_command |
96+
| HTTP/Webhook | ✅ Complete | POST/GET with variable access |
97+
| Schedule (Cron) | ✅ Complete | With timezone support |
98+
| Manual (CLI) | ✅ Complete | `aofctl run` |
99+
| Telegram | ✅ Complete | Messages, inline keyboards |
100+
| WhatsApp | ✅ Complete | Messages, interactive buttons |
101+
| GitHub | ✅ Complete | PR, Issues, Push, Reviews |
102+
| Jira | ✅ Complete | Issues, Comments, Automation webhooks |
103+
| GitLab | ✅ Complete | MR, Issues, Push |
104+
| Bitbucket | ✅ Complete | PR, Push |
105+
| PagerDuty | ✅ Complete | Incidents, alerts |
106+
| Opsgenie | ✅ Complete | Alerts, on-call |
107+
| Discord | ⚠️ Partial | message_create events only |
108+
| ServiceNow | 🔄 Planned | [Issue #48] |
109+
| Kafka | 🔄 Planned | Event streaming |
110+
| SQS | 🔄 Planned | AWS queue integration |
111+
112+
#### Tools
113+
| Tool | Status | Notes |
114+
|------|--------|-------|
115+
| Shell | ✅ Complete | Command execution |
116+
| HTTP | ✅ Complete | REST API calls |
117+
| FileSystem | ✅ Complete | File operations |
118+
| MCP | ✅ Complete | Model Context Protocol |
119+
| Grafana | ✅ Complete | Dashboards, alerts |
120+
| Datadog | ✅ Complete | Metrics, monitors |
121+
| Prometheus | ✅ Complete | Metrics queries |
122+
| Loki | ⚠️ Partial | Basic log queries |
123+
| Jaeger | 🔄 Planned | [Issue #50] |
124+
| Jenkins | 🔄 Planned | [Issue #55] |
103125

104126
#### Node Types (AgentFlow)
105127
| Node | Status | Notes |
@@ -125,35 +147,41 @@ trait NodeExecutor {
125147
| Bot self-approval prevention | ✅ Complete | Auto-detects bot_user_id |
126148
| Conversation memory | ✅ Complete | Per-channel/thread isolation |
127149
| Multi-tenant routing | ✅ Complete | FlowRouter with priorities |
150+
| Built-in commands | ✅ Complete | /help, /agent, /fleet menus |
151+
| Stale message filtering | ✅ Complete | Drops old queued messages |
128152
| Config hot-reload | 🔄 Planned | [Issue #22] |
129153

130154
---
131155

132156
## Roadmap by Priority
133157

134-
### P0 - Critical (Current Sprint)
158+
### P0 - Current Focus (v0.3.3)
135159
- [x] Slack approval workflow
136160
- [x] Conversation memory
137161
- [x] Multi-tenant routing
138-
- [ ] Fix/organize flow examples
139-
140-
### P1 - High Priority (Individual Users)
141-
- [ ] **WhatsApp trigger** - Interactive buttons for approval
142-
- [ ] **Telegram trigger** - Inline keyboards for bots
143-
- [ ] **GitHub trigger** - PR/Issue webhooks
144-
- [ ] Tutorial documentation for individual users
145-
146-
### P2 - Medium Priority
147-
- [ ] Discord full implementation
148-
- [ ] Loop node for batch operations
149-
- [ ] HTTP node full implementation
150-
- [ ] State persistence (checkpointing)
151-
152-
### P3 - Lower Priority (Enterprise/SRE)
153-
- [ ] PagerDuty trigger
162+
- [x] GitHub/Jira triggers
163+
- [ ] **Structured I/O Schemas** - Standardize agent outputs ([#74], [#75], [#76])
164+
- [ ] **MCP Server Catalog** - Document available integrations ([#71])
165+
166+
### P1 - Developer Experience
167+
- [ ] Structured output schemas for agents
168+
- [ ] MCP server catalog documentation
169+
- [ ] More real-world flow examples
170+
- [ ] Improved error messages (serde_path_to_error)
171+
172+
### P2 - Enterprise Features
173+
- [ ] **Horizontal scaling** - Redis/NATS message queue ([#47])
174+
- [ ] **Multi-org support** - Per-org credentials ([#46])
175+
- [ ] **Config hot-reload** - No restart updates ([#22])
176+
- [ ] **ServiceNow trigger** - Enterprise ITSM ([#48])
177+
178+
### P3 - Additional Integrations
154179
- [ ] Kafka trigger
155180
- [ ] SQS trigger
156-
- [ ] AgentFleet integration in flows (v1alpha1 syntax)
181+
- [ ] Jaeger tool ([#50])
182+
- [ ] Jenkins tool ([#55])
183+
- [ ] Loki enhancement ([#49])
184+
- [ ] Loop node for batch operations
157185

158186
---
159187

@@ -205,32 +233,44 @@ spec:
205233
| `multi-tenant/slack-prod-k8s-bot.yaml` | Slack | Channel filtering |
206234
| `multi-tenant/slack-staging-k8s-bot.yaml` | Slack | Environment context |
207235
| `multi-tenant/slack-dev-local-bot.yaml` | Slack | Local development |
236+
| `flows/github/pr-review-flow.yaml` | GitHub | PR review automation |
237+
| `flows/github/issue-triage-flow.yaml` | GitHub | Issue labeling |
208238

209-
### Planned Examples (v1alpha1 schema)
210-
These examples demonstrate future syntax and require additional implementation:
211-
239+
### Planned Examples
212240
| Example | Requires | Status |
213241
|---------|----------|--------|
214-
| `planned/incident-auto-remediation-flow.yaml` | PagerDuty, Fleet | Planned |
215-
| `planned/pr-review-flow.yaml` | GitHub, Fleet | Planned |
216-
| `planned/daily-standup-report-flow.yaml` | Cron, Fleet, Jira | Planned |
217-
| `planned/slack-qa-bot-flow.yaml` | Inline agent spec | Planned |
218-
| `planned/cost-optimization-flow.yaml` | Schedule, Fleet | Planned |
219-
| `planned/deploy-notification-flow.yaml` | GitHub, Fleet | Planned |
242+
| `incident-auto-remediation-flow.yaml` | PagerDuty, Fleet | Planned |
243+
| `daily-standup-report-flow.yaml` | Cron, Fleet, Jira | Planned |
244+
| `cost-optimization-flow.yaml` | Schedule, Fleet | Planned |
220245

221246
---
222247

223248
## GitHub Issues
224249

225250
Track progress on GitHub: https://github.com/agenticdevops/aof/issues
226251

227-
| Issue | Title | Priority | Labels |
228-
|-------|-------|----------|--------|
229-
| [#22](https://github.com/agenticdevops/aof/issues/22) | Config hot-reload | P2 | enhancement |
230-
| [#23](https://github.com/agenticdevops/aof/issues/23) | WhatsApp trigger support | P1 | enhancement |
231-
| [#24](https://github.com/agenticdevops/aof/issues/24) | Telegram trigger support | P1 | enhancement |
232-
| [#25](https://github.com/agenticdevops/aof/issues/25) | GitHub webhook trigger | P1 | enhancement |
233-
| [#26](https://github.com/agenticdevops/aof/issues/26) | PagerDuty trigger | P3 | enhancement |
252+
### Open Issues
253+
| Issue | Title | Priority |
254+
|-------|-------|----------|
255+
| [#22](https://github.com/agenticdevops/aof/issues/22) | Config hot-reload | P2 |
256+
| [#46](https://github.com/agenticdevops/aof/issues/46) | Multi-org support | P1 |
257+
| [#47](https://github.com/agenticdevops/aof/issues/47) | Horizontal scaling | P1 |
258+
| [#48](https://github.com/agenticdevops/aof/issues/48) | ServiceNow trigger | P2 |
259+
| [#49](https://github.com/agenticdevops/aof/issues/49) | Loki enhancement | P1 |
260+
| [#50](https://github.com/agenticdevops/aof/issues/50) | Jaeger tool | P2 |
261+
| [#55](https://github.com/agenticdevops/aof/issues/55) | Jenkins tool | P2 |
262+
| [#71](https://github.com/agenticdevops/aof/issues/71) | MCP Server Catalog | P0 |
263+
| [#74](https://github.com/agenticdevops/aof/issues/74) | Structured I/O | P0 |
264+
265+
### Recently Closed
266+
| Issue | Title | Release |
267+
|-------|-------|---------|
268+
| [#78](https://github.com/agenticdevops/aof/issues/78) | Grafana tool | v0.3.0 |
269+
| [#79](https://github.com/agenticdevops/aof/issues/79) | PagerDuty trigger | v0.3.0 |
270+
| [#80](https://github.com/agenticdevops/aof/issues/80) | Datadog tool | v0.3.0 |
271+
| [#81](https://github.com/agenticdevops/aof/issues/81) | Incident agents | v0.3.0 |
272+
| [#82](https://github.com/agenticdevops/aof/issues/82) | Opsgenie trigger | v0.3.0 |
273+
| [#98](https://github.com/agenticdevops/aof/issues/98) | Jira Automation | v0.3.3 |
234274

235275
---
236276

0 commit comments

Comments
 (0)