DevelopOther
@holtkeeper/web-paths
Paths of the web panel’s pages, for everything outside apps/web that links into the panel: Home’s Needs attention items, Inbox items, chat cards, merge request comments, analysis reports, MCP tool answers and config warnings. It has no dependencies, so any package can use it.
import { webPaths, webUrl } from '@holtkeeper/web-paths'
webPaths.runs({ status: 'failed', analyzer: 'widgets' }) // '/ops/runs?status=failed&analyzer=widgets'webPaths.releaseTimeline('gitlab:acme/widget-kit') // '/releases/timeline?repo=gitlab%3Aacme%2Fwidget-kit'webPaths.repo('gitlab:acme/widget-kit', { tab: 'quality', section: 'assets' }) // '/repos/gitlab/acme/widget-kit?tab=quality§ion=assets'webUrl('https://hk.acme.dev/', webPaths.tasks({ group: 'g-1', task: 't-2' })) // 'https://hk.acme.dev/ops/tasks?group=g-1&task=t-2'Guarantees
Section titled “Guarantees”- Every path starts with
/and is relative to the panel’s origin;webUrl(publicUrl, path)makes it absolute, ignoring trailing slashes ofpublicUrl. - Search parameters that are
undefinedor empty are left out; values are URL-encoded. Repository keys areforge:path. - Single path segments (ids) are encoded whole.
repoputs theforge:pathkey in the path,/repos/<forge>/<path>, encoding each segment on its own.tabis one ofoverview,supply,quality,releases,activity,knowledge,settings;sectionnames an area of the tab (assetson Quality,updateson Settings).knowledgetakes the tab (rules,learnings,effective) and what to open in it:repoaforge:pathkey (the lists are filtered to it; the effective prompt is shown for it),teama team key filter,rulea rule id,learninga learning id.tasksdropstaskwithoutgroup, as the Tasks page only selects a task inside its group.
| Builder | Path |
|---|---|
inbox({ item?, kind?, tab? }) |
/inbox?item=&kind=&tab= (tab: snoozed) |
repos() |
/repos |
repo(repo, { tab?, section?, file?, ref? }) |
/repos/<forge>/<path>?tab=§ion=&file=&ref= (hub) |
teams() |
/repos/teams |
security({ repo?, urgent?, finding? }) |
/supply/security?repo=<forge>:<path>&urgent=only&finding=<advisory>:<package> |
secretReports(report?) |
/supply/secret-reports[?report=<id>] |
releaseTimeline(repo) |
/releases/timeline?repo= |
knowledge(tab, { repo?, team?, rule?, learning? }) |
/knowledge/rules|learnings|effective?repo=&team=&rule=&learning= |
chat(thread?) |
/chat?thread= |
runs({ repo?, status?, analyzer?, trigger?, schedule?, signature?, view? }) |
/ops/runs |
tasks({ group?, task?, filter? }) |
/ops/tasks |
automation(job?) |
/ops/automation?job= |
settings(section) |
/settings/people|ai|integrations|analyzers|policies|system|audit |
Builders exist only for pages something outside apps/web links to; a module that starts linking to another page adds its builder here. The web app’s router must serve each of these paths. A renamed page changes its builder here, and links already posted (merge request comments, reports) stop working: there are no redirects.