[#54] Plugin introspection CLI + web visualization #56

Closed
nazim wants to merge 19 commits from nazim/cobot:feature/plugin-inspect-viz into main
Contributor

Closes #54

Builds on #48 (web admin). Adds:

  • cobot plugins inspect CLI (JSON/Mermaid/DOT/table)
  • D3.js force-directed plugin graph in web admin at /plugins
  • Interactive: click nodes, filter by layer/edge type

Based on feat/web-admin branch.

Closes #54 Builds on #48 (web admin). Adds: - `cobot plugins inspect` CLI (JSON/Mermaid/DOT/table) - D3.js force-directed plugin graph in web admin at /plugins - Interactive: click nodes, filter by layer/edge type Based on feat/web-admin branch.
Plugin-contributed admin dashboard using Starlette + HTMX + Jinja2.

Base class additions:
- web_panels() → dashboard cards (structured data, framework renders)
- web_settings() → config UI declarations
- web_routes() → custom API endpoints (auto-namespaced)

Data types: WebPanel, WebSetting, WebRoute

Web plugin (cobot/plugins/web/):
- Starlette app as loop plugin (runs alongside main loop)
- Collects contributions from all plugins on start
- Dashboard page with HTMX auto-refresh panels
- Settings page with generated forms
- Panel content rendered as HTML fragments (kv, table, log, markdown)
- Pico.css for styling, ~14KB HTMX, zero build step

Plugin contributions (3 plugins wired up):
- logger: live log stream panel + log level setting
- ppq: LLM status panel (model, API key, base URL) + settings
- communication: channel status table

Config: web.enabled, web.host (default 127.0.0.1), web.port (default 8080)
Dependencies: starlette, uvicorn, jinja2 (optional — graceful fallback)
Tests cover:
- Dashboard: page load, nav, category headers, KV/table/log/markdown panels, dark theme
- Settings: page load, grouped by plugin, number/bool/select/secret inputs, help text, restart warnings
- API: panels list, panel content (all kinds), error handling, 404, settings list/save, custom routes
- Navigation: dashboard <-> settings
- Edge case: empty dashboard/settings with no plugin contributions

Uses mock plugins contributing panels, settings, and custom routes.
Requires: starlette, jinja2, uvicorn, playwright, pytest-playwright
- Missing deps: '⚠️ Not starting — starlette not installed'
- Success: '🌐 Admin dashboard ready at http://...'
- Include uvicorn in the starlette error hint
_collect_contributions() now falls back to get_registry() if _registry
wasn't explicitly set (e.g. in tests). Fixes AttributeError on cobot run.
- Add .gitkeep to static/ so git tracks the empty directory
- Make static mount conditional (skip if dir doesn't exist)
The web plugin declared 'loop' capability but run() was never called —
the main agent loop doesn't dispatch loop plugins yet (needs PR #34).

Fix: add start_background() method that creates a background asyncio task,
and call it from agent.run_loop() for all loop-capable plugins.

This is a bridge until the loop plugin architecture is merged.
rebase: clean up after loop plugin merge
Some checks failed
CI / test (3.11) (pull_request) Failing after 11s
CI / lint (pull_request) Successful in 9s
CI / test (3.12) (pull_request) Failing after 14s
CI / test (3.13) (pull_request) Failing after 14s
CI / build (pull_request) Has been skipped
E2E Tests / e2e (pull_request) Successful in 9s
b0f04e4d06
- Restore agent.py from main (loop architecture handles web plugin)
- Remove start_background() bridge (no longer needed)
- Remove _server_task (run() is called by asyncio.gather)
fix: start loop plugins (web admin) in stdin mode too
Some checks failed
CI / test (3.11) (pull_request) Failing after 12s
CI / lint (pull_request) Successful in 9s
CI / test (3.12) (pull_request) Failing after 14s
CI / test (3.13) (pull_request) Failing after 13s
CI / build (pull_request) Has been skipped
E2E Tests / e2e (pull_request) Successful in 9s
064aa2e7db
run_stdin only talked to the first loop plugin. Now all other
loop-capable plugins (like web admin) run as background tasks,
so the dashboard is available in both --stdin and normal mode.
fix: cli.py calls run_loop_sync but agent.py has run_sync
Some checks failed
CI / test (3.11) (pull_request) Failing after 11s
CI / lint (pull_request) Successful in 9s
CI / test (3.12) (pull_request) Failing after 14s
CI / test (3.13) (pull_request) Failing after 14s
CI / build (pull_request) Has been skipped
E2E Tests / e2e (pull_request) Successful in 9s
4d1ef873eb
Also fixes stdin mode — both modes now start all loop plugins.
ui: sidebar layout + per-plugin settings navigation
Some checks failed
CI / test (3.11) (pull_request) Failing after 12s
CI / lint (pull_request) Successful in 10s
CI / test (3.12) (pull_request) Failing after 14s
CI / test (3.13) (pull_request) Failing after 14s
CI / build (pull_request) Has been skipped
E2E Tests / e2e (pull_request) Successful in 9s
edddc686c1
- Replace top nav with persistent left sidebar (220px)
- Dashboard and Settings as prominent sidebar links with icons
- Settings page: plugin list in sidebar, click to show only that plugin
- Auto-selects first plugin when visiting /settings
- URL-addressable: /settings/mock-table shows only mock-table settings
- Added 2 new Playwright tests (plugin navigation, sidebar visible)
- Updated existing tests for new layout (36 total e2e tests)
feat: add logo + web panels for wallet/nostr/tools/security/knowledge/config plugins
Some checks failed
CI / test (3.11) (pull_request) Failing after 12s
CI / lint (pull_request) Failing after 9s
CI / test (3.12) (pull_request) Failing after 14s
CI / test (3.13) (pull_request) Failing after 14s
CI / build (pull_request) Has been skipped
E2E Tests / e2e (pull_request) Successful in 9s
dd3edda3c7
style: match dashboard background to logo (#0d0f14)
Some checks failed
CI / test (3.11) (pull_request) Failing after 11s
CI / lint (pull_request) Failing after 9s
CI / test (3.12) (pull_request) Failing after 14s
CI / test (3.13) (pull_request) Failing after 14s
CI / build (pull_request) Has been skipped
E2E Tests / e2e (pull_request) Successful in 9s
5bb73eeaa0
fix: skip playwright e2e tests when playwright not installed
Some checks failed
CI / lint (pull_request) Failing after 9s
CI / test (3.11) (pull_request) Successful in 20s
CI / test (3.12) (pull_request) Successful in 22s
E2E Tests / e2e (pull_request) Successful in 11s
CI / test (3.13) (pull_request) Successful in 23s
CI / build (pull_request) Has been skipped
5784d09872
style: ruff format new web panel methods
All checks were successful
CI / lint (pull_request) Successful in 10s
CI / test (3.11) (pull_request) Successful in 20s
CI / test (3.12) (pull_request) Successful in 21s
E2E Tests / e2e (pull_request) Successful in 10s
CI / test (3.13) (pull_request) Successful in 22s
CI / build (pull_request) Successful in 7s
4dceff2db6
feat: add CLI commands for wallet, nostr, and tools plugins
All checks were successful
CI / lint (pull_request) Successful in 10s
CI / test (3.11) (pull_request) Successful in 21s
CI / test (3.12) (pull_request) Successful in 23s
E2E Tests / e2e (pull_request) Successful in 10s
CI / test (3.13) (pull_request) Successful in 23s
CI / build (pull_request) Successful in 7s
1a68c69a93
wallet: balance, address, pay
nostr: identity, relays, dm, inbox
tools: list, run
[#54] Add D3.js plugin graph visualization to web admin
Some checks failed
CI / lint (pull_request) Failing after 8s
CI / test (3.11) (pull_request) Successful in 20s
CI / test (3.12) (pull_request) Successful in 23s
E2E Tests / e2e (pull_request) Successful in 11s
CI / test (3.13) (pull_request) Successful in 22s
CI / build (pull_request) Has been skipped
f0c50a69d5
[#54] Continuous priority color spectrum + simulation-based filtering
Some checks failed
CI / lint (pull_request) Failing after 8s
CI / test (3.11) (pull_request) Successful in 23s
CI / test (3.12) (pull_request) Successful in 26s
CI / test (3.13) (pull_request) Successful in 23s
CI / build (pull_request) Has been skipped
E2E Tests / e2e (pull_request) Successful in 11s
fd3126f0b7
[#54] Add plugin filter language: -config -logger, +telegram +nostr, or search
Some checks failed
CI / lint (pull_request) Failing after 8s
CI / test (3.11) (pull_request) Successful in 20s
CI / test (3.12) (pull_request) Successful in 21s
E2E Tests / e2e (pull_request) Successful in 10s
CI / test (3.13) (pull_request) Successful in 22s
CI / build (pull_request) Has been skipped
81d9d3b5c3
nazim closed this pull request 2026-02-22 11:50:21 +00:00
Some checks failed
CI / lint (pull_request) Failing after 8s
CI / test (3.11) (pull_request) Successful in 20s
CI / test (3.12) (pull_request) Successful in 21s
E2E Tests / e2e (pull_request) Successful in 10s
CI / test (3.13) (pull_request) Successful in 22s
CI / build (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ultanio/cobot!56
No description provided.