AGENT SKILL

memex:steward:dashboard

Launch a loopback-only, read-only HTTP dashboard over Memex — per-store summary, the federated index, knowledge communities, the code-navigation graph, and the agent registry, plus keyword search, a click-to-read content overlay, and an interactive 3D knowledge-graph view.

License 许可
MIT
所属仓库
nitekeeper/memex
最近更新
2026-09-22
Stars
★ 0
Forks
0

01 前言 Front Matter

name
memex:steward:dashboard
description
Launch a loopback-only, read-only HTTP dashboard over Memex — per-store summary, the federated index, knowledge communities, the code-navigation graph, and the agent registry, plus keyword search, a click-to-read content overlay, and an interactive 3D knowledge-graph view.

03 SKILL.md 正文

memex:steward:dashboard

A read-only observability surface the Data Steward exposes: it opens every registered store (plus the fixed-path code_graph.db) read-only, aggregates a cross-store summary, and serves a single self-contained HTML page over a loopback-only stdlib HTTP server. It writes to nothing, so it is not a Librarian write-path bypass (spec §6 / M3 govern document writes; this is pure read-side reporting).

When to use

  • The user asks to see / visualize / get an overview / dashboard of what is stored in Memex.
  • A quick health glance before/after a large ingest, audit, or release.
  • For a deep integrity audit (orphans, broken relations, schema drift) use memex:steward:audit instead — this skill is a friendly overview, not an integrity checker.

Inputs

  • --port — bind port (default 8765; auto-increments if busy, up to +20).
  • --host — bind host (default 127.0.0.1). Non-loopback hosts require --allow-non-local (the dashboard exposes your Memex contents).
  • --no-open — do not auto-open a browser (use in headless/SSH sessions).
  • --once — print the summary JSON to stdout and exit (no server). Use this for scripting, smoke checks, or when a browser is unavailable.

Invocation

The implementation is scripts/dashboard.py (stdlib only — http.server + sqlite3 + json; no third-party deps). Run it as a module with the plugin root on PYTHONPATH. <PLUGIN_ROOT> is the path resolved in memex:run Step 0.2.

Serve the dashboard (long-running — start it in the background and report the URL to the user; it prints Memex dashboard → http://127.0.0.1:<port>/):

PYTHONPATH="<PLUGIN_ROOT>" python3 -m scripts.dashboard --no-open --port 8765

Then tell the user to open the printed http://127.0.0.1:<port>/ URL. Stop it with Ctrl-C (or kill the background job).

One-shot JSON snapshot (no server — for a quick textual summary):

PYTHONPATH="<PLUGIN_ROOT>" python3 -m scripts.dashboard --once

Routes served

Route Returns
GET / the self-contained dashboard page (keyword search box + a ◉ 3D graph link). Deep links: ?q=<keyword> prefills+runs the search, ?doc=<index_id> opens a document.
GET /graph an interactive 3D knowledge-graph viewer (Obsidian-style) — documents as nodes, relations as edges, colored by community; orbit / zoom / search / click a node to open its content. Dependency-free vanilla JS + canvas (no Three.js/CDN, under the same CSP).
GET /api/summary the cross-store summary as JSON (recomputed live each request)
GET /api/graph the index knowledge graph as JSON {nodes, links, truncated} (read-only; dangling/self edges dropped; capped at 900 nodes)
GET /api/search?q= keyword search across three surfaces — documents (federated index, FTS5 + LIKE fallback), the agents registry (roles + agents by name/description/profile), and the code graph (node labels per repo) — each result carries a kind (document/agent/code); the UI groups by kind
GET /api/doc?id= detail for a clicked result, dispatched by id prefix: a bare index_id → document content from its source store; role:/agent: → a registry profile; code:<repo>|<node> → a code-graph node summary (location + callers/uses) → {title, subtitle, content, …}
GET /healthz {"ok":true} liveness probe

Both the dashboard search list and a 3D-graph node click open a shared, read-only content overlay. Document bodies render as Markdown via a dependency-free DOM builder (createElement/textContent, sanitized hrefs); raw/rendered toggle.

Safety contract

  • Read-only. Every store is opened with SQLite mode=ro; no write path.
  • Loopback by default. Binds 127.0.0.1; refuses a non-local bind without --allow-non-local.
  • No filesystem serving. Only the three fixed routes above respond; there is no static-file handler, so no path-traversal surface.
  • No untrusted templating. The page carries zero server-side interpolation; all data crosses as JSON and is rendered client-side via textContent, so a stored document title containing markup cannot become script (CSP also set).
  • Degrades gracefully. A missing store/table/column renders as empty rather than erroring — a freshly bootstrapped install (no code_graph.db) is fine.

04 同仓库更多 Skills

nitekeeper
nitekeeper/memex

run

Use to invoke any Memex v2.0 operation. Routes user-facing intents (ingest, ask, capture, lint, synthesize, dashboard) and agent-facing CRUD primitives to the right internal procedure.

★ 0
nitekeeper
nitekeeper/memex

memex:steward:reconcile-orphan

Authorized fix-up of a flagged orphan. Four actions — delete-index (remove documents row), repair (backfill row_id when target exists), reindex (re-run Librarian; deferred), note (acknowledge). Raises OrphanNotFoundError when index_id is unknown or, for repair, already linked.

★ 0
nitekeeper
nitekeeper/memex

memex:steward:audit

Run a full integrity audit across the Memex Index and all registered stores. Detects orphans, broken relations, schema drift. Writes a structured audit report to ~/.memex/audits/. Read-only — never auto-fixes.

★ 0
nitekeeper
nitekeeper/memex

memex:steward:audit-store

Run an integrity audit scoped to a single registered store (reverse orphans + schema drift). Lighter than full audit.

★ 0
nitekeeper
nitekeeper/memex

memex:index:write

Direct write to the federated Index — the lower-level primitive that memex:brain:ingest and memex:brain:capture build on. Use when a consumer (Atelier, custom plugin) needs to add a document to its own store and have it indexed by the Librarian, without going through the Brain layer. Routes through Librarian subagent + Memex Core.

★ 0
nitekeeper
nitekeeper/memex

memex:index:search

Federated search across every registered Memex store via the Reference Librarian. Lower-level primitive that memex:brain:ask builds on — use directly when a consumer (Atelier, custom plugin) needs raw query results without Brain-specific formatting.

★ 0