Help us shape the future of Go! Take the 2026 Go Developer Survey

ui

package
v2.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package ui delivers the recall graph as an MCP App (SEP-1865): a tool that renders an interactive d3-force doc/code graph inline in MCP hosts, plus the same page served at GET /ui for browser/debug use.

The app is fully self-contained and OFFLINE — d3 and the @modelcontextprotocol /ext-apps SDK are vendored under assets/ and INLINED into the single HTML document at serve time, so it works inside a sandboxed iframe with no network and no CDN. The same inlined document is what GET /ui returns for browsers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler() http.Handler

Handler serves the app for BROWSER/debug mode: GET /ui returns the inlined, self-contained page (works without the MCP bridge — it falls back to fetching /graph and /node on this same origin). The vendored libs are also served as separate files for completeness, though the inlined page needs no extra fetch.

func Register

func Register(s *server.MCPServer, g *graph.Graph)

Register wires the MCP App onto an existing MCPServer: the ui:// resource, the show_code_graph tool that renders it, and the code_graph_data tool the inline app calls over the bridge to load the graph dump.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL