feat: v2.6.0 — Chat UI composer (+ menu, project files, activity panel, permission mode, Stop), git on a workspace's extra folders (#70), long paste as a file (#68), S3 server mode (experimental)
Chat UI: - Each Claude/Codex session keeps its own chat/terminal view; Settings only sets how new sessions open. - Composer + menu: upload, project files and folders (#54, also dragged from the Files/Changes tree), context files, recent uploads, skills, plugins. - Activity side panel (progress, outputs, files read, uploads, memory, skills, connectors) with a file preview; edited-file counts per turn. - Permission-mode chip (Shift+Tab steps, read back from the pane: server/lib/pane-mode.js, GET|POST /api/run/:id/permission-mode). - Stop (Esc) while the main agent works; the status is checked per agent (with session_id /api/agents ignores its status filter) and re-read every 5 s while Stop shows. - Dropped images shown in the conversation (GET /api/run/drop/:name, the requester's own drop dir), full-size viewer. - A plain-text paste over 5,000 characters is attached as pasted-text.txt, so no prompt reaches tmux/argv limits (#68). Changes panel: every /api/lanes/:id/git* route takes ?source=<lane_sources id> (sourceFolder; ENOSOURCE otherwise) and a folder picker switches the whole panel to a workspace's extra folder (#70). Server mode S3 (one Linux user per account) — experimental, verified with fake sudo plus a P6 managed-settings spike on a test account: - member tmux listing runs in the background (cached, 15 s => unknown); - transcript snapshot copy is async, chunked, temp file + rename; - Express Layer patch only on Express 4; - tmux capturePane/sendKey go to the member's own server. Docs: the multi-user design moved in as docs/plans/server-mode/README.md (the AgentHub-Server repo is gone); S3-PLAN P6 result; LANES/API/openapi.
This commit is contained in:
+50
-8
@@ -644,22 +644,30 @@ async function send<T>(path: string, options?: RequestInit): Promise<T> {
|
||||
*/
|
||||
/**
|
||||
* What a workspace git call works on: the workspace (its id) or, with
|
||||
* `session`, that session's own worktree (`claude --worktree`) — the server
|
||||
* resolves the tree from the session row (`?session=`), never from a path.
|
||||
* `session`, that session's own worktree (`claude --worktree`), or, with
|
||||
* `source`, one of the workspace's extra folders — the server resolves the
|
||||
* tree from the session or `lane_sources` row (`?session=` / `?source=`),
|
||||
* never from a path.
|
||||
*/
|
||||
export type GitTarget = number | { lane: number; session?: string };
|
||||
export type GitTarget = number | { lane: number; session?: string; source?: number };
|
||||
|
||||
/** `/lanes/<id>/git<sub>` plus `q` and, for a session target, `session=`. */
|
||||
/** `/lanes/<id>/git<sub>` plus `q` and the target's `session=` / `source=`. */
|
||||
function gitUrl(target: GitTarget, sub: string, q?: URLSearchParams): string {
|
||||
const params = new URLSearchParams(q);
|
||||
const lane = typeof target === "number" ? target : target.lane;
|
||||
if (typeof target !== "number" && target.session) params.set("session", target.session);
|
||||
if (typeof target !== "number" && target.source) params.set("source", String(target.source));
|
||||
const qs = params.toString();
|
||||
return `/lanes/${lane}/git${sub}${qs ? `?${qs}` : ""}`;
|
||||
}
|
||||
|
||||
/** The target for `laneId`, in `session`'s worktree when one is given. */
|
||||
export function gitTarget(laneId: number, session?: string | null): GitTarget {
|
||||
/** The target for `laneId`: an extra folder's repo, else `session`'s worktree, else the workspace. */
|
||||
export function gitTarget(
|
||||
laneId: number,
|
||||
session?: string | null,
|
||||
source?: number | null
|
||||
): GitTarget {
|
||||
if (source) return { lane: laneId, source };
|
||||
return session ? { lane: laneId, session } : laneId;
|
||||
}
|
||||
|
||||
@@ -911,6 +919,9 @@ export const api = {
|
||||
* @returns {@link SessionStats} for that one session.
|
||||
*/
|
||||
stats: (id: string) => request<SessionStats>(`/sessions/${encodeURIComponent(id)}/stats`),
|
||||
/** GET /api/sessions/:id/outline — the session's plan, the files it wrote
|
||||
* and the skills / MCP servers it used (a Chat pane's side panel). */
|
||||
outline: (id: string) => request<SessionOutline>(`/sessions/${encodeURIComponent(id)}/outline`),
|
||||
/** PATCH /api/sessions/:id — rename, or archive (hides it from its
|
||||
* workspace, deletes nothing). */
|
||||
patch: (id: string, body: { name?: string; archived?: boolean }) =>
|
||||
@@ -2437,10 +2448,12 @@ export const api = {
|
||||
tmuxAvailable: () => request<{ available: boolean }>("/run/tmux"),
|
||||
/** GET /api/run/cwds - suggested working directories for the cwd picker. */
|
||||
cwds: () => request<{ items: CwdSuggestion[] }>("/run/cwds"),
|
||||
/** GET /api/run/files - path-completion suggestions under `cwd`. */
|
||||
files: (cwd: string, q?: string) => {
|
||||
/** GET /api/run/files - path-completion suggestions under `cwd`; `dirs`
|
||||
* adds the folders too, as `dir/`. */
|
||||
files: (cwd: string, q?: string, dirs = false) => {
|
||||
const qs = new URLSearchParams({ cwd });
|
||||
if (q) qs.set("q", q);
|
||||
if (dirs) qs.set("dirs", "1");
|
||||
return request<{ items: string[] }>(`/run/files?${qs.toString()}`);
|
||||
},
|
||||
/** POST /api/run/drop-image - save an image dropped on the terminal on the
|
||||
@@ -2470,6 +2483,19 @@ export const api = {
|
||||
request<RunHandle>("/run", { method: "POST", body: JSON.stringify(args) }),
|
||||
/** GET /api/run/:id - one run's current handle. */
|
||||
get: (id: string) => request<RunHandle>(`/run/${encodeURIComponent(id)}`),
|
||||
/** GET /api/run/:id/permission-mode - the mode a live claude pane shows now
|
||||
* (null while a menu hides it). */
|
||||
permissionMode: (id: string) =>
|
||||
request<{ mode: PermissionMode | "dontAsk" | null }>(
|
||||
`/run/${encodeURIComponent(id)}/permission-mode`
|
||||
),
|
||||
/** POST /api/run/:id/permission-mode - step the pane's mode (Shift+Tab, each
|
||||
* step read back) to `mode`; 409 when it cannot be reached. */
|
||||
setPermissionMode: (id: string, mode: PermissionMode) =>
|
||||
request<{ mode: PermissionMode }>(`/run/${encodeURIComponent(id)}/permission-mode`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ mode }),
|
||||
}),
|
||||
/** DELETE /api/run/:id - kill the tmux session. */
|
||||
kill: (id: string) =>
|
||||
request<{ ok: true }>(`/run/${encodeURIComponent(id)}`, { method: "DELETE" }),
|
||||
@@ -4294,6 +4320,22 @@ export interface CodexMarketplaceActionArgs {
|
||||
/** Maps 1:1 to the `claude --permission-mode` CLI flag. */
|
||||
export type PermissionMode = "auto" | "acceptEdits" | "default" | "plan" | "bypassPermissions";
|
||||
/** Maps 1:1 to the `claude --effort` CLI flag; "" omits the flag (model default). */
|
||||
/** `GET /api/sessions/:id/outline`. `status` is the agent's own word
|
||||
* (`pending` / `in_progress` / `completed`). */
|
||||
export interface SessionOutline {
|
||||
progress: { id: string; subject: string; status: string }[];
|
||||
/** Files it wrote or edited, newest first. */
|
||||
outputs: string[];
|
||||
/** Files it only read, newest first. */
|
||||
files: string[];
|
||||
/** Files attached to its prompts (the composer's drop dir), newest first. */
|
||||
uploads: string[];
|
||||
/** Claude Code memory files it read or wrote, newest first. */
|
||||
memory: string[];
|
||||
skills: string[];
|
||||
mcp: string[];
|
||||
}
|
||||
|
||||
export type EffortLevel = "" | "low" | "medium" | "high" | "xhigh" | "max";
|
||||
/** "running" — a live tmux session exists; "gone" — it doesn't (killed,
|
||||
* crashed, claude exited and closed the pane). Computed fresh from tmux
|
||||
|
||||
Reference in New Issue
Block a user