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 ¶
const ( ParamAssetPath = "filepath" ParamApprovalID = "id" ParamRunID = "runID" ParamSessionID = "sessionID" )
Gin parameter names live beside the route patterns so handlers and URL builders cannot drift.
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" )
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 ¶
ApprovalPath returns the mutation URL for one approval. An empty identifier deliberately returns the stable prefix used by the browser client.
func BrandStylesheetPath ¶
func BrandStylesheetPath() string
BrandStylesheetPath returns the public URL of the generated brand stylesheet.
func ClawChatPath ¶
ClawChatPath returns the live-chat page URL for one harness session.
func ClawMessagePath ¶
ClawMessagePath returns the steering URL for one harness session.
func ClawRunAbortPath ¶
ClawRunAbortPath returns the abort URL for one exact harness run.
Types ¶
This section is empty.