browserroutes

package
v0.2.2 Latest Latest
Warning

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

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

Documentation

Overview

Package browserroutes is the single source of truth for deploy's browser-facing URL space.

The package owns the route patterns, the Gin parameter names embedded in them, and the builders that bind those parameters. Handlers, templates, and the embedded browser client all read paths from here, so a route cannot be changed in one place and missed in another. Callers may rely on these paths being stable across releases and on each exported builder producing a path that matches the pattern of the same name. The package holds no handlers, no transport, and no state.

Index

Constants

View Source
const (
	ParamAssetPath  = "filepath"
	ParamApprovalID = "id"
	ParamRunID      = "runID"
	ParamSessionID  = "sessionID"
)

Gin parameter names live beside the route patterns so handlers and URL builders cannot drift.

View Source
const (
	Index           = "/"
	Health          = "/healthz"
	Assets          = "/assets/*" + ParamAssetPath
	ClawChat        = "/claws/:" + ParamSessionID + "/chat"
	Snapshot        = "/api/snapshot"
	Events          = "/api/events"
	Prompts         = "/api/prompts"
	CurrentRunAbort = "/api/runs/current/abort"
	Approval        = "/api/approvals/:" + ParamApprovalID
	ClawMessages    = "/api/claws/:" + ParamSessionID + "/messages"
	ClawRunAbort    = "/api/claws/:" + ParamSessionID + "/runs/:" + ParamRunID + "/abort"
)
View Source
const BrandStylesheet = "brand.css"

BrandStylesheet is the generated palette stylesheet served from the asset space. No embedded asset carries this name: the bytes are produced per brand and served same-origin, which keeps the page's style-src at 'self' without an inline style block.

Variables

This section is empty.

Functions

func ApprovalPath

func ApprovalPath(approvalID string) string

ApprovalPath returns the mutation URL for one approval. An empty identifier deliberately returns the stable prefix used by the browser client.

func AssetPath

func AssetPath(filename string) string

AssetPath returns the public URL for one embedded browser asset.

func BrandStylesheetPath

func BrandStylesheetPath() string

BrandStylesheetPath returns the public URL of the generated brand stylesheet.

func ClawChatPath

func ClawChatPath(sessionID string) string

ClawChatPath returns the live-chat page URL for one harness session.

func ClawMessagePath

func ClawMessagePath(sessionID string) string

ClawMessagePath returns the steering URL for one harness session.

func ClawRunAbortPath

func ClawRunAbortPath(sessionID, runID string) string

ClawRunAbortPath returns the abort URL for one exact harness run.

Types

This section is empty.

Jump to

Keyboard shortcuts

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