devui

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package devui is the dev UI of aicoded dev: its pages, behind a front that lets in only the browser that opened the login link aicoded dev printed.

Index

Constants

View Source
const LoginPath = "/_aicoded/login"

LoginPath is the path of the login link: LoginPath?token=<token>.

Variables

This section is empty.

Functions

func New

func New(b deps.Backend, token, executable string, out io.Writer) http.Handler

New returns the dev UI over b, for the access token token and the aicoded at executable. Its login link, LoginPath?token=<token>, gives the browser a cookie that holds a MAC of the token; any other request without that cookie is refused with E-DEV-019. It also serves the HTML part of a caught mail at /_aicoded/mail/<app>/<id>, which can run and load nothing. A page that panics answers 500 with a plain page, and the panic's value and stack go to out, the terminal. token must be 64 lowercase hex characters.

The dev UI accepts any Host, so the caller must pass it only requests whose Host it checked, as the gateway does: localhost on its own port, which stops DNS rebinding.

func ValidToken

func ValidToken(s string) bool

ValidToken reports whether s has the form of an access token: 64 lowercase hex characters.

Types

This section is empty.

Directories

Path Synopsis
Package deps is what the pages of the dev UI share: the workspace they show and change.
Package deps is what the pages of the dev UI share: the workspace they show and change.
Package fake is a backend of the dev UI in memory, for the tests of its pages.
Package fake is a backend of the dev UI in memory, for the tests of its pages.
mcp

Jump to

Keyboard shortcuts

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