8546748759
Dependencies
- Security: body-parser and multer DoS advisories fixed (npm audit: 0).
- Server: Express 5 (query parser kept "extended", req.body defaults to {},
SPA catch-all /{*splat}, send-file helper restores Express 4's dot-folder
rule for sendFile/download, alerts ack route without inline regex),
better-sqlite3 13, js-yaml 5 (server/lib/yaml.js keeps js-yaml 4's default
schema), uuid dropped for crypto.randomUUID, node-pty beta.18, multer 2.5.
- Client: React 19, xterm 6 (WebGL renderer replaces the removed canvas one,
DOM fallback on context loss; Alt+arrow word moves re-mapped), lucide-react 1,
TypeScript 7, i18next/react-i18next/codemirror minors.
Workspace rename step 4
- `agenthub lanes` and `--lane` exit 1 with "renamed: use …"; client api.ts,
the CLI and the MCP server call /api/workspaces; /api/lanes stays mounted.
Server mode (S3): members manage their own Claude Code config
- server/lib/cc-target.js resolves whose config a /cc-config request touches
and gates the router by allowlist; /profiles* and /plugins/update-all stay
admin-only. Member writes go through write-as, CLI calls through sudo as the
member (never -y), reads through openSafe; cc_config_changed reaches only
its owner. Not verified live on an S3 install yet.
Other
- Chat: an HTML file is an artifact only when written whole and not a project
page (index.html, or under src/, public/, templates/, …).
- OpenAPI covers every /api route; openapi-coverage.test.js guards it.
- read-pool test keeps its event loop alive (its worker is unref'd).
- Docs: plan statuses, checklists, CLI.md, LANES.md, SERVER-MODE.md, API.md.
2.1 KiB
2.1 KiB
Roles: admin / analyst / developer — checklist
Decisions (user, 2026-10-08):
memberis renameddevelopereverywhere, stored value included (migration).- developer: full control of OWN workspaces/sessions/git; nothing host-wide.
- analyst: sees every user's rows (as today) AND works on OWN rows like a developer (was: read-only); nothing host-wide, never another user's rows.
- UI hides every control the role cannot use; refusals show a clear toast.
Server
- db.js: rebuild
userswith CHECK(admin, analyst, developer), member→developer - auth.js: ROLES, default role, STAFF_ONLY gate, analyst no longer EREADONLY
- auth.js:
/alerts/rulesjoins ADMIN_WRITE_PREFIXES (host-wide rules) - scope.js:
memberId= developer always, analyst on writes only - websocket.js: analyst terminal only on own runs; broadcast member→developer
- audit.js, users.js, workflow-stats.js, openapi-extra/auth.js, CLI users
- tests: update member→developer, add analyst write-scope tests
Client
- one role helper (isAdmin / canSeeAll) from useAuth
- hide admin-only controls (inventory from Explore)
- analyst: hide write controls on other users' rows
- errors: EADMIN / EREADONLY / ENOTFOUND toasts translated (en + vi)
- role label "Developer" en/vi, Users page role select
Finish
- npm run test:server, npm run test:client
- docs: SERVER-MODE.md, CLAUDE.md lines naming
member - headers check
Follow-ups (2026-10-08)
- analyst alert feed:
can_ackper alert, Ack hidden on others' (server test + client test) - Settings search: admin-only entries (autostart, quit, tray, reports, webhooks, git creds) hidden
- SessionDetail: an unstamped session's owner resolved by folder (
owningLane) - prod/dev share one DB: restart prod on the new build together with the first run (migration) — done with the v2.5.x rollout
agenthub stopin server mode answers EAUTH — resolved:cmdStop(bin/agenthub.js) turns EAUTH/EADMIN into a clear message naming the admin's Quit and thesystemctlstop commands; a host shell carries no login, so that is the intended answer