mirror of
https://github.com/0xWheatyz/handler.git
synced 2026-08-30 11:36:24 +00:00
07d8c3aa19
The dashboard's Claude page now manages the whole Claude Code install agents run on, not just the account login: - Skills: operator-authored SKILL.md rows, synced to each worker's user-level ~/.claude/skills at every launch. Managed dirs carry a .handler-managed marker so deletions in the UI propagate while hand-installed skills survive. - Connectors: MCP servers (stdio/http/sse) written per-launch as .claude/mcp-servers.json and passed to claude via --mcp-config, so nothing lands in the managed repo's tracked tree. - Plugins: marketplace-pinned plugins folded into generated settings as extraKnownMarketplaces + enabledPlugins, installing on boot of headless runs. - Permissions: defaultMode override plus allow/deny/ask rules merged over the env baseline into every generated settings.json. All of it is plain DB state (new claude_skills / claude_connectors / claude_plugins / claude_config tables, migration 0010) edited through the new admin-gated /claude/* API routes and applied by the control container at spawn and resume — changes reach the next launch of every agent with no redeploy. The login flow moved into the page's Account tab unchanged; /login redirects to /claude for old bookmarks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019f42XmjtVsc3zQ9Dhn6DqZ
33 lines
1.5 KiB
TypeScript
33 lines
1.5 KiB
TypeScript
/* The left-nav map: one entry per section, each its own route/page. This is the single
|
|
* source of truth shared by the sidebar (which renders the links) and the auth frame
|
|
* (which seeds the store's active section from the URL on first load). Runs is the root. */
|
|
import type { Section } from "@/components/store";
|
|
|
|
export interface NavRoute {
|
|
key: Section;
|
|
href: string;
|
|
label: string;
|
|
}
|
|
|
|
export const NAV_ROUTES: NavRoute[] = [
|
|
{ key: "runs", href: "/", label: "Runs" },
|
|
{ key: "repositories", href: "/repositories", label: "Repositories" },
|
|
{ key: "agents", href: "/agents", label: "Agents" },
|
|
{ key: "schedules", href: "/schedules", label: "Schedules" },
|
|
{ key: "approvals", href: "/approvals", label: "Approvals" },
|
|
{ key: "servers", href: "/servers", label: "Git Servers" },
|
|
{ key: "activity", href: "/activity", label: "Activity" },
|
|
{ key: "shared", href: "/shared", label: "Shared" },
|
|
{ key: "claude", href: "/claude", label: "Claude" },
|
|
];
|
|
|
|
/* Map a browser path back to its section key. Trailing slashes (Next emits them under
|
|
* `trailingSlash: true`) are normalized away; anything unrecognized falls back to Runs.
|
|
* "/login" still maps to the Claude page — the login flow moved into it, and the old
|
|
* route redirects there. */
|
|
export function sectionFromPath(pathname: string): Section {
|
|
const clean = pathname.replace(/\/+$/, "") || "/";
|
|
if (clean === "/login") return "claude";
|
|
return NAV_ROUTES.find((r) => r.href === clean)?.key ?? "runs";
|
|
}
|