Files
AgentHub/scripts/service-manager.js
nntrivi2001 758609775f chore: v2.8.5 — Trash opens on one folder per user, server setup installs S3
- Files → Trash: ONE sidebar entry. An admin's opens on a folder per user's
  Trash (My Trash first, item counts from GET /api/homes/trash, an unreadable
  one showing its error); a folder opens that user's Trash (path bar
  Trash › user, Up back to the folders). An admin may restore/purge in
  another user's Trash (audited); purging asks first. The merged "All users"
  list is gone from the UI.
- A home's Trash is its user's whole recycle bin (home store + host store,
  items tagged `store`).
- `agenthub server setup` installs one Linux user per account on Linux by
  default (`--no-system` opts out); install-system messages drop `sudo`.
- Settings → Git: the author email suggests <username>@<AGENTHUB_EMAIL_DOMAIN>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 16:02:11 +07:00

21 lines
885 B
JavaScript

#!/usr/bin/env node
/**
* @file service-manager.js
* @description Picks the per-user service manager that keeps the dashboard
* running without Claude Code: a LaunchAgent on macOS (`launchd-service.js`),
* a systemd `--user` unit everywhere else (`systemd-service.js`, which reports
* itself unavailable off Linux). Both export the same API — and so does the
* third, `systemd-system-service.js`, chosen while the server-mode SYSTEM unit
* `agenthub server install-system` wrote exists (pure fs check).
* Require THIS module, never one of the three directly.
* @author Nguyễn Ngọc Trí Vĩ <vinnt@smartgift.vn>
*/
function pick() {
if (process.platform === "darwin") return require("./launchd-service");
const system = require("./systemd-system-service");
return system.unitIsOurs("agenthub") ? system : require("./systemd-service");
}
module.exports = pick();