refactor(ui): adopt vue-router file-based routing under src/pages

This commit is contained in:
sam committed 2026-11-27 16:29:38 +11:00
1 parent 1e105ff4c8
commit 936c5267f0
62 files changed
+2378 -963

No files matched your search

+149 -139
View File
@@ -1,73 +1,13 @@
[
{
"path": "/account",
"label": "Your account",
"description": "Password, recovery code, passkeys and personal API tokens."
},
{
"path": "/",
"label": "Dashboard",
"description": "Health, what waits on a person, and recent runs."
},
{
"path": "/tasks",
"label": "Tasks",
"description": "Picked-up issues and their status."
},
{
"path": "/runs",
"label": "Runs",
"description": "Workflow runs, their decision trails and waiting approvals."
},
{
"path": "/proposals",
"label": "Proposals",
"description": "Changes Archie proposes, with their evidence and the actions they take."
},
{
"path": "/controls",
"label": "Controls",
"description": "Hard rules, change-request rules, guards and action types."
},
{
"path": "/workflows",
"label": "Workflows",
"description": "Workflows and run history."
},
{
"path": "/settings/skills",
"label": "Skills",
"description": "Skills Archie can activate."
},
{
"path": "/settings/curators",
"label": "Curators",
"description": "Scheduled memory and capture curation."
},
{
"path": "/memory",
"label": "Personal memory",
"description": "What Archie remembers for you, and the notes shared with the organisation."
},
{
"path": "/settings/memory",
"label": "Shared memory",
"description": "Notes shared with everyone, the proposals waiting for review, and their published versions."
},
{
"path": "/events",
"label": "Events",
"description": "Received events, their sources, and the triggers that start workflows."
},
{
"path": "/settings/status",
"label": "Status",
"description": "Module, connector and runner health, and the running version."
},
{
"path": "/logs",
"label": "Logs",
"description": "Daemon log by level and component."
"path": "/account",
"label": "Your account",
"description": "Password, recovery code, passkeys and personal API tokens."
},
{
"path": "/account/appearance",
@@ -75,64 +15,64 @@
"description": "Theme, density and motion."
},
{
"path": "/settings/task-execution",
"label": "Task execution",
"description": "Statuses, operator actions, budgets."
"path": "/controls",
"label": "Controls",
"description": "Hard rules, change-request rules, guards and action types."
},
{
"path": "/settings/models",
"label": "Models",
"description": "Model aliases, their providers and the organisation's policy."
"path": "/controls/action-types",
"label": "Action types",
"description": "Approval levels each action type has earned."
},
{
"path": "/settings/organisations",
"label": "Organisations",
"description": "The organisations on this instance, and which one is active."
"path": "/controls/guards",
"label": "Guards",
"description": "Judges that inspect actions before they run."
},
{
"path": "/settings/authentication",
"label": "Authentication",
"description": "Instance URL and single sign-on providers."
"path": "/events",
"label": "Events",
"description": "Received events, their sources, and the triggers that start workflows."
},
{
"path": "/logs",
"label": "Logs",
"description": "Daemon log by level and component."
},
{
"path": "/memory",
"label": "Personal memory",
"description": "What Archie remembers for you, and the notes shared with the organisation."
},
{
"path": "/org",
"label": "Organisation",
"description": "Members, identities, connections, models and automation."
},
{
"path": "/org/members",
"label": "Members",
"description": "People in the organisation and their roles."
},
{
"path": "/org/agents",
"label": "Agents",
"description": "Execution identities, their permissions and commit author."
},
{
"path": "/org/alerts",
"label": "Alert webhook",
"description": "Webhook sources that receive alerts."
},
{
"path": "/org/approvals",
"label": "Approvals",
"description": "Default owner, escalation path and approval deadline."
},
{
"path": "/org/audit",
"label": "Audit",
"description": "Settings, access, identity and runtime events."
},
{
"path": "/org/decisions",
"label": "Access decisions",
"description": "Access requests the policy chain allowed or refused, newest first."
},
{
"path": "/org/workspaces",
"label": "Workspaces",
"description": "Groups of organisation work and resources."
},
{
"path": "/org/policies",
"label": "Policies",
"description": "Access rules for the organisation."
},
{
"path": "/org/repositories",
"label": "Repositories",
"description": "Repository connections, access checks and execution policies."
"path": "/org/channels",
"label": "Channels",
"description": "Chat channels."
},
{
"path": "/org/connections",
@@ -145,70 +85,130 @@
"description": "Credentials the organisation's extensions use."
},
{
"path": "/org/models",
"label": "Models",
"description": "The organisation's agent models and aliases."
},
{
"path": "/org/approvals",
"label": "Approvals",
"description": "Default owner, escalation path and approval deadline."
"path": "/org/decisions",
"label": "Access decisions",
"description": "Access requests the policy chain allowed or refused, newest first."
},
{
"path": "/org/instructions",
"label": "Instructions",
"description": "Standing instructions given to every agent in the organisation."
},
{
"path": "/org/schedules",
"label": "Schedules",
"description": "Time triggers that start workflows."
},
{
"path": "/org/channels",
"label": "Channels",
"description": "Chat channels."
},
{
"path": "/org/scheduling-policy",
"label": "Scheduling policy",
"description": "Work discovery and forge labels."
},
{
"path": "/org/issue-routing",
"label": "Issue routing",
"description": "Which workflow an issue runs by its labels."
},
{
"path": "/org/alerts",
"label": "Alert webhook",
"description": "Webhook sources that receive alerts."
"path": "/org/members",
"label": "Members",
"description": "People in the organisation and their roles."
},
{
"path": "/org/models",
"label": "Models",
"description": "The organisation's agent models and aliases."
},
{
"path": "/org/playbooks",
"label": "Playbooks",
"description": "Workflows and the events that start them."
},
{
"path": "/org/policies",
"label": "Policies",
"description": "Access rules for the organisation."
},
{
"path": "/org/repositories",
"label": "Repositories",
"description": "Repository connections, access checks and execution policies."
},
{
"path": "/org/schedules",
"label": "Schedules",
"description": "Time triggers that start workflows."
},
{
"path": "/org/scheduling-policy",
"label": "Scheduling policy",
"description": "Work discovery and forge labels."
},
{
"path": "/org/usage",
"label": "Usage",
"description": "Token spend by model, identity and period."
},
{
"path": "/settings/tools",
"label": "Tools & MCP",
"description": "Agent tools and MCP servers."
"path": "/org/workspaces",
"label": "Workspaces",
"description": "Groups of organisation work and resources."
},
{
"path": "/proposals",
"label": "Proposals",
"description": "Changes Archie proposes, with their evidence and the actions they take."
},
{
"path": "/runs",
"label": "Runs",
"description": "Workflow runs, their decision trails and waiting approvals."
},
{
"path": "/settings",
"label": "Instance",
"description": "Every instance-wide setting: models, prompts, connections, runtime and status."
},
{
"path": "/settings/agent-profiles",
"label": "Agent profiles",
"description": "Execution profiles: the image and tools each agent runs with."
},
{
"path": "/settings/authentication",
"label": "Authentication",
"description": "Instance URL and single sign-on providers."
},
{
"path": "/settings/channels",
"label": "Channels",
"description": "Chat channel connections and session defaults."
},
{
"path": "/settings/container-runtime",
"label": "Container runtime",
"description": "How task containers run: runtime, image, limits and egress hosts."
},
{
"path": "/settings/credentials",
"label": "Credentials",
"description": "Sealed credentials extensions and models use."
},
{
"path": "/settings/curators",
"label": "Curators",
"description": "Scheduled memory and capture curation."
},
{
"path": "/settings/extensions",
"label": "Extensions",
"description": "Installed extensions, grants and the marketplace."
},
{
"path": "/settings/memory",
"label": "Shared memory",
"description": "Notes shared with everyone, the proposals waiting for review, and their published versions."
},
{
"path": "/settings/models",
"label": "Models",
"description": "Model aliases, their providers and the organisation's policy."
},
{
"path": "/settings/organisations",
"label": "Organisations",
"description": "The organisations on this instance, and which one is active."
},
{
"path": "/settings/plugins",
"label": "Plugins",
@@ -220,23 +220,33 @@
"description": "Where secrets are read from: engines, their keys and health."
},
{
"path": "/settings/credentials",
"label": "Credentials",
"description": "Sealed credentials extensions and models use."
"path": "/settings/skills",
"label": "Skills",
"description": "Skills Archie can activate."
},
{
"path": "/settings/container-runtime",
"label": "Container runtime",
"description": "How task containers run: runtime, image, limits and egress hosts."
"path": "/settings/status",
"label": "Status",
"description": "Module, connector and runner health, and the running version."
},
{
"path": "/settings/agent-profiles",
"label": "Agent profiles",
"description": "Execution profiles: the image and tools each agent runs with."
"path": "/settings/task-execution",
"label": "Task execution",
"description": "Statuses, operator actions, budgets."
},
{
"path": "/settings",
"label": "Instance",
"description": "Every instance-wide setting: models, prompts, connections, runtime and status."
"path": "/settings/tools",
"label": "Tools & MCP",
"description": "Agent tools and MCP servers."
},
{
"path": "/tasks",
"label": "Tasks",
"description": "Picked-up issues and their status."
},
{
"path": "/workflows",
"label": "Workflows",
"description": "Workflows and run history."
}
]
+101 -35
View File
@@ -1,63 +1,129 @@
// Writes pages/pages.json from the router's own route table.
// Writes pages/pages.json from the file-based pages under src/pages/ and the
// redirect table in src/router/redirects.ts.
//
// The dashboard's pages are the routes it serves, so deriving the catalogue
// from them is what stops the assistant naming a page the dashboard lost or
// missing one it gained. `task pages:check` fails when the committed file is
// stale, which is what makes a new route carry a catalogue entry.
import { writeFileSync } from "node:fs";
import { readFileSync, writeFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { routes } from "../src/router/routes.ts";
import ts from "typescript";
import { createRoutesContext, resolveOptions } from "vue-router/unplugin";
import { redirects } from "../src/router/redirects.ts";
type Meta = { label?: string; description?: string; nav?: boolean };
type Record_ = {
path: string;
meta?: Meta;
children?: Record_[];
};
export type Page = { path: string; label: string; description: string };
const join_ = (parent: string, path: string): string => {
if (path.startsWith("/")) return path;
if (path === "") return parent;
return `${parent.replace(/\/$/, "")}/${path}`;
};
const here = dirname(fileURLToPath(import.meta.url));
const uiRoot = join(here, "..");
// dynamic is true for a route the operator reaches with an id in it; the
// assistant cannot name one, so it stays out of the catalogue.
const dynamic = (path: string): boolean => path.includes(":");
const collect = (records: Record_[], parent = "", out: Page[] = []): Page[] => {
for (const route of records) {
const path = join_(parent, route.path);
if (route.meta?.label && route.meta.nav !== false && path && !dynamic(path)) {
out.push({
function readDefinePageMeta(file: string): Meta | undefined {
const sfc = readFileSync(file, "utf8");
const scriptMatch = sfc.match(/<script\b[^>]*\bsetup\b[^>]*>([\s\S]*?)<\/script>/);
if (!scriptMatch) return undefined;
const sf = ts.createSourceFile(file, scriptMatch[1], ts.ScriptTarget.Latest, true);
let meta: Meta | undefined;
const propName = (name: ts.PropertyName): string | undefined => {
if (ts.isIdentifier(name) || ts.isStringLiteral(name)) return name.text;
return undefined;
};
const visit = (node: ts.Node): void => {
if (
ts.isCallExpression(node) &&
ts.isIdentifier(node.expression) &&
node.expression.text === "definePage" &&
node.arguments.length > 0 &&
ts.isObjectLiteralExpression(node.arguments[0])
) {
for (const prop of node.arguments[0].properties) {
if (
ts.isPropertyAssignment(prop) &&
propName(prop.name) === "meta" &&
ts.isObjectLiteralExpression(prop.initializer)
) {
const parsed: Meta = {};
for (const field of prop.initializer.properties) {
if (!ts.isPropertyAssignment(field)) continue;
const key = propName(field.name);
if (key === "label" && ts.isStringLiteral(field.initializer)) {
parsed.label = field.initializer.text;
} else if (key === "description" && ts.isStringLiteral(field.initializer)) {
parsed.description = field.initializer.text;
} else if (key === "nav") {
if (field.initializer.kind === ts.SyntaxKind.FalseKeyword) parsed.nav = false;
if (field.initializer.kind === ts.SyntaxKind.TrueKeyword) parsed.nav = true;
}
}
meta = parsed;
}
}
}
ts.forEachChild(node, visit);
};
visit(sf);
return meta;
}
const collected: Page[] = [];
const opts = resolveOptions({
root: uiRoot,
routesFolder: "src/pages",
dts: false,
extendRoute(route) {
const file = route.components.get("default");
if (!file) return;
const path = route.fullPath;
if (!path || dynamic(path)) return;
const meta = readDefinePageMeta(file);
if (meta?.label && meta.nav !== false) {
collected.push({
path,
label: route.meta.label,
description: route.meta.description ?? "",
label: meta.label,
description: meta.description ?? "",
});
}
if (route.children) collect(route.children, path, out);
}
return out;
};
},
});
// The org shell and its index child both answer at /org, so the first label
// for a path wins rather than the catalogue carrying the page twice.
const unique = (pages: Page[]): Page[] => {
const seen = new Set<string>();
return pages.filter((page) => {
const ctx = createRoutesContext(opts);
await ctx.scanPages(false);
ctx.generateRoutes();
for (const route of redirects) {
const meta = route.meta as Meta | undefined;
if (meta?.label && meta.nav !== false && route.path && !dynamic(route.path)) {
collected.push({
path: route.path,
label: meta.label,
description: meta.description ?? "",
});
}
}
// Shell routes and their index children share a path (for example /org and
// /controls), so the first label for a path wins rather than listing it twice.
const seen = new Set<string>();
const pages = collected
.filter((page) => {
if (seen.has(page.path)) return false;
seen.add(page.path);
return true;
});
};
})
.sort((a, b) => a.path.localeCompare(b.path));
const pages = unique(collect(routes as Record_[]));
const here = dirname(fileURLToPath(import.meta.url));
const target = join(here, "..", "pages", "pages.json");
const target = join(uiRoot, "pages", "pages.json");
writeFileSync(target, `${JSON.stringify(pages, null, 2)}\n`);
console.log(`pages: ${pages.length} written to ${target}`);
+10 -1
View File
@@ -37,7 +37,12 @@ const route = useRoute();
const router = useRouter();
const workflowsPage = computed(() => route.name === "workflow");
const hidden = computed(() => hiddenPaths(session.sections));
const sectionLink = computed(() => ({ workflow: "/workflows", run: "/runs" })[String(route.name)]);
const sectionLink = computed(() => ({
workflow: "/workflows",
run: "/runs",
"controls-guard": "/controls/guards",
"controls-action-type": "/controls/action-types",
})[String(route.name)]);
// The redirect below must not run during the router's first navigation: route
// is still the start location then, so a deep link would be replaced by the
// landing page before it resolves.
@@ -130,6 +135,10 @@ watch(() => accounts.status?.user, (user) => {
<BreadcrumbSeparator class="max-md:hidden" />
<BreadcrumbItem class="min-w-0 max-md:hidden"><BreadcrumbPage class="truncate font-mono">{{ String(route.params.id).slice(0, 8) }}</BreadcrumbPage></BreadcrumbItem>
</template>
<template v-else-if="route.name === 'controls-guard' || route.name === 'controls-action-type'">
<BreadcrumbSeparator class="max-md:hidden" />
<BreadcrumbItem class="min-w-0 max-md:hidden"><BreadcrumbPage class="truncate">{{ route.params.id }}</BreadcrumbPage></BreadcrumbItem>
</template>
</BreadcrumbList>
</Breadcrumb>
<div class="ml-auto flex shrink-0 items-center gap-4 max-sm:gap-1">
-146
View File
@@ -1,146 +0,0 @@
<script setup lang="ts">
import { computed, onMounted, ref } from "vue";
import { RouterLink, useRoute, useRouter } from "vue-router";
import PageHeader from "@/base/PageHeader.vue";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { DataTable, type DataTableColumn } from "@/components/ui/data-table";
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
import { Empty, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
import { MoreMenu } from "@/components/ui/more-menu";
import { ReadError } from "@/components/ui/read-error";
import { Skeleton } from "@/components/ui/skeleton";
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { Timestamp } from "@/components/ui/timestamp";
import { errors } from "@/copy/errors";
import { api, describeError, type ActionType, type Judge } from "@/lib/api";
import { useRead } from "@/lib/use-read";
import { stateLabel } from "@/runs/state";
import ActionTypeDetail from "./ActionTypeDetail.vue";
import PolicyText from "./PolicyText.vue";
/** What bounds every action: hard rules, change-request rules, the guards'
* judges, and the approval level each action type has earned. */
const judges = useRead(() => api.judges());
const actionTypes = useRead(() => api.actionTypes());
onMounted(() => {
void judges.reload();
void actionTypes.reload();
});
const route = useRoute();
const router = useRouter();
const TABS = [
{ id: "rules", label: "Rules" },
{ id: "guards", label: "Guards" },
{ id: "action-types", label: "Action types" },
];
const tab = computed(() => (TABS.some((t) => t.id === route.query.tab) ? String(route.query.tab) : "rules"));
const show = (id: unknown) => void router.replace({ query: { ...route.query, tab: id === "rules" ? undefined : String(id) } });
const judgeColumns: DataTableColumn<Judge>[] = [
{ id: "name", label: "Guard", fixed: true, width: "auto", sort: (j) => j.name },
{ id: "mode", label: "Mode", fixed: true, width: "8rem" },
{ id: "status", label: "Status", hide: "sm", width: "8rem" },
{ id: "latest", label: "Last evaluation", hide: "md", width: "24rem" },
];
const actionTypeColumns: DataTableColumn<ActionType>[] = [
{ id: "action", label: "Action", fixed: true, width: "auto", sort: (c) => `${c.connector}.${c.action}` },
{ id: "target", label: "Target", hide: "md", width: "14rem", sort: (c) => c.target_kind ?? "" },
{ id: "level", label: "Level", fixed: true, width: "13rem", sort: (c) => c.level },
{ id: "count", label: "Approved in a row", hide: "md", width: "11rem", sort: (c) => c.count },
{ id: "decisions", label: "Decisions", hidden: true, hide: "md", width: "7rem", sort: (c) => c.decisions },
{ id: "last", label: "Last decided", hide: "sm", width: "9rem", sort: (c) => (c.last_decided_at ? Date.parse(c.last_decided_at) : 0) },
];
const resetError = ref("");
async function reset(c: ActionType): Promise<void> {
resetError.value = "";
try {
await api.resetActionType(c.id);
} catch (cause) {
resetError.value = describeError(cause, errors.common.unknown);
}
await actionTypes.reload();
}
</script>
<template>
<div>
<PageHeader title="Controls" />
<Tabs :model-value="tab" class="mb-4" @update:model-value="show">
<TabsList variant="line" class="w-full justify-start">
<TabsTrigger v-for="t in TABS" :key="t.id" :value="t.id" class="flex-none px-3">{{ t.label }}</TabsTrigger>
</TabsList>
</Tabs>
<template v-if="tab === 'rules'">
<PolicyText kind="hard-rules" title="Hard rules" />
<PolicyText kind="change-request" title="Change-request rules" />
</template>
<div v-else-if="tab === 'guards'">
<ReadError v-if="judges.error.value" :message="judges.error.value" retry-label="Retry" @retry="judges.reload" />
<Skeleton v-else-if="!judges.data.value" class="h-16 w-full" />
<DataTable v-else :columns="judgeColumns" :rows="judges.data.value" :row-key="(j) => j.installation_id || j.name" storage-key="judges">
<template #cell-name="{ row }">
<span class="font-medium">{{ row.name }}</span>
<Badge v-if="row.built_in" variant="outline" class="ml-1.5">Built-in</Badge>
<template v-else>
<span v-if="row.version" class="ml-1 text-caption text-fg-subtle">{{ row.version }}</span>
<Badge v-if="row.scope" variant="outline" class="ml-1.5">{{ row.scope }}</Badge>
</template>
</template>
<template #cell-mode="{ row }">
<Badge :variant="row.advisory ? 'idle' : 'ok'" :title="row.latest?.advisory_reason || undefined">{{ row.advisory ? "Advisory" : "Enforcing" }}</Badge>
</template>
<template #cell-status="{ row }">
<Badge v-if="row.built_in || row.state === 'running'" variant="ok">Running</Badge>
<Badge v-else-if="row.state === 'failed' || row.error" variant="danger" :title="row.error || undefined">Failed</Badge>
<Badge v-else variant="idle">{{ row.enabled === false ? "Disabled" : row.state || "Stopped" }}</Badge>
</template>
<template #cell-latest="{ row }">
<span v-if="row.latest" class="text-caption">
<Timestamp :at="row.latest.at" /><template v-if="row.latest.model"> · {{ row.latest.model }}</template><template v-if="row.latest.answer"> · {{ row.latest.answer }}</template>
<Badge v-if="row.latest.trusted === false" variant="warn" class="ml-1">Not trusted</Badge>
</span>
</template>
<template #actions="{ row }">
<Button
v-if="!row.built_in && row.installation_id"
as-child
variant="ghost"
size="sm"
><RouterLink :to="{ path: '/settings/extensions', query: { tab: 'installations', configure: row.installation_id } }">Configure</RouterLink></Button>
</template>
<template #empty><Empty><EmptyHeader><EmptyTitle>No guards</EmptyTitle></EmptyHeader></Empty></template>
</DataTable>
<div class="mt-3 flex flex-wrap gap-4 text-caption text-fg-muted">
<RouterLink class="underline" :to="{ path: '/settings/extensions', query: { tab: 'packages', kind: 'guards' } }">Manage guards</RouterLink>
<RouterLink class="underline" :to="{ path: '/settings/extensions', query: { tab: 'marketplace', kind: 'guards' } }">Browse guard extensions</RouterLink>
</div>
</div>
<div v-else>
<p v-if="resetError" role="alert" class="mb-2 text-caption text-danger">{{ resetError }}</p>
<ReadError v-if="actionTypes.error.value" :message="actionTypes.error.value" retry-label="Retry" @retry="actionTypes.reload" />
<Skeleton v-else-if="!actionTypes.data.value" class="h-16 w-full" />
<DataTable v-else :columns="actionTypeColumns" :rows="actionTypes.data.value" :row-key="(c) => c.id" storage-key="action-types">
<template #cell-action="{ row }"><span class="font-mono text-caption">{{ row.connector }}.{{ row.action }}</span></template>
<template #cell-target="{ row }">{{ row.target_kind }}<span v-if="row.environment" class="text-caption text-fg-muted"> · {{ row.environment }}</span></template>
<template #cell-level="{ row }">
<Badge variant="outline" :title="row.tightened_because || undefined">{{ stateLabel(row.level) }}</Badge>
<span v-if="row.level !== row.default" class="text-caption text-fg-muted"> from {{ stateLabel(row.default) }}</span>
</template>
<template #cell-count="{ row }">{{ row.count }}</template>
<template #cell-decisions="{ row }">{{ row.decisions }}</template>
<template #cell-last="{ row }"><Timestamp :at="row.last_decided_at" /></template>
<template #detail="{ row }"><ActionTypeDetail :id="row.id" /></template>
<template #actions="{ row }">
<MoreMenu :label="`${row.connector}.${row.action} actions`">
<DropdownMenuItem :disabled="row.level === row.default" @select="reset(row)">Reset to {{ stateLabel(row.default) }}</DropdownMenuItem>
</MoreMenu>
</template>
<template #empty><Empty><EmptyHeader><EmptyTitle>No action types</EmptyTitle></EmptyHeader></Empty></template>
</DataTable>
</div>
</div>
</template>
-15
View File
@@ -1,15 +0,0 @@
<script setup lang="ts">
import PageHeader from "@/base/PageHeader.vue";
import LogActions from "./LogActions.vue";
import LogStream from "./LogStream.vue";
import { useLogs } from "./state";
useLogs();
</script>
<template>
<PageHeader title="Logs">
<LogActions />
</PageHeader>
<LogStream />
</template>
@@ -1,5 +1,12 @@
<script setup lang="ts">
import PageHeader from "./PageHeader.vue";
definePage({
name: "not-found",
meta: {
nav: false,
},
});
import PageHeader from "@/base/PageHeader.vue";
import { Empty, EmptyDescription, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
import { errors } from "@/copy/errors";
</script>
@@ -1,4 +1,12 @@
<script setup lang="ts">
definePage({
name: "system-appearance",
meta: {
label: "Appearance",
description: "Theme, density and motion.",
},
});
import { storeToRefs } from "pinia";
import PageHeader from "@/base/PageHeader.vue";
@@ -1,4 +1,12 @@
<script setup lang="ts">
definePage({
name: "account",
meta: {
label: "Your account",
description: "Password, recovery code, passkeys and personal API tokens.",
},
});
import { Item, ItemActions, ItemContent, ItemGroup } from "@/components/ui/item";
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@/components/ui/alert-dialog";
import { Alert, AlertDescription } from "@/components/ui/alert";
@@ -13,7 +21,7 @@ import { SettingRow } from "@/components/ui/setting-row";
import { Section } from "@/components/ui/section";
import { api, classifyActionError, describeError } from "@/lib/api";
import { errors } from "@/copy/errors";
import { passkeysAvailable,useAccountsStore,usePasskey } from "./accounts";
import { passkeysAvailable,useAccountsStore,usePasskey } from "@/accounts/accounts";
const recovery=ref("");
const makeRecovery=()=>run(async()=>{recovery.value=(await api.recoveryCode()).code});
const accounts=useAccountsStore();const keys=ref<{id:string;name:string}[]>([]);const pending=ref<{id:string;name:string}|null>(null);const error=ref("");const sessionExpired=ref(false);const busy=ref(false);const keyName=ref("");const current=ref("");const next=ref("");
+55
View File
@@ -0,0 +1,55 @@
<script setup lang="ts">
import { computed } from "vue";
import { useRoute, useRouter } from "vue-router";
import PageHeader from "@/base/PageHeader.vue";
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
definePage({
meta: {
label: "Controls",
description: "Hard rules, change-request rules, guards and action types.",
navPath: "/controls",
section: "controls",
},
});
const TABS = [
{ id: "rules", path: "/controls", label: "Rules" },
{ id: "guards", path: "/controls/guards", label: "Guards" },
{ id: "action-types", path: "/controls/action-types", label: "Action types" },
] as const;
const route = useRoute();
const router = useRouter();
const isDetail = computed(
() => route.name === "controls-guard" || route.name === "controls-action-type",
);
const activeTab = computed(() => {
if (route.path.startsWith("/controls/guards")) return "guards";
if (route.path.startsWith("/controls/action-types")) return "action-types";
return "rules";
});
function navigate(id: unknown): void {
const target = TABS.find((t) => t.id === id);
if (target && route.path !== target.path) {
void router.push(target.path);
}
}
</script>
<template>
<div>
<template v-if="!isDetail">
<PageHeader title="Controls" />
<Tabs :model-value="activeTab" class="mb-4" @update:model-value="navigate">
<TabsList variant="line" class="w-full justify-start">
<TabsTrigger v-for="t in TABS" :key="t.id" :value="t.id" class="flex-none px-3">{{ t.label }}</TabsTrigger>
</TabsList>
</Tabs>
</template>
<RouterView />
</div>
</template>
@@ -0,0 +1,98 @@
<script setup lang="ts">
import { computed, onMounted, ref, watch } from "vue";
import { RouterLink, useRoute } from "vue-router";
import PageHeader from "@/base/PageHeader.vue";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { MetadataList } from "@/components/ui/metadata-list";
import { ReadError } from "@/components/ui/read-error";
import { Section } from "@/components/ui/section";
import { Skeleton } from "@/components/ui/skeleton";
import ActionTypeDetail from "@/controls/ActionTypeDetail.vue";
import { errors } from "@/copy/errors";
import { api, describeError } from "@/lib/api";
import { useRead } from "@/lib/use-read";
import { stateLabel } from "@/runs/state";
definePage({
name: "controls-action-type",
meta: {
label: "Action type",
nav: false,
navPath: "/controls",
section: "controls",
},
});
const route = useRoute("controls-action-type");
const id = computed(() => String(route.params.id));
const { data, error, reload } = useRead(() => api.actionType(id.value));
onMounted(() => void reload());
watch(id, () => void reload());
const details = computed(() => {
const c = data.value;
if (!c) return [];
return [
{ label: "Action", value: `${c.connector}.${c.action}`, mono: true },
...(c.target_kind ? [{ label: "Target", value: c.environment ? `${c.target_kind} · ${c.environment}` : c.target_kind }] : []),
{ label: "Level", value: stateLabel(c.level) },
{ label: "Default", value: stateLabel(c.default) },
{ label: "Approved in a row", value: String(c.count) },
{ label: "Decisions", value: String(c.decisions) },
];
});
const resetError = ref("");
const resetting = ref(false);
async function reset(): Promise<void> {
if (!data.value) return;
resetError.value = "";
resetting.value = true;
try {
await api.resetActionType(data.value.id);
} catch (cause) {
resetError.value = describeError(cause, errors.common.unknown);
} finally {
resetting.value = false;
}
await reload();
}
</script>
<template>
<div>
<PageHeader :title="data ? `${data.connector}.${data.action}` : id">
<template #actions>
<Button as-child variant="outline" size="sm"><RouterLink to="/controls/action-types">All action types</RouterLink></Button>
<Button
v-if="data"
variant="outline"
size="sm"
:disabled="resetting || data.level === data.default"
@click="reset"
>Reset to {{ stateLabel(data.default) }}</Button>
</template>
</PageHeader>
<p v-if="resetError" role="alert" class="mb-3 text-caption text-danger">{{ resetError }}</p>
<ReadError v-if="error" :message="error" retry-label="Retry" @retry="reload" />
<Skeleton v-else-if="!data" class="h-32 w-full" />
<div v-else class="space-y-4">
<div class="flex flex-wrap items-center gap-2">
<Badge variant="outline" :title="data.tightened_because || undefined">{{ stateLabel(data.level) }}</Badge>
<span v-if="data.level !== data.default" class="text-caption text-fg-muted">from {{ stateLabel(data.default) }}</span>
</div>
<Section title="Details">
<MetadataList :rows="details" />
</Section>
<Section title="History">
<ActionTypeDetail :id="id" />
</Section>
</div>
</div>
</template>
@@ -0,0 +1,88 @@
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { Badge } from "@/components/ui/badge";
import { DataTable, type DataTableColumn } from "@/components/ui/data-table";
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
import { Empty, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
import { MoreMenu } from "@/components/ui/more-menu";
import { ReadError } from "@/components/ui/read-error";
import { Skeleton } from "@/components/ui/skeleton";
import { Timestamp } from "@/components/ui/timestamp";
import { errors } from "@/copy/errors";
import { api, describeError, type ActionType } from "@/lib/api";
import { useRead } from "@/lib/use-read";
import { stateLabel } from "@/runs/state";
definePage({
name: "controls-action-types",
meta: {
label: "Action types",
description: "Approval levels each action type has earned.",
navPath: "/controls",
section: "controls",
},
});
const actionTypes = useRead(() => api.actionTypes());
onMounted(() => void actionTypes.reload());
const actionTypePath = (c: ActionType) => `/controls/action-types/${encodeURIComponent(c.id)}`;
const actionTypeColumns: DataTableColumn<ActionType>[] = [
{ id: "action", label: "Action", fixed: true, width: "auto", sort: (c) => `${c.connector}.${c.action}` },
{ id: "target", label: "Target", hide: "md", width: "14rem", sort: (c) => c.target_kind ?? "" },
{ id: "level", label: "Level", fixed: true, width: "13rem", sort: (c) => c.level },
{ id: "count", label: "Approved in a row", hide: "md", width: "11rem", sort: (c) => c.count },
{ id: "decisions", label: "Decisions", hidden: true, hide: "md", width: "7rem", sort: (c) => c.decisions },
{ id: "last", label: "Last decided", hide: "sm", width: "9rem", sort: (c) => (c.last_decided_at ? Date.parse(c.last_decided_at) : 0) },
];
const resetError = ref("");
async function reset(c: ActionType): Promise<void> {
resetError.value = "";
try {
await api.resetActionType(c.id);
} catch (cause) {
resetError.value = describeError(cause, errors.common.unknown);
}
await actionTypes.reload();
}
</script>
<template>
<div>
<p v-if="resetError" role="alert" class="mb-2 text-caption text-danger">{{ resetError }}</p>
<ReadError v-if="actionTypes.error.value" :message="actionTypes.error.value" retry-label="Retry" @retry="actionTypes.reload" />
<Skeleton v-else-if="!actionTypes.data.value" class="h-16 w-full" />
<DataTable
v-else
:columns="actionTypeColumns"
:rows="actionTypes.data.value"
:row-key="(c) => c.id"
:row-link="actionTypePath"
:row-label="(c) => `${c.connector}.${c.action}`"
storage-key="action-types"
>
<template #cell-action="{ row }">
<span class="font-mono text-caption">{{ row.connector }}.{{ row.action }}</span>
</template>
<template #cell-target="{ row }">{{ row.target_kind }}<span v-if="row.environment" class="text-caption text-fg-muted"> · {{ row.environment }}</span></template>
<template #cell-level="{ row }">
<Badge variant="outline" :title="row.tightened_because || undefined">{{ stateLabel(row.level) }}</Badge>
<span v-if="row.level !== row.default" class="text-caption text-fg-muted"> from {{ stateLabel(row.default) }}</span>
</template>
<template #cell-count="{ row }">{{ row.count }}</template>
<template #cell-decisions="{ row }">{{ row.decisions }}</template>
<template #cell-last="{ row }"><Timestamp :at="row.last_decided_at" /></template>
<template #actions="{ row }">
<div @click.stop>
<MoreMenu :label="`${row.connector}.${row.action} actions`">
<DropdownMenuItem :disabled="row.level === row.default" @select="reset(row)">Reset to {{ stateLabel(row.default) }}</DropdownMenuItem>
</MoreMenu>
</div>
</template>
<template #empty><Empty><EmptyHeader><EmptyTitle>No action types</EmptyTitle></EmptyHeader></Empty></template>
</DataTable>
</div>
</template>
+136
View File
@@ -0,0 +1,136 @@
<script setup lang="ts">
import { computed, onMounted } from "vue";
import { RouterLink, useRoute } from "vue-router";
import PageHeader from "@/base/PageHeader.vue";
import { Alert, AlertDescription } from "@/components/ui/alert";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Empty, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
import { MetadataList } from "@/components/ui/metadata-list";
import { ReadError } from "@/components/ui/read-error";
import { Section } from "@/components/ui/section";
import { Skeleton } from "@/components/ui/skeleton";
import { Timestamp } from "@/components/ui/timestamp";
import { api } from "@/lib/api";
import { useRead } from "@/lib/use-read";
definePage({
name: "controls-guard",
meta: {
label: "Guard",
nav: false,
navPath: "/controls",
section: "controls",
},
});
const route = useRoute("controls-guard");
const id = computed(() => String(route.params.id));
const { data, error, reload } = useRead(() => api.judges());
onMounted(() => void reload());
const guard = computed(() => {
const list = data.value ?? [];
return list.find((j) => j.installation_id === id.value || j.name === id.value) ?? null;
});
const statusLabel = computed(() => {
const g = guard.value;
if (!g) return "";
if (g.built_in || g.state === "running") return "Running";
if (g.state === "failed" || g.error) return "Failed";
return g.enabled === false ? "Disabled" : g.state || "Stopped";
});
const statusVariant = computed(() => {
const g = guard.value;
if (!g) return "idle" as const;
if (g.built_in || g.state === "running") return "ok" as const;
if (g.state === "failed" || g.error) return "danger" as const;
return "idle" as const;
});
const details = computed(() => {
const g = guard.value;
if (!g) return [];
return [
{ label: "Kind", value: g.built_in ? "Built-in" : "Extension" },
{ label: "Mode", value: g.advisory ? "Advisory" : "Enforcing" },
{ label: "Status", value: statusLabel.value },
...(g.package ? [{ label: "Package", value: g.package, mono: true }] : []),
...(g.version ? [{ label: "Version", value: g.version, mono: true }] : []),
...(g.scope ? [{ label: "Scope", value: g.scope }] : []),
...(g.installation_id ? [{ label: "Installation", value: g.installation_id, mono: true }] : []),
...(g.digest ? [{ label: "Digest", value: g.digest, mono: true }] : []),
];
});
const settingsEntries = computed(() => {
const g = guard.value;
if (!g?.settings) return [];
const labels = new Map((g.settings_schema ?? []).map((f) => [f.key, f.label || f.key]));
return Object.entries(g.settings).map(([key, value]) => ({
label: labels.get(key) ?? key,
value,
mono: true,
}));
});
</script>
<template>
<div>
<PageHeader :title="guard?.name ?? id">
<template #actions>
<Button as-child variant="outline" size="sm"><RouterLink to="/controls/guards">All guards</RouterLink></Button>
<Button
v-if="guard && !guard.built_in && guard.installation_id"
as-child
size="sm"
><RouterLink :to="{ path: '/settings/extensions', query: { tab: 'installations', configure: guard.installation_id } }">Configure</RouterLink></Button>
</template>
</PageHeader>
<ReadError v-if="error" :message="error" retry-label="Retry" @retry="reload" />
<Skeleton v-else-if="!data" class="h-32 w-full" />
<Empty v-else-if="!guard">
<EmptyHeader><EmptyTitle>Guard not found</EmptyTitle></EmptyHeader>
</Empty>
<div v-else class="space-y-4">
<div class="flex flex-wrap items-center gap-2">
<Badge :variant="guard.advisory ? 'idle' : 'ok'" :title="guard.latest?.advisory_reason || undefined">{{ guard.advisory ? "Advisory" : "Enforcing" }}</Badge>
<Badge :variant="statusVariant">{{ statusLabel }}</Badge>
<Badge v-if="guard.built_in" variant="outline">Built-in</Badge>
<Badge v-if="guard.scope" variant="outline">{{ guard.scope }}</Badge>
</div>
<Alert v-if="guard.error" variant="destructive">
<AlertDescription>{{ guard.error }}</AlertDescription>
</Alert>
<Section title="Details">
<MetadataList :rows="details" />
</Section>
<Section title="Last evaluation">
<template v-if="guard.latest">
<div class="flex flex-wrap items-center gap-2 text-caption">
<Timestamp v-if="guard.latest.at" :at="guard.latest.at" />
<span v-if="guard.latest.model" class="font-mono">{{ guard.latest.model }}</span>
<Badge v-if="guard.latest.answer" variant="outline">{{ guard.latest.answer }}</Badge>
<Badge v-if="guard.latest.trusted === false" variant="warn">Not trusted</Badge>
</div>
<p v-if="guard.latest.advisory_reason" class="mt-2 text-caption text-fg-muted">{{ guard.latest.advisory_reason }}</p>
</template>
<Empty v-else>
<EmptyHeader><EmptyTitle>No evaluations yet</EmptyTitle></EmptyHeader>
</Empty>
</Section>
<Section v-if="settingsEntries.length" title="Settings">
<MetadataList :rows="settingsEntries" />
</Section>
</div>
</div>
</template>
+90
View File
@@ -0,0 +1,90 @@
<script setup lang="ts">
import { onMounted } from "vue";
import { RouterLink } from "vue-router";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { DataTable, type DataTableColumn } from "@/components/ui/data-table";
import { Empty, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
import { ReadError } from "@/components/ui/read-error";
import { Skeleton } from "@/components/ui/skeleton";
import { Timestamp } from "@/components/ui/timestamp";
import { api, type Judge } from "@/lib/api";
import { useRead } from "@/lib/use-read";
definePage({
name: "controls-guards",
meta: {
label: "Guards",
description: "Judges that inspect actions before they run.",
navPath: "/controls",
section: "controls",
},
});
const judges = useRead(() => api.judges());
onMounted(() => void judges.reload());
const judgeKey = (j: Judge) => j.installation_id || j.name;
const guardPath = (j: Judge) => `/controls/guards/${encodeURIComponent(judgeKey(j))}`;
const judgeColumns: DataTableColumn<Judge>[] = [
{ id: "name", label: "Guard", fixed: true, width: "auto", sort: (j) => j.name },
{ id: "mode", label: "Mode", fixed: true, width: "8rem" },
{ id: "status", label: "Status", hide: "sm", width: "8rem" },
{ id: "latest", label: "Last evaluation", hide: "md", width: "24rem" },
];
</script>
<template>
<div>
<ReadError v-if="judges.error.value" :message="judges.error.value" retry-label="Retry" @retry="judges.reload" />
<Skeleton v-else-if="!judges.data.value" class="h-16 w-full" />
<DataTable
v-else
:columns="judgeColumns"
:rows="judges.data.value"
:row-key="judgeKey"
:row-link="guardPath"
:row-label="(j) => j.name"
storage-key="judges"
>
<template #cell-name="{ row }">
<span class="font-medium">{{ row.name }}</span>
<Badge v-if="row.built_in" variant="outline" class="ml-1.5">Built-in</Badge>
<template v-else>
<span v-if="row.version" class="ml-1 text-caption text-fg-subtle">{{ row.version }}</span>
<Badge v-if="row.scope" variant="outline" class="ml-1.5">{{ row.scope }}</Badge>
</template>
</template>
<template #cell-mode="{ row }">
<Badge :variant="row.advisory ? 'idle' : 'ok'" :title="row.latest?.advisory_reason || undefined">{{ row.advisory ? "Advisory" : "Enforcing" }}</Badge>
</template>
<template #cell-status="{ row }">
<Badge v-if="row.built_in || row.state === 'running'" variant="ok">Running</Badge>
<Badge v-else-if="row.state === 'failed' || row.error" variant="danger" :title="row.error || undefined">Failed</Badge>
<Badge v-else variant="idle">{{ row.enabled === false ? "Disabled" : row.state || "Stopped" }}</Badge>
</template>
<template #cell-latest="{ row }">
<span v-if="row.latest" class="text-caption">
<Timestamp :at="row.latest.at" /><template v-if="row.latest.model"> · {{ row.latest.model }}</template><template v-if="row.latest.answer"> · {{ row.latest.answer }}</template>
<Badge v-if="row.latest.trusted === false" variant="warn" class="ml-1">Not trusted</Badge>
</span>
</template>
<template #actions="{ row }">
<Button
v-if="!row.built_in && row.installation_id"
as-child
variant="ghost"
size="sm"
@click.stop
><RouterLink :to="{ path: '/settings/extensions', query: { tab: 'installations', configure: row.installation_id } }">Configure</RouterLink></Button>
</template>
<template #empty><Empty><EmptyHeader><EmptyTitle>No guards</EmptyTitle></EmptyHeader></Empty></template>
</DataTable>
<div class="mt-3 flex flex-wrap gap-4 text-caption text-fg-muted">
<RouterLink class="underline" :to="{ path: '/settings/extensions', query: { tab: 'packages', kind: 'guards' } }">Manage guards</RouterLink>
<RouterLink class="underline" :to="{ path: '/settings/extensions', query: { tab: 'marketplace', kind: 'guards' } }">Browse guard extensions</RouterLink>
</div>
</div>
</template>
+27
View File
@@ -0,0 +1,27 @@
<script setup lang="ts">
import PolicyText from "@/controls/PolicyText.vue";
definePage({
name: "controls",
// Legacy ?tab= links land on the dedicated sub-routes.
beforeEnter: (to) => {
const { tab, ...query } = to.query;
if (tab === "guards") return { path: "/controls/guards", query, replace: true };
if (tab === "action-types") return { path: "/controls/action-types", query, replace: true };
return true;
},
meta: {
label: "Controls",
description: "Hard rules, change-request rules, guards and action types.",
navPath: "/controls",
section: "controls",
},
});
</script>
<template>
<div>
<PolicyText kind="hard-rules" title="Hard rules" />
<PolicyText kind="change-request" title="Change-request rules" />
</div>
</template>
@@ -1,4 +1,13 @@
<script setup lang="ts">
definePage({
name: "events",
meta: {
label: "Events",
description: "Received events, their sources, and the triggers that start workflows.",
section: "events",
},
});
import { Badge } from "@/components/ui/badge";
import { enabled as captureEnabled, loading as captureLoading } from "@/captures/state";
import { computed, onMounted, ref, watch, type Component } from "vue";
@@ -13,11 +22,11 @@ import CapturesPage from "@/captures/CapturesPage.vue";
import { api } from "@/lib/api";
import { useLiveResource, useSessionStore } from "@/stores/session";
import MappingsPage from "@/mappings/MappingsPage.vue";
import EventList from "./EventList.vue";
import SourceList from "./SourceList.vue";
import TriggerList from "./TriggerList.vue";
import { activeTab, availableTabs, stepsFor } from "./tab-selection";
import { loadEventCounts, type EventsCounts } from "./counts";
import EventList from "@/events/EventList.vue";
import SourceList from "@/events/SourceList.vue";
import TriggerList from "@/events/TriggerList.vue";
import { activeTab, availableTabs, stepsFor } from "@/events/tab-selection";
import { loadEventCounts, type EventsCounts } from "@/events/counts";
/**
* The Events surfaces: what arrived, how its fields are read, and which workflow
@@ -1,10 +1,19 @@
<script setup lang="ts">
definePage({
name: "dashboard",
meta: {
label: "Dashboard",
description: "Health, what waits on a person, and recent runs.",
section: "home",
},
});
import { useSystemHealth } from "@/lib/system-health";
import HealthCard from "./HealthCard.vue";
import NeedsAttentionCard from "./NeedsAttentionCard.vue";
import RecentRunsCard from "./RecentRunsCard.vue";
import SetupPanel from "./SetupPanel.vue";
import HealthCard from "@/dashboard/HealthCard.vue";
import NeedsAttentionCard from "@/dashboard/NeedsAttentionCard.vue";
import RecentRunsCard from "@/dashboard/RecentRunsCard.vue";
import SetupPanel from "@/dashboard/SetupPanel.vue";
/** What is wrong, what waits on you, then what ran. */
const { data: health, error, reload } = useSystemHealth();
+24
View File
@@ -0,0 +1,24 @@
<script setup lang="ts">
definePage({
name: "logs",
meta: {
label: "Logs",
description: "Daemon log by level and component.",
section: "logs",
},
});
import PageHeader from "@/base/PageHeader.vue";
import LogActions from "@/logs/LogActions.vue";
import LogStream from "@/logs/LogStream.vue";
import { useLogs } from "@/logs/state";
useLogs();
</script>
<template>
<PageHeader title="Logs">
<LogActions />
</PageHeader>
<LogStream />
</template>
@@ -1,4 +1,13 @@
<script setup lang="ts">
definePage({
name: "memory",
meta: {
label: "Personal memory",
description: "What Archie remembers for you, and the notes shared with the organisation.",
section: "memory",
},
});
import { Plus } from "@lucide/vue";
import { onMounted, ref } from "vue";
@@ -1,4 +1,14 @@
<script setup lang="ts">
definePage({
meta: {
label: "Organisation",
description: "Members, identities, connections, models and automation.",
navPath: "/org",
section: "org",
org: true,
},
});
import { errors } from "@/copy/errors";
import { describeError } from "@/lib/api";
import { Alert, AlertDescription } from "@/components/ui/alert";
@@ -1,4 +1,14 @@
<script setup lang="ts">
definePage({
name: "org-agents",
meta: {
section: "org_agents",
label: "Agents",
navPath: "/org",
description: "Execution identities, their permissions and commit author.",
},
});
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import { Item, ItemGroup } from "@/components/ui/item";
import { Alert, AlertDescription } from "@/components/ui/alert";
@@ -1,4 +1,14 @@
<script setup lang="ts">
definePage({
name: "org-approvals",
meta: {
section: "org_config",
label: "Approvals",
navPath: "/org",
description: "Default owner, escalation path and approval deadline.",
},
});
import { Plus, Trash2 } from "@lucide/vue";
import { computed, onMounted, ref } from "vue";
import { storeToRefs } from "pinia";
@@ -14,7 +24,7 @@ import { SettingRow } from "@/components/ui/setting-row";
import { errors } from "@/copy/errors";
import { api, describeError, type OrgSettings } from "@/lib/api";
import { useOrgStore } from "@/stores/org";
import type { Member } from "./org";
import type { Member } from "@/org/org";
// The select has no empty option value, so "no default owner" is this marker.
const NONE = "none";
@@ -1,4 +1,14 @@
<script setup lang="ts">
definePage({
name: "audit",
meta: {
section: "org_audit",
label: "Audit",
navPath: "/org",
description: "Settings, access, identity and runtime events.",
},
});
import UserReference from "@/org/UserReference.vue";
import { Alert, AlertDescription } from "@/components/ui/alert";
import { ReadError } from "@/components/ui/read-error";
@@ -48,9 +58,9 @@ import { Spinner } from "@/components/ui/spinner";
import { Timestamp } from "@/components/ui/timestamp";
import { useSessionStore } from "@/stores/session";
import { useSettingsStore } from "@/stores/settings";
import AuditDetail from "./AuditDetail.vue";
import AuditExportMenu from "./AuditExportMenu.vue";
import AuditFilters from "./AuditFilters.vue";
import AuditDetail from "@/audit/AuditDetail.vue";
import AuditExportMenu from "@/audit/AuditExportMenu.vue";
import AuditFilters from "@/audit/AuditFilters.vue";
import {
badgeFor,
dedupeRecords,
@@ -67,8 +77,8 @@ import {
type AuditQuery,
type AuditRecord,
type SavedAuditView,
} from "./audit";
import { useAuditStore } from "./store";
} from "@/audit/audit";
import { useAuditStore } from "@/audit/store";
const audit = useAuditStore();
const settings = useSettingsStore();
@@ -1,4 +1,14 @@
<script setup lang="ts">
definePage({
name: "org-channels",
meta: {
label: "Channels",
navPath: "/org",
description: "Chat channels.",
section: "channels",
},
});
import { Alert, AlertDescription } from "@/components/ui/alert";
import ApplyStatusRows from "@/settings/ApplyStatusRows.vue";
import HistoryLink from "@/settings/HistoryLink.vue";
@@ -1,4 +1,14 @@
<script setup lang="ts">
definePage({
name: "org-decisions",
meta: {
section: "org_decisions",
label: "Access decisions",
navPath: "/org",
description: "Access requests the policy chain allowed or refused, newest first.",
},
});
import { storeToRefs } from "pinia";
import { onMounted } from "vue";
@@ -15,7 +25,7 @@ import { Spinner } from "@/components/ui/spinner";
import { Timestamp } from "@/components/ui/timestamp";
import { useDecisionsStore } from "@/stores/decisions";
import UserReference from "@/org/UserReference.vue";
import { decisionResource, type AccessDecision } from "./decisions";
import { decisionResource, type AccessDecision } from "@/audit/decisions";
const store = useDecisionsStore();
const { decisions, filters, more, loading, error } = storeToRefs(store);
@@ -1,4 +1,13 @@
<script setup lang="ts">
definePage({
name: "org-overview",
meta: {
label: "Overview",
navPath: "/org",
description: "What this organisation holds and how work is going.",
},
});
import { ArrowRight, Pencil } from "@lucide/vue";
import { computed, onMounted, ref } from "vue";
@@ -24,8 +33,8 @@ import { hiddenPaths } from "@/lib/nav";
import { ApiError, api, describeError } from "@/lib/api";
import { useOrgStore } from "@/stores/org";
import { useSessionStore } from "@/stores/session";
import type { OrgEvent } from "./org";
import UserReference from "./UserReference.vue";
import type { OrgEvent } from "@/org/org";
import UserReference from "@/org/UserReference.vue";
/**
* The organisation home: where each kind of organisation configuration lives,
@@ -1,4 +1,14 @@
<script setup lang="ts">
definePage({
name: "org-instructions",
meta: {
section: "org_config",
label: "Instructions",
navPath: "/org",
description: "Standing instructions given to every agent in the organisation.",
},
});
import { computed, onMounted, watch } from "vue";
import { Alert, AlertDescription } from "@/components/ui/alert";
import { Section } from "@/components/ui/section";
@@ -1,4 +1,14 @@
<script setup lang="ts">
definePage({
name: "org-issue-routing",
meta: {
section: "org_work_intake",
label: "Issue routing",
navPath: "/org",
description: "Which workflow an issue runs by its labels.",
},
});
import { ArrowDown, ArrowUp, Trash2 } from "@lucide/vue";
import { computed, onMounted, ref } from "vue";
@@ -12,9 +22,9 @@ import { Section } from "@/components/ui/section";
import { SettingRow } from "@/components/ui/setting-row";
import { useSettingsStore } from "@/stores/settings";
import { useWorkflowsStore } from "@/stores/workflows";
import ApplyStatusRows from "./ApplyStatusRows.vue";
import HistoryLink from "./HistoryLink.vue";
import KindGate from "./KindGate.vue";
import ApplyStatusRows from "@/settings/ApplyStatusRows.vue";
import HistoryLink from "@/settings/HistoryLink.vue";
import KindGate from "@/settings/KindGate.vue";
const KIND = "intake-routes";
@@ -1,4 +1,14 @@
<script setup lang="ts">
definePage({
name: "org-members",
meta: {
section: "org_members",
label: "Members",
navPath: "/org",
description: "People in the organisation and their roles.",
},
});
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@/components/ui/alert-dialog";
import { Alert, AlertDescription } from "@/components/ui/alert";
@@ -33,8 +43,8 @@ import {
import { api, describeError } from "@/lib/api";
import { errors } from "@/copy/errors";
import { useOrgStore } from "@/stores/org";
import { ROLE_LABELS, ROLES, type Candidate, type Member, type Role } from "./org";
import UserReference from "./UserReference.vue";
import { ROLE_LABELS, ROLES, type Candidate, type Member, type Role } from "@/org/org";
import UserReference from "@/org/UserReference.vue";
/**
* The org's members and the role each holds. A membership is org-wide, or
@@ -1,4 +1,14 @@
<script setup lang="ts">
definePage({
name: "org-policies",
meta: {
section: "org_policies",
label: "Policies",
navPath: "/org",
description: "Access rules for the organisation.",
},
});
import { Spinner } from "@/components/ui/spinner";
import { ReadError } from "@/components/ui/read-error";
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@/components/ui/alert-dialog";
@@ -1,6 +1,16 @@
<script setup lang="ts">
definePage({
name: "org-repositories",
meta: {
section: "org_work_intake",
label: "Repositories",
navPath: "/org",
description: "Repository connections, access checks and execution policies.",
},
});
import { Alert, AlertDescription } from "@/components/ui/alert";
import ApplyStatusRows from "./ApplyStatusRows.vue";
import ApplyStatusRows from "@/settings/ApplyStatusRows.vue";
import { computed, onMounted, ref, watch } from "vue";
import { storeToRefs } from "pinia";
import { Plus } from "@lucide/vue";
@@ -39,11 +49,11 @@ import {
TagsInputItemText,
} from "@/components/ui/tags-input";
import { resourcesForPage, useSettingsStore } from "@/stores/settings";
import CardAccordion from "./CardAccordion.vue";
import CommandListEditor from "./CommandListEditor.vue";
import DraftHint from "./DraftHint.vue";
import HistoryLink from "./HistoryLink.vue";
import KindGate from "./KindGate.vue";
import CardAccordion from "@/settings/CardAccordion.vue";
import CommandListEditor from "@/settings/CommandListEditor.vue";
import DraftHint from "@/settings/DraftHint.vue";
import HistoryLink from "@/settings/HistoryLink.vue";
import KindGate from "@/settings/KindGate.vue";
const KIND = "repository-policies";
@@ -1,6 +1,16 @@
<script setup lang="ts">
definePage({
name: "org-scheduling-policy",
meta: {
section: "org_work_intake",
label: "Scheduling policy",
navPath: "/org",
description: "Work discovery and forge labels.",
},
});
import { Alert, AlertDescription } from "@/components/ui/alert";
import ApplyStatusRows from "./ApplyStatusRows.vue";
import ApplyStatusRows from "@/settings/ApplyStatusRows.vue";
import HistoryLink from "@/settings/HistoryLink.vue";
import { computed, onMounted } from "vue";
import { storeToRefs } from "pinia";
@@ -20,8 +30,8 @@ import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
import { Section } from "@/components/ui/section";
import { useSessionStore } from "@/stores/session";
import { resourcesForPage, useSettingsStore } from "@/stores/settings";
import DraftHint from "./DraftHint.vue";
import { fieldInvalid } from "./settings-form";
import DraftHint from "@/settings/DraftHint.vue";
import { fieldInvalid } from "@/settings/settings-form";
const KIND = "scheduling-policy";
@@ -1,5 +1,15 @@
<script setup lang="ts">
import UserReference from "./UserReference.vue";
definePage({
name: "org-usage",
meta: {
section: "org_usage",
label: "Usage",
navPath: "/org",
description: "Token spend by model, identity and period.",
},
});
import UserReference from "@/org/UserReference.vue";
import { computed, onMounted, ref, watch } from "vue";
import PageHeader from "@/base/PageHeader.vue";
@@ -1,4 +1,14 @@
<script setup lang="ts">
definePage({
name: "org-workspaces",
meta: {
section: "org_workspaces",
label: "Workspaces",
navPath: "/org",
description: "Groups of organisation work and resources.",
},
});
import { Alert, AlertDescription } from "@/components/ui/alert";
import PageHeader from "@/base/PageHeader.vue";
import { Section } from "@/components/ui/section";
@@ -27,7 +37,7 @@ import {
import { ApiError, api, describeError } from "@/lib/api";
import { errors } from "@/copy/errors";
import { useOrgStore } from "@/stores/org";
import type { OrgWorkspace } from "./org";
import type { OrgWorkspace } from "@/org/org";
/**
* The org's workspaces: the division policies and records are scoped to. The
@@ -1,4 +1,14 @@
<script setup lang="ts">
definePage({
name: "proposal",
meta: {
label: "Proposal",
nav: false,
navPath: "/proposals",
section: "proposals",
},
});
import { computed, onMounted, ref, watch } from "vue";
import { RouterLink, useRoute } from "vue-router";
@@ -22,11 +32,11 @@ import { usePoll, useRead } from "@/lib/use-read";
import { useLiveResource } from "@/stores/session";
import { stateLabel, stateTone } from "@/runs/state";
import UserReference from "@/org/UserReference.vue";
import { actionTone, approveProposal, kindLabel, proposalTone } from "./state";
import { actionTone, approveProposal, kindLabel, proposalTone } from "@/proposals/state";
/** A proposal with its evidence, the actions it will take and how each was
* judged, and the answer that approves or rejects it. */
const route = useRoute();
const route = useRoute("proposal");
const id = computed(() => String(route.params.id));
const { data, error, reload } = useRead(() => api.proposal(id.value));
onMounted(reload);
@@ -1,4 +1,13 @@
<script setup lang="ts">
definePage({
name: "proposals",
meta: {
label: "Proposals",
description: "Changes Archie proposes, with their evidence and the actions they take.",
section: "proposals",
},
});
import { onMounted, ref, watch } from "vue";
import PageHeader from "@/base/PageHeader.vue";
@@ -12,7 +21,7 @@ import { Timestamp } from "@/components/ui/timestamp";
import { api, type Proposal, type ProposalState } from "@/lib/api";
import { usePoll, useRead } from "@/lib/use-read";
import { useLiveResource } from "@/stores/session";
import { kindLabel, proposalTone, STATES } from "./state";
import { kindLabel, proposalTone, STATES } from "@/proposals/state";
const state = ref<ProposalState>("pending");
const { data, error, loading, reload } = useRead(() => api.proposals(state.value));
@@ -1,4 +1,14 @@
<script setup lang="ts">
definePage({
name: "run",
meta: {
label: "Run",
nav: false,
navPath: "/runs",
section: "runs",
},
});
import { computed, onMounted, ref, watch } from "vue";
import { RouterLink, useRoute } from "vue-router";
@@ -21,12 +31,12 @@ import AgentTranscript from "@/workflows/AgentTranscript.vue";
import UserReference from "@/org/UserReference.vue";
import { usePoll, useRead } from "@/lib/use-read";
import { useLiveResource } from "@/stores/session";
import ApprovalsSection from "./ApprovalsSection.vue";
import { ended, stateLabel, stateTone } from "./state";
import ApprovalsSection from "@/runs/ApprovalsSection.vue";
import { ended, stateLabel, stateTone } from "@/runs/state";
/** A run's decision trail: where it came from, each action it asked to take
* and how that was judged, and the steps it recorded. */
const route = useRoute();
const route = useRoute("run");
const id = computed(() => String(route.params.id));
const { data, error, reload } = useRead(() => api.run(id.value));
onMounted(reload);
@@ -1,4 +1,13 @@
<script setup lang="ts">
definePage({
name: "runs",
meta: {
label: "Runs",
description: "Workflow runs, their decision trails and waiting approvals.",
section: "runs",
},
});
import { computed, onMounted, ref } from "vue";
import { useRoute } from "vue-router";
import { Search } from "@lucide/vue";
@@ -11,8 +20,8 @@ import { Spinner } from "@/components/ui/spinner";
import { api } from "@/lib/api";
import { usePoll, useRead } from "@/lib/use-read";
import { useLiveResource } from "@/stores/session";
import ApprovalsSection from "./ApprovalsSection.vue";
import RunTable from "./RunTable.vue";
import ApprovalsSection from "@/runs/ApprovalsSection.vue";
import RunTable from "@/runs/RunTable.vue";
const route = useRoute();
const { data, error, reload } = useRead(() => api.runs());
@@ -1,4 +1,15 @@
<script setup lang="ts">
definePage({
name: "settings-agent-profiles",
meta: {
navPath: "/settings",
settings: true,
label: "Agent profiles",
section: "agent_profiles",
description: "Execution profiles: the image and tools each agent runs with.",
},
});
import { Alert, AlertDescription } from "@/components/ui/alert";
import { Empty, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
import { computed, onMounted, ref } from "vue";
@@ -8,9 +19,9 @@ import { Field, FieldContent, FieldDescription, FieldGroup, FieldLabel } from "@
import { Input } from "@/components/ui/input";
import { TagsInput, TagsInputInput, TagsInputItem, TagsInputItemDelete, TagsInputItemText } from "@/components/ui/tags-input";
import { useSettingsStore } from "@/stores/settings";
import ApplyStatusRows from "./ApplyStatusRows.vue";
import CardAccordion from "./CardAccordion.vue";
import HistoryLink from "./HistoryLink.vue";
import ApplyStatusRows from "@/settings/ApplyStatusRows.vue";
import CardAccordion from "@/settings/CardAccordion.vue";
import HistoryLink from "@/settings/HistoryLink.vue";
interface Profile { image?: string; tools?: string[] }
const KIND = "agent-profiles";
@@ -1,4 +1,15 @@
<script setup lang="ts">
definePage({
name: "authentication",
meta: {
navPath: "/settings",
settings: true,
label: "Authentication",
description: "Instance URL and single sign-on providers.",
section: "settings",
},
});
import { ReadError } from "@/components/ui/read-error";
import { Skeleton } from "@/components/ui/skeleton";
import { Check } from "@lucide/vue";
@@ -1,4 +1,15 @@
<script setup lang="ts">
definePage({
name: "settings-channels",
meta: {
navPath: "/settings",
settings: true,
label: "Channels",
description: "Chat channel connections and session defaults.",
section: "channels",
},
});
import { Alert, AlertDescription } from "@/components/ui/alert";
import ApplyStatusRows from "@/settings/ApplyStatusRows.vue";
import KindGate from "@/settings/KindGate.vue";
@@ -1,6 +1,17 @@
<script setup lang="ts">
definePage({
name: "settings-container-runtime",
meta: {
navPath: "/settings",
settings: true,
label: "Container runtime",
description: "How task containers run: runtime, image, limits and egress hosts.",
section: "container_runtime",
},
});
import { Alert, AlertDescription } from "@/components/ui/alert";
import ApplyStatusRows from "./ApplyStatusRows.vue";
import ApplyStatusRows from "@/settings/ApplyStatusRows.vue";
import { computed, onMounted } from "vue";
import { storeToRefs } from "pinia";
import { TriangleAlert } from "@lucide/vue";
@@ -20,11 +31,11 @@ import {
import { Textarea } from "@/components/ui/textarea";
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
import { resourcesForPage, useSettingsStore } from "@/stores/settings";
import DraftHint from "./DraftHint.vue";
import HistoryLink from "./HistoryLink.vue";
import KindGate from "./KindGate.vue";
import SecretRefField from "./SecretRefField.vue";
import { fieldInvalid } from "./settings-form";
import DraftHint from "@/settings/DraftHint.vue";
import HistoryLink from "@/settings/HistoryLink.vue";
import KindGate from "@/settings/KindGate.vue";
import SecretRefField from "@/settings/SecretRefField.vue";
import { fieldInvalid } from "@/settings/settings-form";
const KIND = "container-runtime-policies";
const EXECUTION_KIND = "workflow-execution-settings";
@@ -1,4 +1,15 @@
<script setup lang="ts">
definePage({
name: "settings-credentials",
meta: {
navPath: "/settings",
settings: true,
label: "Credentials",
description: "Sealed credentials extensions and models use.",
section: "credentials",
},
});
import { Plus } from "@lucide/vue";
import { computed, onMounted, ref } from "vue";
@@ -1,4 +1,15 @@
<script setup lang="ts">
definePage({
name: "curators",
meta: {
navPath: "/settings",
settings: true,
label: "Curators",
description: "Scheduled memory and capture curation.",
section: "curators",
},
});
import { Alert, AlertDescription } from "@/components/ui/alert";
import { computed, onMounted, ref, watch } from "vue";
@@ -25,7 +36,7 @@ import {
import { errors } from "@/copy/errors";
import { api, describeError } from "@/lib/api";
import { useLiveResource } from "@/stores/session";
import CuratorCard, { type Curator } from "./CuratorCard.vue";
import CuratorCard, { type Curator } from "@/curators/CuratorCard.vue";
/**
* Backed by GET /api/curators, which reads the daemon's live curator registry:
@@ -1,4 +1,15 @@
<script setup lang="ts">
definePage({
name: "settings-extensions",
meta: {
navPath: "/settings",
settings: true,
label: "Extensions",
description: "Installed extensions, grants and the marketplace.",
section: "extension_catalogue",
},
});
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import { ReadError } from "@/components/ui/read-error";
import { Item, ItemGroup } from "@/components/ui/item";
@@ -38,12 +49,12 @@ import { api, type Extension, type ExtensionScope, type SettingField } from "@/l
import { useRead } from "@/lib/use-read";
import { fromLines, toLines } from "@/lib/lines";
import { stateTone } from "@/runs/state";
import InstallationDialog from "./InstallationDialog.vue";
import PackageList from "./PackageList.vue";
import ExtensionsMarketplace from "./ExtensionsMarketplace.vue";
import CatalogueInstallDialog from "./CatalogueInstallDialog.vue";
import CataloguePreviewDialog from "./CataloguePreviewDialog.vue";
import PackageVersionsDialog from "./PackageVersionsDialog.vue";
import InstallationDialog from "@/settings/InstallationDialog.vue";
import PackageList from "@/settings/PackageList.vue";
import ExtensionsMarketplace from "@/settings/ExtensionsMarketplace.vue";
import CatalogueInstallDialog from "@/settings/CatalogueInstallDialog.vue";
import CataloguePreviewDialog from "@/settings/CataloguePreviewDialog.vue";
import PackageVersionsDialog from "@/settings/PackageVersionsDialog.vue";
const route = useRoute();
const router = useRouter();
@@ -1,4 +1,15 @@
<script setup lang="ts">
definePage({
name: "shared-memory",
meta: {
navPath: "/settings",
settings: true,
label: "Shared memory",
description: "Notes shared with everyone, the proposals waiting for review, and their published versions.",
section: "memory_admin",
},
});
import { onMounted, ref } from "vue";
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@/components/ui/alert-dialog";
@@ -1,4 +1,15 @@
<script setup lang="ts">
definePage({
name: "system-models",
meta: {
navPath: "/settings",
settings: true,
label: "Models",
description: "Model aliases, their providers and the organisation's policy.",
section: "model_aliases",
},
});
import { computed, onMounted, ref, watch } from "vue";
import { Plus, Trash2 } from "@lucide/vue";
@@ -15,7 +26,7 @@ import { api, describeError, type AgentModel, type ModelPolicy, type ModelProvid
import { useRead } from "@/lib/use-read";
import { errors } from "@/copy/errors";
import { useSettingsStore } from "@/stores/settings";
import { canCreateProvider, providerInput } from "./provider-input.ts";
import { canCreateProvider, providerInput } from "@/settings/provider-input.ts";
const store = useSettingsStore();
const providers = useRead(() => api.modelProviders());
@@ -1,4 +1,15 @@
<script setup lang="ts">
definePage({
name: "settings-organisations",
meta: {
navPath: "/settings",
settings: true,
label: "Organisations",
section: "organisations",
description: "The organisations on this instance, and which one is active.",
},
});
import { storeToRefs } from "pinia";
import { onMounted, ref } from "vue";
import { useRouter } from "vue-router";
@@ -1,4 +1,15 @@
<script setup lang="ts">
definePage({
name: "settings-plugins",
meta: {
navPath: "/settings",
settings: true,
label: "Plugins",
description: "Extension directories loaded at startup.",
section: "plugins",
},
});
import { Alert, AlertDescription } from "@/components/ui/alert";
import { computed, onMounted } from "vue";
import { storeToRefs } from "pinia";
@@ -7,11 +18,11 @@ import PageHeader from "@/base/PageHeader.vue";
import { Field, FieldContent, FieldDescription, FieldGroup, FieldLabel } from "@/components/ui/field";
import { Input } from "@/components/ui/input";
import { resourcesForPage, useSettingsStore } from "@/stores/settings";
import ApplyStatusRows from "./ApplyStatusRows.vue";
import DraftHint from "./DraftHint.vue";
import HistoryLink from "./HistoryLink.vue";
import KindGate from "./KindGate.vue";
import { fieldInvalid } from "./settings-form";
import ApplyStatusRows from "@/settings/ApplyStatusRows.vue";
import DraftHint from "@/settings/DraftHint.vue";
import HistoryLink from "@/settings/HistoryLink.vue";
import KindGate from "@/settings/KindGate.vue";
import { fieldInvalid } from "@/settings/settings-form";
const KIND = "plugin-settings";
@@ -1,4 +1,15 @@
<script setup lang="ts">
definePage({
name: "settings-secret-engines",
meta: {
navPath: "/settings",
settings: true,
label: "Secret engines",
section: "secret_engines",
description: "Where secrets are read from: engines, their keys and health.",
},
});
import { Spinner } from "@/components/ui/spinner";
import { Alert, AlertDescription } from "@/components/ui/alert";
import { Empty, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
@@ -1,4 +1,15 @@
<script setup lang="ts">
definePage({
name: "skills",
meta: {
navPath: "/settings",
settings: true,
label: "Skills",
description: "Skills Archie can activate.",
section: "skills",
},
});
import ApplyStatusRows from "@/settings/ApplyStatusRows.vue";
import { useSettingsStore } from "@/stores/settings";
import { computed, onMounted, ref } from "vue";
@@ -16,7 +27,7 @@ import { Input } from "@/components/ui/input";
import { errors } from "@/copy/errors";
import { api, describeError } from "@/lib/api";
import { useLiveResource } from "@/stores/session";
import SkillCard, { type Skill } from "./SkillCard.vue";
import SkillCard, { type Skill } from "@/skills/SkillCard.vue";
const skills = ref<Skill[]>([]);
const loaded = ref(false);
@@ -1,4 +1,15 @@
<script setup lang="ts">
definePage({
name: "system-status",
meta: {
navPath: "/settings",
settings: true,
label: "Status",
description: "Module, connector and runner health, and the running version.",
section: "system_status",
},
});
import { computed, onMounted } from "vue";
import PageHeader from "@/base/PageHeader.vue";
@@ -9,8 +20,8 @@ import { Skeleton } from "@/components/ui/skeleton";
import { api } from "@/lib/api";
import { useSystemHealth } from "@/lib/system-health";
import { useRead } from "@/lib/use-read";
import HealthTables from "./HealthTables.vue";
import InstanceCard from "./InstanceCard.vue";
import HealthTables from "@/settings/HealthTables.vue";
import InstanceCard from "@/settings/InstanceCard.vue";
const { data: health, error, reload } = useSystemHealth();
const startup = useRead(() => api.bootstrap());
@@ -1,7 +1,18 @@
<script setup lang="ts">
definePage({
name: "system-tasks",
meta: {
navPath: "/settings",
settings: true,
label: "Task execution",
description: "Statuses, operator actions, budgets.",
section: "task_execution",
},
});
import { Alert, AlertDescription } from "@/components/ui/alert";
import ApplyStatusRows from "./ApplyStatusRows.vue";
import KindGate from "./KindGate.vue";
import ApplyStatusRows from "@/settings/ApplyStatusRows.vue";
import KindGate from "@/settings/KindGate.vue";
import { computed, onMounted, ref } from "vue";
import { storeToRefs } from "pinia";
@@ -16,8 +27,8 @@ import {
NumberFieldInput,
} from "@/components/ui/number-field";
import { resourcesForPage, useSettingsStore } from "@/stores/settings";
import DraftHint from "./DraftHint.vue";
import HistoryLink from "./HistoryLink.vue";
import DraftHint from "@/settings/DraftHint.vue";
import HistoryLink from "@/settings/HistoryLink.vue";
const KIND = "workflow-execution-settings";
@@ -1,7 +1,18 @@
<script setup lang="ts">
definePage({
name: "settings-tools",
meta: {
navPath: "/settings",
settings: true,
label: "Tools & MCP",
description: "Agent tools and MCP servers.",
section: "tools",
},
});
import { Alert, AlertDescription } from "@/components/ui/alert";
import { Empty, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
import ApplyStatusRows from "./ApplyStatusRows.vue";
import ApplyStatusRows from "@/settings/ApplyStatusRows.vue";
import HistoryLink from "@/settings/HistoryLink.vue";
import { computed, onMounted, ref, watch } from "vue";
import { storeToRefs } from "pinia";
@@ -23,9 +34,9 @@ import {
import { Section } from "@/components/ui/section";
import { Switch } from "@/components/ui/switch";
import { resourcesForPage, useSettingsStore } from "@/stores/settings";
import DraftHint from "./DraftHint.vue";
import McpServerEditor, { type McpServer } from "./McpServerEditor.vue";
import SecretRefField from "./SecretRefField.vue";
import DraftHint from "@/settings/DraftHint.vue";
import McpServerEditor, { type McpServer } from "@/settings/McpServerEditor.vue";
import SecretRefField from "@/settings/SecretRefField.vue";
const KIND = "tool-settings";
@@ -1,20 +1,30 @@
<script setup lang="ts">
definePage({
name: "task-detail",
meta: {
label: "Task run",
nav: false,
navPath: "/tasks",
section: "tasks",
},
});
import { computed } from "vue";
import { useRoute } from "vue-router";
import { Card, CardContent } from "@/components/ui/card";
import { Tabs } from "@/components/ui/tabs";
import TabBar from "./TabBar.vue";
import TaskDetailNotice from "./TaskDetailNotice.vue";
import TaskApproval from "./TaskApproval.vue";
import TaskHeader from "./TaskHeader.vue";
import TaskReviewGate from "./TaskReviewGate.vue";
import TaskNotes from "./TaskNotes.vue";
import TaskRunPanels from "./TaskRunPanels.vue";
import TaskRail from "./TaskRail.vue";
import { parseTaskId } from "./task-run";
import { provideTaskRun } from "./use-task-run";
import TabBar from "@/tasks/TabBar.vue";
import TaskDetailNotice from "@/tasks/TaskDetailNotice.vue";
import TaskApproval from "@/tasks/TaskApproval.vue";
import TaskHeader from "@/tasks/TaskHeader.vue";
import TaskReviewGate from "@/tasks/TaskReviewGate.vue";
import TaskNotes from "@/tasks/TaskNotes.vue";
import TaskRunPanels from "@/tasks/TaskRunPanels.vue";
import TaskRail from "@/tasks/TaskRail.vue";
import { parseTaskId } from "@/tasks/task-run";
import { provideTaskRun } from "@/tasks/use-task-run";
/**
* The per-task run detail page, reached at /tasks/:id.
@@ -36,7 +46,7 @@ import { provideTaskRun } from "./use-task-run";
* this component on the path (App.vue), so a different :id gets a fresh
* instance rather than diffing the last task's state in place.
*/
const route = useRoute();
const route = useRoute("task-detail");
const rawId = computed(() => String(route.params.id ?? ""));
const taskId = computed(() => parseTaskId(rawId.value));
@@ -28,11 +28,20 @@ import { api, describeError } from "@/lib/api";
import { errors } from "@/copy/errors";
import { statusList } from "@/lib/task-meta";
import { useLiveResource } from "@/stores/session";
import TaskFilters from "./TaskFilters.vue";
import { boardStatus, initialTaskFilter } from "./task-filter";
import type { Task } from "./task";
import TaskTable from "./TaskTable.vue";
import TasksState from "./TasksState.vue";
import TaskFilters from "@/tasks/TaskFilters.vue";
import { boardStatus, initialTaskFilter } from "@/tasks/task-filter";
import type { Task } from "@/tasks/task";
import TaskTable from "@/tasks/TaskTable.vue";
import TasksState from "@/tasks/TasksState.vue";
definePage({
name: "tasks",
meta: {
label: "Tasks",
description: "Picked-up issues and their status.",
section: "tasks",
},
});
/**
* The task board: every issue archied has picked up, and where it stands. It
@@ -1,4 +1,14 @@
<script setup lang="ts">
definePage({
name: "workflow",
meta: {
label: "Workflow",
nav: false,
navPath: "/workflows",
section: "workflow_editor",
},
});
import { computed, onMounted, ref, watch } from "vue";
import { useRoute, useRouter } from "vue-router";
import { toast } from "vue-sonner";
@@ -12,13 +22,13 @@ import { errors } from "@/copy/errors";
import { api, describeError } from "@/lib/api";
import { usePoll, useRead } from "@/lib/use-read";
import { useWorkflowsStore } from "@/stores/workflows";
import WorkflowEditor from "./WorkflowEditor.vue";
import { startedBy } from "./use-workflow-list";
import { workflowTriggers } from "./workflow-triggers";
import WorkflowEditor from "@/workflows/WorkflowEditor.vue";
import { startedBy } from "@/workflows/use-workflow-list";
import { workflowTriggers } from "@/workflows/workflow-triggers";
/** One workflow on the canvas: edited as a draft, published as a version, and
* watched while it runs. */
const route = useRoute();
const route = useRoute("workflow");
const router = useRouter();
const workflows = useWorkflowsStore();
const stats = useRead(() => api.workflowStats());
@@ -1,4 +1,21 @@
<script setup lang="ts">
definePage({
name: "workflows",
// Links written as /workflows?workflow=<id> open that workflow's page.
beforeEnter: (to) => {
const { workflow, ...query } = to.query;
if (typeof workflow === "string" && workflow) {
return { name: "workflow", params: { id: workflow }, query, replace: true };
}
return true;
},
meta: {
label: "Workflows",
description: "Workflows and run history.",
section: "workflows",
},
});
import UserReference from "@/org/UserReference.vue";
import { computed, ref } from "vue";
import { useRouter } from "vue-router";
@@ -23,10 +40,10 @@ import { Timestamp } from "@/components/ui/timestamp";
import { errors } from "@/copy/errors";
import { api, describeError } from "@/lib/api";
import { stateTone } from "@/runs/state";
import { useWorkflowList, type WorkflowRow } from "./use-workflow-list";
import WorkflowDelivery from "./WorkflowDelivery.vue";
import WorkflowLastRun from "./WorkflowLastRun.vue";
import WorkflowRowActions from "./WorkflowRowActions.vue";
import { useWorkflowList, type WorkflowRow } from "@/workflows/use-workflow-list";
import WorkflowDelivery from "@/workflows/WorkflowDelivery.vue";
import WorkflowLastRun from "@/workflows/WorkflowLastRun.vue";
import WorkflowRowActions from "@/workflows/WorkflowRowActions.vue";
const router = useRouter();
const { rows, error, partial, loading, reload, triggersKnown, runsKnown } = useWorkflowList();
+13 -3
View File
@@ -1,13 +1,23 @@
import { createRouter, createWebHistory, type RouteLocationGeneric } from "vue-router";
import {
createRouter,
createWebHistory,
type RouteLocationGeneric,
type RouteRecordRaw,
} from "vue-router";
import { handleHotUpdate, routes as autoRoutes } from "vue-router/auto-routes";
import { routes } from "./routes";
import { redirects } from "./redirects";
export type { RouteLocationGeneric };
export { routes };
export const routes: RouteRecordRaw[] = [...redirects, ...autoRoutes];
export const router = createRouter({
history: createWebHistory(),
routes,
});
if (import.meta.hot) {
handleHotUpdate(router);
}
export default router;
+141
View File
@@ -0,0 +1,141 @@
import type { RouteLocationGeneric, RouteRecordRaw } from "vue-router";
const legacyRedirects: Record<string, string> = {
// The old unified Access area and the org-owned settings that used to sit
// under Settings resolve to the Organisation destination (or Account for
// personal tokens, which were never the org's).
"/access": "/org",
"/access/authentication": "/settings/authentication",
"/access/agents": "/org/agents",
"/access/workspaces": "/org/workspaces",
"/access/policies": "/org/policies",
"/access/models": "/org/models",
"/access/tokens": "/account",
"/settings/identities": "/org/agents",
"/settings/access-policies": "/org/policies",
"/settings/connections": "/org/connections",
"/settings/repositories": "/org/repositories",
"/settings/credential-bindings": "/org/credential-bindings",
"/settings/soul": "/org/instructions",
"/org/soul": "/org/instructions",
"/settings/schedules": "/org/schedules",
"/settings/playbooks": "/org/playbooks",
"/settings/scheduling-policy": "/org/scheduling-policy",
"/settings/appearance": "/account/appearance",
// Paths from before Settings existed, kept for bookmarks and chat history.
"/system/status": "/settings/status",
"/system/appearance": "/account/appearance",
"/system/tasks": "/settings/task-execution",
"/system/models": "/settings/models",
"/system/repos": "/settings/repositories",
"/system/identities": "/org/agents",
"/channels": "/org/channels",
"/skills": "/settings/skills",
"/curators": "/settings/curators",
};
/**
* Redirect-only routes that do not correspond to a page component under
* src/pages/. Merged ahead of the generated file-based routes so static
* redirects always beat the catch-all 404 route.
*/
export const redirects: RouteRecordRaw[] = [
{
path: "/settings",
redirect: "/settings/models",
meta: {
label: "Instance",
description:
"Every instance-wide setting: models, prompts, connections, runtime and status.",
},
},
{
path: "/org/connections",
name: "org-connections",
redirect: "/settings/extensions",
meta: {
section: "org_config",
label: "Connections",
navPath: "/org",
description: "Extensions and the credentials they use.",
},
},
{
path: "/org/credential-bindings",
name: "org-credential-bindings",
redirect: "/settings/credentials",
meta: {
section: "org_config",
label: "Credential bindings",
navPath: "/org",
description: "Credentials the organisation's extensions use.",
},
},
{
path: "/org/models",
name: "org-models",
redirect: "/settings/models",
meta: {
section: "org_config",
label: "Models",
navPath: "/org",
description: "The organisation's agent models and aliases.",
},
},
{
path: "/org/schedules",
name: "org-schedules",
redirect: { path: "/events", query: { tab: "triggers" } },
meta: {
section: "org_config",
label: "Schedules",
navPath: "/org",
description: "Time triggers that start workflows.",
},
},
{
path: "/org/alerts",
name: "org-alerts",
redirect: { path: "/events", query: { tab: "sources" } },
meta: {
section: "org_config",
label: "Alert webhook",
navPath: "/org",
description: "Webhook sources that receive alerts.",
},
},
{
path: "/org/playbooks",
name: "org-playbooks",
redirect: "/workflows",
meta: {
section: "org_config",
label: "Playbooks",
navPath: "/org",
description: "Workflows and the events that start them.",
},
},
{
path: "/settings/history",
redirect: (to: RouteLocationGeneric) => ({
path: "/org/audit",
query: to.query,
hash: to.hash,
}),
meta: { nav: false },
},
{
path: "/settings/audit",
redirect: (to: RouteLocationGeneric) => ({
path: "/org/audit",
query: to.query,
hash: to.hash,
}),
meta: { nav: false },
},
...Object.entries(legacyRedirects).map(([path, redirect]) => ({
path,
redirect,
meta: { nav: false },
})),
];
-522
View File
@@ -1,522 +0,0 @@
import type { RouteLocationGeneric, RouteRecordRaw } from "vue-router";
const ChannelsPage = () => import("@/channels/ChannelsPage.vue");
const CuratorsPage = () => import("@/curators/CuratorsPage.vue");
const DashboardPage = () => import("@/dashboard/DashboardPage.vue");
const EventsPage = () => import("@/events/EventsPage.vue");
const MemoryPage = () => import("@/memory/MemoryPage.vue");
const SharedMemoryPage = () => import("@/memory/SharedMemoryPage.vue");
const LogsPage = () => import("@/logs/LogsPage.vue");
const AuditPage = () => import("@/audit/AuditPage.vue");
const DecisionsPage = () => import("@/audit/DecisionsPage.vue");
const OrgShell = () => import("@/org/OrgShell.vue");
const OrgOverviewPage = () => import("@/org/OrgOverviewPage.vue");
const OrgMembersPage = () => import("@/org/OrgMembersPage.vue");
const OrgAgentsPage = () => import("@/org/OrgAgentsPage.vue");
const OrgWorkspacesPage = () => import("@/org/OrgWorkspacesPage.vue");
const OrgAccessPage = () => import("@/org/OrgAccessPage.vue");
const OrgUsagePage = () => import("@/org/OrgUsagePage.vue");
const SchedulingPolicyPage = () => import("@/settings/SchedulingPolicyPage.vue");
const ToolsPage = () => import("@/settings/ToolsPage.vue");
const OrgApprovalsPage = () => import("@/org/OrgApprovalsPage.vue");
const InstructionsPage = () => import("@/settings/InstructionsPage.vue");
const ExtensionsPage = () => import("@/settings/ExtensionsPage.vue");
const PluginsPage = () => import("@/settings/PluginsPage.vue");
const SecretEnginesPage = () => import("@/settings/SecretEnginesPage.vue");
const ContainerRuntimePage = () => import("@/settings/ContainerRuntimePage.vue");
const SystemAppearancePage = () => import("@/settings/SystemAppearancePage.vue");
const SystemReposPage = () => import("@/settings/SystemReposPage.vue");
const SystemStatusPage = () => import("@/settings/SystemStatusPage.vue");
const SystemTasksPage = () => import("@/settings/SystemTasksPage.vue");
const SkillsPage = () => import("@/skills/SkillsPage.vue");
const TaskDetailPage = () => import("@/tasks/TaskDetailPage.vue");
const TasksPage = () => import("@/tasks/TasksPage.vue");
const WorkflowEditorPage = () => import("@/workflows/WorkflowEditorPage.vue");
// internal/gateway/dashboard_tools.go mirrors this table.
//
// meta:
// label the navigation label, short because its group carries the context
// description one line mirrored in the messaging page registry
// section the capability from GET /api/capabilities this route needs; a
// route with no section is served in every composition
// navPath the navigation entry this route keeps current
export const routes: RouteRecordRaw[] = [
{path:"/account",name:"account",component:()=>import("@/accounts/AccountPage.vue"),meta:{label:"Your account",description:"Password, recovery code, passkeys and personal API tokens."}},
{path:"/access/authentication",redirect:"/settings/authentication",meta:{nav:false}},
{
path: "/",
name: "dashboard",
component: DashboardPage,
meta: {
label: "Dashboard",
description:
"Health, what waits on a person, and recent runs.",
section: "home",
},
},
{
path: "/tasks",
name: "tasks",
component: TasksPage,
meta: {
label: "Tasks",
description: "Picked-up issues and their status.",
section: "tasks",
},
},
{
path: "/tasks/:id",
name: "task-detail",
component: TaskDetailPage,
meta: { label: "Task run", nav: false, navPath: "/tasks", section: "tasks" },
},
{
path: "/runs",
name: "runs",
component: () => import("@/runs/RunsPage.vue"),
meta: { label: "Runs", description: "Workflow runs, their decision trails and waiting approvals.", section: "runs" },
},
{
path: "/runs/:id",
name: "run",
component: () => import("@/runs/RunPage.vue"),
meta: { label: "Run", nav: false, navPath: "/runs", section: "runs" },
},
{
path: "/proposals",
name: "proposals",
component: () => import("@/proposals/ProposalsPage.vue"),
meta: { label: "Proposals", description: "Changes Archie proposes, with their evidence and the actions they take.", section: "proposals" },
},
{
path: "/proposals/:id",
name: "proposal",
component: () => import("@/proposals/ProposalPage.vue"),
meta: { label: "Proposal", nav: false, navPath: "/proposals", section: "proposals" },
},
{
path: "/controls",
name: "controls",
component: () => import("@/controls/ControlsPage.vue"),
meta: { label: "Controls", description: "Hard rules, change-request rules, guards and action types.", section: "controls" },
},
{
path: "/workflows",
name: "workflows",
component: () => import("@/workflows/WorkflowsPage.vue"),
// Links written as /workflows?workflow=<id> open that workflow's page.
beforeEnter: (to: RouteLocationGeneric) => {
const { workflow, ...query } = to.query;
if (typeof workflow === "string" && workflow) return { name: "workflow", params: { id: workflow }, query, replace: true };
return true;
},
meta: {
label: "Workflows",
description: "Workflows and run history.",
section: "workflows",
},
},
{
path: "/workflows/:id",
name: "workflow",
component: WorkflowEditorPage,
meta: { label: "Workflow", nav: false, navPath: "/workflows", section: "workflow_editor" },
},
{
path: "/settings/skills",
name: "skills",
component: SkillsPage,
meta: {
navPath: "/settings",
settings: true,
label: "Skills",
description: "Skills Archie can activate.",
section: "skills",
},
},
{
path: "/settings/curators",
name: "curators",
component: CuratorsPage,
meta: {
navPath: "/settings",
settings: true,
label: "Curators",
description: "Scheduled memory and capture curation.",
section: "curators",
},
},
{
path: "/memory",
name: "memory",
component: MemoryPage,
meta: {
label: "Personal memory",
description: "What Archie remembers for you, and the notes shared with the organisation.",
section: "memory",
},
},
{
path: "/settings/memory",
name: "shared-memory",
component: SharedMemoryPage,
meta: {
navPath: "/settings",
settings: true,
label: "Shared memory",
description: "Notes shared with everyone, the proposals waiting for review, and their published versions.",
section: "memory_admin",
},
},
{
path: "/events",
name: "events",
component: EventsPage,
meta: {
label: "Events",
description: "Received events, their sources, and the triggers that start workflows.",
section: "events",
},
},
{
path: "/settings/status",
name: "system-status",
component: SystemStatusPage,
meta: {
navPath: "/settings",
settings: true,
label: "Status",
description:
"Module, connector and runner health, and the running version.",
section: "system_status",
},
},
{
path: "/logs",
name: "logs",
component: LogsPage,
meta: {
label: "Logs",
description: "Daemon log by level and component.",
section: "logs",
},
},
{
path: "/account/appearance",
name: "system-appearance",
component: SystemAppearancePage,
meta: { label: "Appearance", description: "Theme, density and motion." },
},
{
path: "/settings/task-execution",
name: "system-tasks",
component: SystemTasksPage,
meta: {
navPath: "/settings",
settings: true,
label: "Task execution",
description: "Statuses, operator actions, budgets.",
section: "task_execution",
},
},
{
path: "/settings/models",
name: "system-models",
component: () => import("@/settings/SystemModelsPage.vue"),
meta: {
navPath: "/settings",
settings: true,
label: "Models",
description: "Model aliases, their providers and the organisation's policy.",
section: "model_aliases",
},
},
{
path: "/settings/organisations",
name: "settings-organisations",
component: () => import("@/settings/OrganisationsPage.vue"),
meta: { navPath: "/settings", settings: true, label: "Organisations", section: "organisations", description: "The organisations on this instance, and which one is active." },
},
{
path: "/settings/authentication",
name: "authentication",
component: () => import("@/accounts/AuthenticationPage.vue"),
meta: {
navPath: "/settings",
settings: true,
label: "Authentication",
description: "Instance URL and single sign-on providers.",
section: "settings",
},
},
{
path: "/org",
component: OrgShell,
meta: {
label: "Organisation",
description: "Members, identities, connections, models and automation.",
navPath: "/org",
section: "org",
org: true,
},
children: [
{
path: "",
name: "org-overview",
component: OrgOverviewPage,
meta: { label: "Overview", navPath: "/org", description: "What this organisation holds and how work is going." },
},
{
path: "members",
name: "org-members",
component: OrgMembersPage,
meta: { section: "org_members", label: "Members", navPath: "/org", description: "People in the organisation and their roles." },
},
{
path: "agents",
name: "org-agents",
component: OrgAgentsPage,
meta: { section: "org_agents", label: "Agents", navPath: "/org", description: "Execution identities, their permissions and commit author." },
},
{
path: "audit",
name: "audit",
component: AuditPage,
meta: {
section: "org_audit",
label: "Audit",
navPath: "/org",
description: "Settings, access, identity and runtime events.",
},
},
{
path: "decisions",
name: "org-decisions",
component: DecisionsPage,
meta: {
section: "org_decisions",
label: "Access decisions",
navPath: "/org",
description: "Access requests the policy chain allowed or refused, newest first.",
},
},
{
path: "workspaces",
name: "org-workspaces",
component: OrgWorkspacesPage,
meta: { section: "org_workspaces", label: "Workspaces", navPath: "/org", description: "Groups of organisation work and resources." },
},
{
path: "policies",
name: "org-policies",
component: OrgAccessPage,
meta: { section: "org_policies", label: "Policies", navPath: "/org", description: "Access rules for the organisation." },
},
{
path: "repositories",
name: "org-repositories",
component: SystemReposPage,
meta: { section: "org_work_intake", label: "Repositories", navPath: "/org", description: "Repository connections, access checks and execution policies." },
},
{
path: "connections",
name: "org-connections",
redirect: "/settings/extensions",
meta: { section: "org_config", label: "Connections", navPath: "/org", description: "Extensions and the credentials they use." },
},
{
path: "credential-bindings",
name: "org-credential-bindings",
redirect: "/settings/credentials",
meta: { section: "org_config", label: "Credential bindings", navPath: "/org", description: "Credentials the organisation's extensions use." },
},
{
path: "models",
name: "org-models",
redirect: "/settings/models",
meta: { section: "org_config", label: "Models", navPath: "/org", description: "The organisation's agent models and aliases." },
},
{
path: "approvals",
name: "org-approvals",
component: OrgApprovalsPage,
meta: { section: "org_config", label: "Approvals", navPath: "/org", description: "Default owner, escalation path and approval deadline." },
},
{
path: "instructions",
name: "org-instructions",
component: InstructionsPage,
meta: { section: "org_config", label: "Instructions", navPath: "/org", description: "Standing instructions given to every agent in the organisation." },
},
{
path: "schedules",
name: "org-schedules",
redirect: { path: "/events", query: { tab: "triggers" } },
meta: { section: "org_config", label: "Schedules", navPath: "/org", description: "Time triggers that start workflows." },
},
{
path: "channels",
name: "org-channels",
component: ChannelsPage,
meta: { label: "Channels", navPath: "/org", description: "Chat channels.", section: "channels" },
},
{
path: "scheduling-policy",
name: "org-scheduling-policy",
component: SchedulingPolicyPage,
meta: { section: "org_work_intake", label: "Scheduling policy", navPath: "/org", description: "Work discovery and forge labels." },
},
{
path: "issue-routing",
name: "org-issue-routing",
component: () => import("@/settings/IssueRoutingPage.vue"),
meta: { section: "org_work_intake", label: "Issue routing", navPath: "/org", description: "Which workflow an issue runs by its labels." },
},
{
path: "alerts",
name: "org-alerts",
redirect: { path: "/events", query: { tab: "sources" } },
meta: { section: "org_config", label: "Alert webhook", navPath: "/org", description: "Webhook sources that receive alerts." },
},
{
path: "playbooks",
name: "org-playbooks",
redirect: "/workflows",
meta: { section: "org_config", label: "Playbooks", navPath: "/org", description: "Workflows and the events that start them." },
},
{
path: "usage",
name: "org-usage",
component: OrgUsagePage,
meta: { section: "org_usage", label: "Usage", navPath: "/org", description: "Token spend by model, identity and period." },
},
],
},
// The old unified Access area and the org-owned settings that used to sit
// under Settings resolve to the Organisation destination (or Account for
// personal tokens, which were never the org's).
...Object.entries({
"/access": "/org",
"/access/agents": "/org/agents",
"/access/workspaces": "/org/workspaces",
"/access/policies": "/org/policies",
"/access/models": "/org/models",
"/access/tokens": "/account",
"/settings/identities": "/org/agents",
"/settings/access-policies": "/org/policies",
"/settings/connections": "/org/connections",
"/settings/repositories":"/org/repositories",
"/settings/credential-bindings": "/org/credential-bindings",
"/settings/soul": "/org/instructions",
"/org/soul": "/org/instructions",
"/settings/schedules": "/org/schedules",
"/settings/playbooks": "/org/playbooks",
"/settings/scheduling-policy": "/org/scheduling-policy",
"/settings/appearance": "/account/appearance",
}).map(([path, redirect]) => ({ path, redirect, meta: { nav: false } })),
{
path: "/settings/tools",
name: "settings-tools",
component: ToolsPage,
meta: {
navPath: "/settings",
settings: true,
label: "Tools & MCP",
description: "Agent tools and MCP servers.",
section: "tools",
},
},
{
path: "/settings/channels",
name: "settings-channels",
component: () => import("@/settings/ChannelSettingsPage.vue"),
meta: { navPath: "/settings", settings: true, label: "Channels", description: "Chat channel connections and session defaults.", section: "channels" },
},
{
path: "/settings/extensions",
name: "settings-extensions",
component: ExtensionsPage,
meta: {
navPath: "/settings",
settings: true,
label: "Extensions",
description: "Installed extensions, grants and the marketplace.",
section: "extension_catalogue",
},
},
{
path: "/settings/plugins",
name: "settings-plugins",
component: PluginsPage,
meta: {
navPath: "/settings",
settings: true,
label: "Plugins",
description: "Extension directories loaded at startup.",
section: "plugins",
},
},
{
path: "/settings/secret-engines",
name: "settings-secret-engines",
component: SecretEnginesPage,
meta: { navPath: "/settings", settings: true, label: "Secret engines", section: "secret_engines", description: "Where secrets are read from: engines, their keys and health." },
},
{
path: "/settings/credentials",
name: "settings-credentials",
component: () => import("@/settings/CredentialsPage.vue"),
meta: { navPath: "/settings", settings: true, label: "Credentials", description: "Sealed credentials extensions and models use.", section: "credentials" },
},
{
path: "/settings/container-runtime",
name: "settings-container-runtime",
component: ContainerRuntimePage,
meta: {
navPath: "/settings",
settings: true,
label: "Container runtime",
description: "How task containers run: runtime, image, limits and egress hosts.",
section: "container_runtime",
},
},
{
path: "/settings/agent-profiles",
name: "settings-agent-profiles",
component: () => import("@/settings/AgentProfilesPage.vue"),
meta: { navPath: "/settings", settings: true, label: "Agent profiles", section: "agent_profiles", description: "Execution profiles: the image and tools each agent runs with." },
},
{ path: "/settings/history", redirect: (to: RouteLocationGeneric) => ({ path: "/org/audit", query: to.query, hash: to.hash }), meta: { nav: false } },
{ path: "/settings/audit", redirect: (to: RouteLocationGeneric) => ({ path: "/org/audit", query: to.query, hash: to.hash }), meta: { nav: false } },
{
path: "/settings",
redirect: "/settings/models",
meta: {
label: "Instance",
description: "Every instance-wide setting: models, prompts, connections, runtime and status.",
},
},
{
path: "/:pathMatch(.*)*",
name: "not-found",
component: () => import("@/base/NotFoundPage.vue"),
meta: { nav: false },
},
// Paths from before Settings existed, kept for bookmarks and chat history.
...Object.entries({
"/system/status": "/settings/status",
"/system/appearance": "/account/appearance",
"/system/tasks": "/settings/task-execution",
"/system/models": "/settings/models",
"/system/repos": "/settings/repositories",
"/system/identities": "/org/agents",
"/channels": "/org/channels",
"/skills": "/settings/skills",
"/curators": "/settings/curators",
}).map(([path, redirect]) => ({ path, redirect, meta: { nav: false } })),
];
export default routes;
+877
View File
@@ -0,0 +1,877 @@
/* eslint-disable */
/* prettier-ignore */
// oxfmt-ignore
// @ts-nocheck
// noinspection ES6UnusedImports
// Generated by vue-router. !! DO NOT MODIFY THIS FILE !!
// It's recommended to commit this file.
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
import type {
RouteRecordInfo,
ParamValue,
ParamValueOneOrMore,
ParamValueZeroOrMore,
ParamValueZeroOrOne,
} from 'vue-router'
import type {
_ExtractParamParserType,
} from 'vue-router/experimental'
declare module 'vue-router' {
interface TypesConfig {
_ParamParsers: {}
RouteNamedMap: import('vue-router/auto-routes').RouteNamedMap
_RouteFileInfoMap: import('vue-router/auto-routes')._RouteFileInfoMap
}
}
declare module 'vue-router/auto-routes' {
/**
* Route name map generated by vue-router
*/
export interface RouteNamedMap {
'dashboard': RouteRecordInfo<
'dashboard',
'/',
Record<never, never>,
Record<never, never>,
| never
>,
'not-found': RouteRecordInfo<
'not-found',
'/:path(.*)',
{ path: ParamValue<true> },
{ path: ParamValue<false> },
| never
>,
'account': RouteRecordInfo<
'account',
'/account',
Record<never, never>,
Record<never, never>,
| never
>,
'system-appearance': RouteRecordInfo<
'system-appearance',
'/account/appearance',
Record<never, never>,
Record<never, never>,
| never
>,
'/controls': RouteRecordInfo<
'/controls',
'/controls',
Record<never, never>,
Record<never, never>,
| 'controls'
| 'controls-action-type'
| 'controls-action-types'
| 'controls-guard'
| 'controls-guards'
>,
'controls': RouteRecordInfo<
'controls',
'/controls',
Record<never, never>,
Record<never, never>,
| never
>,
'controls-action-types': RouteRecordInfo<
'controls-action-types',
'/controls/action-types',
Record<never, never>,
Record<never, never>,
| never
>,
'controls-action-type': RouteRecordInfo<
'controls-action-type',
'/controls/action-types/:id',
{ id: ParamValue<true> },
{ id: ParamValue<false> },
| never
>,
'controls-guards': RouteRecordInfo<
'controls-guards',
'/controls/guards',
Record<never, never>,
Record<never, never>,
| never
>,
'controls-guard': RouteRecordInfo<
'controls-guard',
'/controls/guards/:id',
{ id: ParamValue<true> },
{ id: ParamValue<false> },
| never
>,
'events': RouteRecordInfo<
'events',
'/events',
Record<never, never>,
Record<never, never>,
| never
>,
'logs': RouteRecordInfo<
'logs',
'/logs',
Record<never, never>,
Record<never, never>,
| never
>,
'memory': RouteRecordInfo<
'memory',
'/memory',
Record<never, never>,
Record<never, never>,
| never
>,
'/org': RouteRecordInfo<
'/org',
'/org',
Record<never, never>,
Record<never, never>,
| 'audit'
| 'org-agents'
| 'org-approvals'
| 'org-channels'
| 'org-decisions'
| 'org-instructions'
| 'org-issue-routing'
| 'org-members'
| 'org-overview'
| 'org-policies'
| 'org-repositories'
| 'org-scheduling-policy'
| 'org-usage'
| 'org-workspaces'
>,
'org-overview': RouteRecordInfo<
'org-overview',
'/org',
Record<never, never>,
Record<never, never>,
| never
>,
'org-agents': RouteRecordInfo<
'org-agents',
'/org/agents',
Record<never, never>,
Record<never, never>,
| never
>,
'org-approvals': RouteRecordInfo<
'org-approvals',
'/org/approvals',
Record<never, never>,
Record<never, never>,
| never
>,
'audit': RouteRecordInfo<
'audit',
'/org/audit',
Record<never, never>,
Record<never, never>,
| never
>,
'org-channels': RouteRecordInfo<
'org-channels',
'/org/channels',
Record<never, never>,
Record<never, never>,
| never
>,
'org-decisions': RouteRecordInfo<
'org-decisions',
'/org/decisions',
Record<never, never>,
Record<never, never>,
| never
>,
'org-instructions': RouteRecordInfo<
'org-instructions',
'/org/instructions',
Record<never, never>,
Record<never, never>,
| never
>,
'org-issue-routing': RouteRecordInfo<
'org-issue-routing',
'/org/issue-routing',
Record<never, never>,
Record<never, never>,
| never
>,
'org-members': RouteRecordInfo<
'org-members',
'/org/members',
Record<never, never>,
Record<never, never>,
| never
>,
'org-policies': RouteRecordInfo<
'org-policies',
'/org/policies',
Record<never, never>,
Record<never, never>,
| never
>,
'org-repositories': RouteRecordInfo<
'org-repositories',
'/org/repositories',
Record<never, never>,
Record<never, never>,
| never
>,
'org-scheduling-policy': RouteRecordInfo<
'org-scheduling-policy',
'/org/scheduling-policy',
Record<never, never>,
Record<never, never>,
| never
>,
'org-usage': RouteRecordInfo<
'org-usage',
'/org/usage',
Record<never, never>,
Record<never, never>,
| never
>,
'org-workspaces': RouteRecordInfo<
'org-workspaces',
'/org/workspaces',
Record<never, never>,
Record<never, never>,
| never
>,
'proposals': RouteRecordInfo<
'proposals',
'/proposals',
Record<never, never>,
Record<never, never>,
| never
>,
'proposal': RouteRecordInfo<
'proposal',
'/proposals/:id',
{ id: ParamValue<true> },
{ id: ParamValue<false> },
| never
>,
'runs': RouteRecordInfo<
'runs',
'/runs',
Record<never, never>,
Record<never, never>,
| never
>,
'run': RouteRecordInfo<
'run',
'/runs/:id',
{ id: ParamValue<true> },
{ id: ParamValue<false> },
| never
>,
'settings-agent-profiles': RouteRecordInfo<
'settings-agent-profiles',
'/settings/agent-profiles',
Record<never, never>,
Record<never, never>,
| never
>,
'authentication': RouteRecordInfo<
'authentication',
'/settings/authentication',
Record<never, never>,
Record<never, never>,
| never
>,
'settings-channels': RouteRecordInfo<
'settings-channels',
'/settings/channels',
Record<never, never>,
Record<never, never>,
| never
>,
'settings-container-runtime': RouteRecordInfo<
'settings-container-runtime',
'/settings/container-runtime',
Record<never, never>,
Record<never, never>,
| never
>,
'settings-credentials': RouteRecordInfo<
'settings-credentials',
'/settings/credentials',
Record<never, never>,
Record<never, never>,
| never
>,
'curators': RouteRecordInfo<
'curators',
'/settings/curators',
Record<never, never>,
Record<never, never>,
| never
>,
'settings-extensions': RouteRecordInfo<
'settings-extensions',
'/settings/extensions',
Record<never, never>,
Record<never, never>,
| never
>,
'shared-memory': RouteRecordInfo<
'shared-memory',
'/settings/memory',
Record<never, never>,
Record<never, never>,
| never
>,
'system-models': RouteRecordInfo<
'system-models',
'/settings/models',
Record<never, never>,
Record<never, never>,
| never
>,
'settings-organisations': RouteRecordInfo<
'settings-organisations',
'/settings/organisations',
Record<never, never>,
Record<never, never>,
| never
>,
'settings-plugins': RouteRecordInfo<
'settings-plugins',
'/settings/plugins',
Record<never, never>,
Record<never, never>,
| never
>,
'settings-secret-engines': RouteRecordInfo<
'settings-secret-engines',
'/settings/secret-engines',
Record<never, never>,
Record<never, never>,
| never
>,
'skills': RouteRecordInfo<
'skills',
'/settings/skills',
Record<never, never>,
Record<never, never>,
| never
>,
'system-status': RouteRecordInfo<
'system-status',
'/settings/status',
Record<never, never>,
Record<never, never>,
| never
>,
'system-tasks': RouteRecordInfo<
'system-tasks',
'/settings/task-execution',
Record<never, never>,
Record<never, never>,
| never
>,
'settings-tools': RouteRecordInfo<
'settings-tools',
'/settings/tools',
Record<never, never>,
Record<never, never>,
| never
>,
'tasks': RouteRecordInfo<
'tasks',
'/tasks',
Record<never, never>,
Record<never, never>,
| never
>,
'task-detail': RouteRecordInfo<
'task-detail',
'/tasks/:id',
{ id: ParamValue<true> },
{ id: ParamValue<false> },
| never
>,
'workflows': RouteRecordInfo<
'workflows',
'/workflows',
Record<never, never>,
Record<never, never>,
| never
>,
'workflow': RouteRecordInfo<
'workflow',
'/workflows/:id',
{ id: ParamValue<true> },
{ id: ParamValue<false> },
| never
>,
}
/**
* Route file to route info map by vue-router.
* Used by the \`sfc-typed-router\` Volar plugin to automatically type \`useRoute()\`.
*
* Each key is a file path relative to the project root with 2 properties:
* - routes: union of route names of the possible routes when in this page (passed to useRoute<...>())
* - views: names of nested views (can be passed to <RouterView name="...">)
*
* @internal
*/
export interface _RouteFileInfoMap {
'src/pages/index.vue': {
routes:
| 'dashboard'
views:
| never
pathParamNames:
| never
}
'src/pages/[...path].vue': {
routes:
| 'not-found'
views:
| never
pathParamNames:
| 'path'
}
'src/pages/account/index.vue': {
routes:
| 'account'
views:
| never
pathParamNames:
| never
}
'src/pages/account/appearance.vue': {
routes:
| 'system-appearance'
views:
| never
pathParamNames:
| never
}
'src/pages/controls.vue': {
routes:
| '/controls'
| 'controls'
| 'controls-action-type'
| 'controls-action-types'
| 'controls-guard'
| 'controls-guards'
views:
| 'default'
pathParamNames:
| never
}
'src/pages/controls/index.vue': {
routes:
| 'controls'
views:
| never
pathParamNames:
| never
}
'src/pages/controls/action-types/index.vue': {
routes:
| 'controls-action-types'
views:
| never
pathParamNames:
| never
}
'src/pages/controls/action-types/[id].vue': {
routes:
| 'controls-action-type'
views:
| never
pathParamNames:
| 'id'
}
'src/pages/controls/guards/index.vue': {
routes:
| 'controls-guards'
views:
| never
pathParamNames:
| never
}
'src/pages/controls/guards/[id].vue': {
routes:
| 'controls-guard'
views:
| never
pathParamNames:
| 'id'
}
'src/pages/events.vue': {
routes:
| 'events'
views:
| never
pathParamNames:
| never
}
'src/pages/logs.vue': {
routes:
| 'logs'
views:
| never
pathParamNames:
| never
}
'src/pages/memory.vue': {
routes:
| 'memory'
views:
| never
pathParamNames:
| never
}
'src/pages/org.vue': {
routes:
| '/org'
| 'audit'
| 'org-agents'
| 'org-approvals'
| 'org-channels'
| 'org-decisions'
| 'org-instructions'
| 'org-issue-routing'
| 'org-members'
| 'org-overview'
| 'org-policies'
| 'org-repositories'
| 'org-scheduling-policy'
| 'org-usage'
| 'org-workspaces'
views:
| 'default'
pathParamNames:
| never
}
'src/pages/org/index.vue': {
routes:
| 'org-overview'
views:
| never
pathParamNames:
| never
}
'src/pages/org/agents.vue': {
routes:
| 'org-agents'
views:
| never
pathParamNames:
| never
}
'src/pages/org/approvals.vue': {
routes:
| 'org-approvals'
views:
| never
pathParamNames:
| never
}
'src/pages/org/audit.vue': {
routes:
| 'audit'
views:
| never
pathParamNames:
| never
}
'src/pages/org/channels.vue': {
routes:
| 'org-channels'
views:
| never
pathParamNames:
| never
}
'src/pages/org/decisions.vue': {
routes:
| 'org-decisions'
views:
| never
pathParamNames:
| never
}
'src/pages/org/instructions.vue': {
routes:
| 'org-instructions'
views:
| never
pathParamNames:
| never
}
'src/pages/org/issue-routing.vue': {
routes:
| 'org-issue-routing'
views:
| never
pathParamNames:
| never
}
'src/pages/org/members.vue': {
routes:
| 'org-members'
views:
| never
pathParamNames:
| never
}
'src/pages/org/policies.vue': {
routes:
| 'org-policies'
views:
| never
pathParamNames:
| never
}
'src/pages/org/repositories.vue': {
routes:
| 'org-repositories'
views:
| never
pathParamNames:
| never
}
'src/pages/org/scheduling-policy.vue': {
routes:
| 'org-scheduling-policy'
views:
| never
pathParamNames:
| never
}
'src/pages/org/usage.vue': {
routes:
| 'org-usage'
views:
| never
pathParamNames:
| never
}
'src/pages/org/workspaces.vue': {
routes:
| 'org-workspaces'
views:
| never
pathParamNames:
| never
}
'src/pages/proposals/index.vue': {
routes:
| 'proposals'
views:
| never
pathParamNames:
| never
}
'src/pages/proposals/[id].vue': {
routes:
| 'proposal'
views:
| never
pathParamNames:
| 'id'
}
'src/pages/runs/index.vue': {
routes:
| 'runs'
views:
| never
pathParamNames:
| never
}
'src/pages/runs/[id].vue': {
routes:
| 'run'
views:
| never
pathParamNames:
| 'id'
}
'src/pages/settings/agent-profiles.vue': {
routes:
| 'settings-agent-profiles'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/authentication.vue': {
routes:
| 'authentication'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/channels.vue': {
routes:
| 'settings-channels'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/container-runtime.vue': {
routes:
| 'settings-container-runtime'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/credentials.vue': {
routes:
| 'settings-credentials'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/curators.vue': {
routes:
| 'curators'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/extensions.vue': {
routes:
| 'settings-extensions'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/memory.vue': {
routes:
| 'shared-memory'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/models.vue': {
routes:
| 'system-models'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/organisations.vue': {
routes:
| 'settings-organisations'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/plugins.vue': {
routes:
| 'settings-plugins'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/secret-engines.vue': {
routes:
| 'settings-secret-engines'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/skills.vue': {
routes:
| 'skills'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/status.vue': {
routes:
| 'system-status'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/task-execution.vue': {
routes:
| 'system-tasks'
views:
| never
pathParamNames:
| never
}
'src/pages/settings/tools.vue': {
routes:
| 'settings-tools'
views:
| never
pathParamNames:
| never
}
'src/pages/tasks/index.vue': {
routes:
| 'tasks'
views:
| never
pathParamNames:
| never
}
'src/pages/tasks/[id].vue': {
routes:
| 'task-detail'
views:
| never
pathParamNames:
| 'id'
}
'src/pages/workflows/index.vue': {
routes:
| 'workflows'
views:
| never
pathParamNames:
| never
}
'src/pages/workflows/[id].vue': {
routes:
| 'workflow'
views:
| never
pathParamNames:
| 'id'
}
}
/**
* Get a union of possible route names in a certain route component file.
* Used by the \`sfc-typed-router\` Volar plugin to automatically type \`useRoute()\`.
*
* @internal
*/
export type _RouteNamesForFilePath<FilePath extends string> =
_RouteFileInfoMap extends Record<FilePath, infer Info>
? Info['routes']
: keyof RouteNamedMap
}
export {}
+9 -1
View File
@@ -1,11 +1,19 @@
import { defineConfig } from "vite";
import VueRouter from "vue-router/vite";
import vue from "@vitejs/plugin-vue";
import tailwindcss from "@tailwindcss/vite";
const apiTarget = process.env.ARCHIE_DEV_API ?? "http://127.0.0.1:8484";
export default defineConfig({
plugins: [vue(), tailwindcss()],
plugins: [
VueRouter({
routesFolder: "src/pages",
dts: "src/typed-router.d.ts",
}),
vue(),
tailwindcss(),
],
resolve: {
alias: {
"@": new URL("./src", import.meta.url).pathname,