devtools

package
v0.1.0-develop.2026061... Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package devtools provides framework-internal HTTP routes that expose project catalog metadata (cells, slices, contracts, journeys, assemblies, actors) plus optional cell-level and package-level dependency graphs to admin-authenticated clients.

The catalog endpoint is wired by bootstrap during phase5 alongside the health probes; it is NOT a Cell-owned route and intentionally has no contract.yaml — same precedent as runtime/http/health. The "http.framework.devtools." spec ID prefix marks it as runtime-internal, distinguishing it from cell-owned routes.

Wire format note: catalog responses use the Backstage Catalog Entity envelope at top level (apiVersion/kind/metadata/spec). They do NOT wrap in {"data": ...} per api-versioning.md — that envelope rule applies to cell-owned business routes; framework-internal routes (this package + runtime/http/health) follow their own wire formats.

Roadmap reference: docs/plans/202605011500-029-master-roadmap.md

  • Track J · DevTools Platform (J1 PR-A37 + J2 absorb)

ref: backstage/backstage packages/catalog-model wire format

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RouteGroup

func RouteGroup(h *Handler) cell.RouteGroup

RouteGroup returns the cell.RouteGroup that bootstrap mounts on PrimaryListener. CellID is set to "_devtools" so that metrics cell label for this endpoint falls into the devtools sentinel bucket rather than "_runtime", enabling audit attribution in dashboards and CI.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler serves the devtools catalog HTTP endpoint.

func NewHandler

func NewHandler(
	project *metadata.ProjectMeta,
	cellGraph *catalog.CellDepGraph,
	pkgGraph *kerneldepgraph.Graph,
	root string,
	clk clock.Clock,
	wireSummaries ...[]metadata.CellWireSummary,
) *Handler

NewHandler constructs a Handler. cellGraph may be nil (omits cell dep graph). pkgGraph may be nil; when nil the package-deps block is omitted from output. pkgGraph is the build-time generated graph from cmd/corebundle/catalog_gen.go. wireSummaries may be nil; when nil the wireSummary field on Cell entities is omitted from the response. Production callers supply summaries derived from markergen.Merge via BuildCellWireSummaries; nil is safe for environments where cell.go markers are absent.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles GET /api/v1/devtools/catalog.

Jump to

Keyboard shortcuts

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