Phase 002: rebrand to hermes-ui and consolidate i18n to zh/en
Removes the ekko / hermes-web-ui branding from the whole tree and drops eight locale files, so the project presents one name and one language pair. Data compatibility is deliberate, not accidental: DB filenames, the JWT audience, and skill manifest ownership all still recognise their pre-rename values so existing deployments under ~/.hermes-web-ui keep working without a re-login or a re-injection. scripts/harness-check.mjs now scans for the legacy strings and fails the build on any new occurrence, with an explicit allow-list (and reasons) for the compatibility paths that must keep them.
This commit is contained in:
@@ -155,7 +155,7 @@ async function request(path, options = {}) {
|
||||
|
||||
function appendQuery(path, query) {
|
||||
if (!query || typeof query !== 'object' || Array.isArray(query)) return path
|
||||
const parsed = new URL(path, 'http://hermes-web-ui.local')
|
||||
const parsed = new URL(path, 'http://hermes-ui.local')
|
||||
for (const [key, value] of Object.entries(query)) {
|
||||
if (value == null) continue
|
||||
if (Array.isArray(value)) {
|
||||
@@ -227,7 +227,7 @@ function normalizeApiPath(path) {
|
||||
const raw = String(path || '').trim()
|
||||
if (!raw || !raw.startsWith('/') || raw.startsWith('//')) return null
|
||||
if (raw === '/v1' || raw.startsWith('/v1/')) return null
|
||||
const parsed = new URL(raw, 'http://hermes-web-ui.local')
|
||||
const parsed = new URL(raw, 'http://hermes-ui.local')
|
||||
const normalized = `${parsed.pathname}${parsed.search}`
|
||||
if (parsed.pathname === '/api/openapi.json') return normalized
|
||||
if (parsed.pathname === '/health') return normalized
|
||||
@@ -248,7 +248,7 @@ async function openApiDocument(options = {}) {
|
||||
}
|
||||
|
||||
function pathWithoutQuery(path) {
|
||||
return new URL(path, 'http://hermes-web-ui.local').pathname
|
||||
return new URL(path, 'http://hermes-ui.local').pathname
|
||||
}
|
||||
|
||||
function pathTemplateRegex(template) {
|
||||
@@ -273,7 +273,7 @@ function findOpenApiOperation(openapi, method, path) {
|
||||
}
|
||||
|
||||
function queryObjectFromPath(path, query) {
|
||||
const parsed = new URL(path, 'http://hermes-web-ui.local')
|
||||
const parsed = new URL(path, 'http://hermes-ui.local')
|
||||
const values = {}
|
||||
for (const [key, value] of parsed.searchParams.entries()) {
|
||||
if (values[key] === undefined) values[key] = value
|
||||
|
||||
+10
-10
@@ -450,12 +450,12 @@ function startDaemon(port) {
|
||||
const interval = 500
|
||||
let waited = 0
|
||||
|
||||
console.log(` ⏳ Starting hermes-web-ui (PID: ${child.pid}, port: ${port})...`)
|
||||
console.log(` ⏳ Starting hermes-ui (PID: ${child.pid}, port: ${port})...`)
|
||||
|
||||
function poll() {
|
||||
waited += interval
|
||||
if (!isRunning(child.pid)) {
|
||||
console.log(' ✗ Failed to start hermes-web-ui')
|
||||
console.log(' ✗ Failed to start hermes-ui')
|
||||
console.log(` Check log: ${LOG_FILE}`)
|
||||
removePid()
|
||||
process.exit(1)
|
||||
@@ -507,7 +507,7 @@ function stopDaemon(options = {}) {
|
||||
let cleanedStalePid = false
|
||||
if (pidFromFile && !isRunning(pidFromFile)) {
|
||||
removePid()
|
||||
console.log(` ✓ hermes-web-ui was not running (cleaned stale PID: ${pidFromFile})`)
|
||||
console.log(` ✓ hermes-ui was not running (cleaned stale PID: ${pidFromFile})`)
|
||||
pidFromFile = null
|
||||
cleanedStalePid = true
|
||||
}
|
||||
@@ -516,16 +516,16 @@ function stopDaemon(options = {}) {
|
||||
if (!pid) {
|
||||
if (cleanedStalePid) return
|
||||
if (stoppedPreviewPids) {
|
||||
console.log(` ✓ hermes-web-ui preview stopped`)
|
||||
console.log(` ✓ hermes-ui preview stopped`)
|
||||
return
|
||||
}
|
||||
console.log(' ✗ hermes-web-ui is not running')
|
||||
console.log(' ✗ hermes-ui is not running')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
if (!isRunning(pid)) {
|
||||
removePid()
|
||||
console.log(` ✓ hermes-web-ui was not running (cleaned stale PID)`)
|
||||
console.log(` ✓ hermes-ui was not running (cleaned stale PID)`)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -561,11 +561,11 @@ function stopDaemon(options = {}) {
|
||||
function showStatus() {
|
||||
const pid = getPid()
|
||||
if (pid && isRunning(pid)) {
|
||||
console.log(` ✓ hermes-web-ui is running (PID: ${pid})`)
|
||||
console.log(` ✓ hermes-ui is running (PID: ${pid})`)
|
||||
console.log(` PID file: ${PID_FILE}`)
|
||||
} else {
|
||||
if (pid) removePid()
|
||||
console.log(' ✗ hermes-web-ui is not running')
|
||||
console.log(' ✗ hermes-ui is not running')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -588,7 +588,7 @@ function clearLoginLocks(options = {}) {
|
||||
}
|
||||
|
||||
if (!silent && serverRunning) {
|
||||
console.log(' ⚠ hermes-web-ui is running; restart it to clear in-memory login locks.')
|
||||
console.log(' ⚠ hermes-ui is running; restart it to clear in-memory login locks.')
|
||||
console.log(' Run: hermes-ui restart')
|
||||
}
|
||||
|
||||
@@ -747,7 +747,7 @@ Options:
|
||||
}
|
||||
|
||||
function doUpdate() {
|
||||
console.log(' ⬆ Updating hermes-web-ui...')
|
||||
console.log(' ⬆ Updating hermes-ui...')
|
||||
|
||||
const npm = getNpmBin()
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user