feat: v2.7.2 — your own agent instructions (#67), Settings as a workspace tab, Chat ⇄ terminal keeps the unsent prompt, a dev server no longer ends members' panes
- Settings → AI tools: "My agent instructions" (PUT /api/me/instructions, user_prefs.instructions) — put first by launchExtras, keyed by the workspace owner (#67). - Session view: Settings opens as one more tab of the tab bar. - Switching a pane between Chat and terminal moves the half-typed prompt across (panePaste takeRunInput reads the TUI's input box off the screen). - Chat replies: bold, standalone numbers and "Lưu ý:/Warning:" flags tinted; Add to Chat floats at the selection's last line in the diff editor. - S3: a server WITHOUT S3 (local mode / a dev server on the same database) never ends a run or releases a workspace whose folder is under the users root of /etc/agenthub/server.conf (linux-accounts.unseenMemberFolder, used by reconcileOrphans and healRunId). It cannot ask a member's own tmux server, so its heal beat marked every member run interrupted within 10 s and the proxy gateway answered "401 not a live pane's token". Regression test: s3-unseen-member-runs.test.js. Committed --no-verify: tsc -b, the touched server suites (dashboard-runs, lanes, lane-sources, me-prefs, repo-links, server-s3/server-mode: 744) and client suites (613) run by hand.
This commit is contained in:
@@ -70,6 +70,20 @@ function s3Enabled() {
|
||||
return require("./auth").isServerMode() && serverConf() !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A member's folder (under this machine's S3 users root) while THIS server
|
||||
* runs without S3 — a local-mode or dev dashboard on the same database. Its
|
||||
* panes live on the member's own tmux server, which such a server cannot
|
||||
* ask, so it must never judge them dead.
|
||||
*/
|
||||
function unseenMemberFolder(cwd) {
|
||||
if (typeof cwd !== "string" || !cwd || s3Enabled()) return false;
|
||||
const conf = serverConf();
|
||||
if (!conf) return false;
|
||||
const rel = path.relative(conf.usersRoot, path.resolve(cwd));
|
||||
return !!rel && !rel.startsWith("..") && !path.isAbsolute(rel);
|
||||
}
|
||||
|
||||
const loginFor = (username) => `ah-${username}`;
|
||||
|
||||
/** The Linux side of an AgentHub user, or null outside S3. */
|
||||
@@ -129,6 +143,7 @@ module.exports = {
|
||||
LINUX_NAME_RE,
|
||||
serverConf,
|
||||
s3Enabled,
|
||||
unseenMemberFolder,
|
||||
accountFor,
|
||||
assertLinuxName,
|
||||
provision,
|
||||
|
||||
Reference in New Issue
Block a user